:root {
  --bg0: #0a0a0f;
  --bg1: #0f1018;
  --bg2: #131524;
  --panel: rgba(18, 20, 34, 0.75);
  --panel2: rgba(22, 25, 42, 0.82);
  --stroke: rgba(255,255,255,0.10);
  --stroke2: rgba(255,255,255,0.16);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.66);
  --muted2: rgba(255,255,255,0.45);

  --acc: #8b5cf6;
  --acc2: #22d3ee;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;

  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --top: 64px;
  --side: 260px;
  --chat: 360px;
  --r: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(1100px 720px at 12% 10%, rgba(139,92,246,0.18), transparent 55%),
    radial-gradient(900px 600px at 75% 20%, rgba(34,211,238,0.12), transparent 55%),
    radial-gradient(900px 520px at 70% 90%, rgba(52,211,153,0.10), transparent 58%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, var(--bg0));
  overflow: auto;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 14px);
  opacity: 0.22;
  pointer-events: none;
}

.mono { font-family: var(--mono); font-size: 12px; color: var(--muted2); letter-spacing: 0.01em; }

/* Compatibility for the existing chat.js output */
.text-secondary { color: var(--muted2); }
.py-1 { padding: 6px 0; }

.top {
  height: var(--top);
  display: grid;
  grid-template-columns: 1fr minmax(260px, 520px) 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(8, 9, 14, 0.58);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top__left, .top__right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top__left { justify-content: flex-start; }
.top__right { justify-content: flex-end; }
.top__center { display: flex; justify-content: center; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand__mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(139,92,246,0.95), rgba(34,211,238,0.8));
  box-shadow: 0 0 0 3px rgba(139,92,246,0.14);
}

.brand__name { font-weight: 700; letter-spacing: -0.02em; }
.brand__dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.28); }
.brand__sub { color: var(--muted); font-weight: 600; }

.tabs { display: inline-flex; gap: 6px; }
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.82);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.tab--active {
  border-color: rgba(139,92,246,0.34);
  background: rgba(139,92,246,0.14);
  color: rgba(255,255,255,0.92);
}

.search {
  width: min(520px, 100%);
  display: flex;
  gap: 8px;
}
.search__input {
  height: 40px;
  flex: 1;
  border-radius: 12px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.92);
  outline: none;
  font: inherit;
}
.search__input:focus { border-color: rgba(34,211,238,0.40); }
.search__btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90);
  cursor: pointer;
  font: inherit;
}

body.searchOverlayOpen {
  overflow: hidden;
}

.searchOverlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  padding: calc(var(--top) + 12px) 16px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: rgba(4, 5, 8, 0.68);
  backdrop-filter: blur(8px);
}
.searchOverlay[hidden] { display: none; }

.searchOverlay__panel {
  width: min(920px, 100%);
  max-height: calc(100vh - var(--top) - 24px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(560px 220px at 15% 0%, rgba(139,92,246,0.22), transparent 70%),
    radial-gradient(520px 220px at 85% 0%, rgba(34,211,238,0.16), transparent 70%),
    rgba(10, 12, 20, 0.96);
  box-shadow:
    0 28px 68px rgba(0,0,0,0.62),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.searchOverlay__head {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  gap: 12px;
}

.searchOverlay__titles {
  flex: 1;
  min-width: 0;
}

.searchOverlay__title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchOverlay__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.searchOverlay__close {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90);
  font: inherit;
  cursor: pointer;
}

.searchOverlay__body {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.searchOverlay__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

a.searchOverlay__item {
  color: inherit;
  text-decoration: none;
}

.searchOverlay__item {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
}

.searchOverlay__item:hover,
.searchOverlay__item.is-active {
  border-color: rgba(34,211,238,0.40);
  background: rgba(34,211,238,0.08);
}

.searchOverlay__thumb {
  position: relative;
  border-radius: 10px;
  height: 96px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
}

.searchOverlay__thumb img,
.searchOverlay__thumbPh {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.searchOverlay__thumbPh {
  background:
    radial-gradient(260px 110px at 20% 30%, rgba(139,92,246,0.25), transparent 65%),
    radial-gradient(220px 110px at 80% 60%, rgba(34,211,238,0.14), transparent 65%),
    linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.searchOverlay__itemBody {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.searchOverlay__itemTitle {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchOverlay__itemMeta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.searchOverlay__live {
  align-self: center;
  justify-self: end;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  border-radius: 999px;
  border: 1px solid rgba(251,113,133,0.46);
  background: rgba(251,113,133,0.16);
  padding: 6px 10px;
}

.searchOverlay__empty {
  padding: 18px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.pill {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(139,92,246,0.30);
  background: linear-gradient(135deg, rgba(139,92,246,0.22), rgba(34,211,238,0.10));
  color: rgba(255,255,255,0.94);
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.pill__spark {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--acc2);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.12);
}

.icon {
  height: 40px;
  width: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.80);
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.avatar {
  height: 40px;
  width: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.avatar__ring {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 180deg, rgba(139,92,246,0.0), rgba(139,92,246,0.55), rgba(34,211,238,0.35), rgba(139,92,246,0.0));
  animation: spin 10s linear infinite;
  opacity: 0.65;
}
.avatar__txt { position: relative; font-weight: 800; letter-spacing: -0.02em; }

@keyframes spin { to { transform: rotate(360deg); } }

.layout {
  min-height: calc(100vh - var(--top));
  height: auto;
  display: grid;
  grid-template-columns: var(--side) 1fr;
}

.side {
  border-right: 1px solid var(--stroke);
  background: rgba(8, 9, 14, 0.52);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side__group { padding: 10px; border-radius: var(--r); border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); }
.side__title { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }


/* Recent tiles: full-width thumbnail with title overlay */
.side__item {
  display: block;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.02);
  margin-bottom: 10px;
}
.side__item:hover { border-color: rgba(34,211,238,0.22); background: rgba(34,211,238,0.06); }
.side__item--active { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.30); }

.side__thumb.side__thumb--wide {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  border: 0;
  position: relative;
  background: rgba(255,255,255,0.04);
}

.side__thumb.side__thumb--wide img,
.side__thumb.side__thumb--wide .side__thumbPh {
  width: 100%;
  height: 100%;
}

.side__ol {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.78));
}

.side__olTop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.86);
  font-size: 12px;
}

.side__olLive {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(251,113,133,0.35);
  background: rgba(251,113,133,0.16);
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.08em;
}

.side__olWhen { margin-left: auto; color: rgba(255,255,255,0.72); }

.side__olTitle {
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 13px;
  line-height: 1.15;
  text-shadow: 0 10px 24px rgba(0,0,0,0.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.86);
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.side__item--active { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.26); }
.side__label {
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side__meta { margin-left: auto; }

.side__thumb {
  width: 54px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.04);
}

.side__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.side__thumbPh {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(240px 100px at 20% 30%, rgba(139,92,246,0.24), transparent 60%),
    radial-gradient(240px 100px at 80% 70%, rgba(34,211,238,0.14), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.side__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side__labelRow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.side__link {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  margin-bottom: 8px;
}
.side__link:hover { border-color: rgba(34,211,238,0.26); background: rgba(34,211,238,0.10); }

.side__foot { margin-top: auto; padding: 10px; border-radius: var(--r); border: 1px dashed rgba(255,255,255,0.10); background: rgba(255,255,255,0.02); }

.main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
}

.watch {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr var(--chat);
  height: auto;
  align-items: start;
}

.player { min-width: 0; min-height: 0; padding: 14px; overflow: auto; }

.player__stage {
  border-radius: calc(var(--r) + 4px);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}

.player__hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(10, 11, 18, 0.55);
  backdrop-filter: blur(10px);
}

.liveBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251,113,133,0.35);
  background: rgba(251,113,133,0.10);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.liveBadge__meta {
  margin-left: 6px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.78);
  text-transform: none;
}

.meta { min-width: 0; }
.meta__title { font-weight: 800; letter-spacing: -0.02em; }
.meta__sub { margin-top: 2px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sep { margin: 0 8px; color: rgba(255,255,255,0.25); }

.ctas { display: flex; gap: 8px; }

.btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--primary {
  border-color: rgba(139,92,246,0.30);
  background: rgba(139,92,246,0.18);
}

.btn--like {
  gap: 8px;
  min-width: 112px;
}

.btn__heart {
  color: rgba(251,113,133,0.92);
  font-size: 15px;
  line-height: 1;
}

.btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2ch;
  color: rgba(255,255,255,0.86);
}

.btn--liked {
  border-color: rgba(251,113,133,0.42);
  background: rgba(251,113,133,0.16);
}

.btn:disabled {
  cursor: default;
  opacity: 0.75;
}

.player__surface {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(900px 520px at 10% 20%, rgba(139,92,246,0.22), transparent 55%),
    radial-gradient(900px 520px at 90% 20%, rgba(34,211,238,0.14), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.player__surface video#watch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 2;
}

.noise {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 22px);
  opacity: 0.14;
  pointer-events: none;
  z-index: 1;
}

.shine {
  position: absolute;
  inset: -30%;
  background: radial-gradient(400px 200px at 30% 40%, rgba(255,255,255,0.10), transparent 70%);
  filter: blur(2px);
  animation: float 8s ease-in-out infinite;
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  50% { transform: translate(30px, 18px); }
  100% { transform: translate(0, 0); }
}

.player__overlay {
  position: absolute;
  inset: 18px;
  border-radius: var(--r);
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(8, 9, 14, 0.55);
  z-index: 3;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
.player__overlayT { font-weight: 900; letter-spacing: -0.02em; font-size: 18px; }
.player__overlayP { margin-top: 6px; color: var(--muted2); font-size: 12px; }

.startOverlay {
  position: absolute;
  inset: 18px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(8, 9, 14, 0.40);
  z-index: 4;
  display: block;
  cursor: pointer;
  color: var(--text);
}
.startOverlay:hover { border-color: rgba(34,211,238,0.26); background: rgba(34,211,238,0.08); }
.startOverlay:active { transform: translateY(1px); }
.startOverlay__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(139,92,246,0.30), rgba(34,211,238,0.16));
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.startOverlay__icon::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 18px solid rgba(255,255,255,0.86);
}
.startOverlay__t,
.startOverlay__p {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: max-content;
  max-width: calc(100% - 32px);
}
.startOverlay__t {
  top: calc(50% + 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.startOverlay__p { top: calc(50% + 78px); }

.below { margin-top: 12px; display: grid; gap: 12px; }

.channelCard {
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--panel);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.channelCard__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pfp {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(135deg, rgba(139,92,246,0.28), rgba(34,211,238,0.14));
}

.channelCard__name { font-weight: 900; letter-spacing: -0.02em; }
.channelCard__desc { color: var(--muted); font-size: 12px; }

.channelCard__right { display: flex; gap: 14px; }
.stat { text-align: right; }
.stat__k { font-size: 11px; color: var(--muted2); }
.stat__v { font-weight: 900; }

.pin {
  border-radius: var(--r);
  border: 1px solid rgba(251,191,36,0.28);
  background: rgba(251,191,36,0.10);
  padding: 12px;
}
.pin__k { font-weight: 900; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.pin__v { margin-top: 6px; color: rgba(255,255,255,0.88); font-size: 13px; line-height: 1.4; }

.rail2 {
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--panel2);
  padding: 12px;
}

.rail2__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rail2__title { font-weight: 900; letter-spacing: -0.02em; }
.rail2__tools { display: flex; gap: 8px; }
.ghost {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.84);
  cursor: pointer;
  font: inherit;
}
.ghost:hover { border-color: rgba(34,211,238,0.26); background: rgba(34,211,238,0.10); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

a.cardV { color: inherit; text-decoration: none; }

.cardV {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(8, 9, 14, 0.35);
  overflow: hidden;
  cursor: pointer;
}

.cardV:hover { border-color: rgba(139,92,246,0.30); }
.cardV--active { border-color: rgba(34,211,238,0.38); box-shadow: 0 0 0 2px rgba(34,211,238,0.10) inset; }

.cardV__thumb {
  height: 110px;
  background:
    radial-gradient(260px 140px at 25% 30%, rgba(139,92,246,0.22), transparent 65%),
    radial-gradient(260px 140px at 80% 60%, rgba(34,211,238,0.12), transparent 65%),
    linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  position: relative;
}

.cardV__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cardV__thumb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.14);
  opacity: 0.55;
  pointer-events: none;
}

.cardV__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251,113,133,0.35);
  background: rgba(251,113,133,0.14);
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 11px;
}

.cardV__body { padding: 10px; }
.cardV__t { font-weight: 900; font-size: 13px; letter-spacing: -0.02em; }
.cardV__m { margin-top: 4px; color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.chat {
  border-left: 1px solid var(--stroke);
  background: rgba(8, 9, 14, 0.52);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  min-width: 0;
  align-self: start;
}

.chat__top {
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(10, 11, 18, 0.55);
  backdrop-filter: blur(10px);
}

.chat__title { font-weight: 900; letter-spacing: -0.02em; }
.chat__sub { margin-top: 4px; color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 8px; }

.chat__msgs { padding: 12px; overflow: auto; display: block; min-height: 0; }

.chat__msgs strong { font-weight: 900; }

.chat__composer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex;
  gap: 8px;
  background: rgba(10, 11, 18, 0.55);
  backdrop-filter: blur(10px);
}

.chat__input {
  height: 40px;
  flex: 1;
  border-radius: 12px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.92);
  outline: none;
  font: inherit;
}

.chat__send {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(139,92,246,0.30);
  background: rgba(139,92,246,0.18);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.foot {
  border-top: 1px solid var(--stroke);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 9, 14, 0.50);
  backdrop-filter: blur(10px);
}

.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.dot--online { background: var(--good); box-shadow: 0 0 0 4px rgba(52,211,153,0.12); }
.dot--live { background: var(--bad); box-shadow: 0 0 0 4px rgba(251,113,133,0.16); }
.dot--vod { background: rgba(255,255,255,0.34); box-shadow: 0 0 0 4px rgba(255,255,255,0.06); }

.chip {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(251,113,133,0.35);
  background: rgba(251,113,133,0.10);
}

@media (max-width: 1200px) {
  :root { --chat: 320px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  body { overflow: auto; }
  .layout { height: auto; min-height: calc(100vh - var(--top)); grid-template-columns: 1fr; }
  .side { display: none; }
  .watch { grid-template-columns: 1fr; }
  .chat { border-left: none; border-top: 1px solid var(--stroke); height: 520px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .searchOverlay { padding: calc(var(--top) + 8px) 10px 10px; }
  .searchOverlay__item { grid-template-columns: 130px 1fr auto; }
  .searchOverlay__thumb { height: 72px; }
}

@media (max-width: 620px) {
  .top { grid-template-columns: 1fr; height: auto; }
  .top__center { justify-content: stretch; }
  .search { width: 100%; }
  .channelCard { flex-direction: column; align-items: flex-start; }
  .channelCard__right { width: 100%; justify-content: space-between; }
  .grid { grid-template-columns: 1fr; }
  .searchOverlay { padding-top: 86px; }
  .searchOverlay__head { padding: 10px; }
  .searchOverlay__item { grid-template-columns: 88px 1fr; gap: 10px; }
  .searchOverlay__thumb { height: 58px; }
  .searchOverlay__itemTitle { font-size: 13px; }
  .searchOverlay__itemMeta { font-size: 11px; margin-top: 4px; }
  .searchOverlay__live {
    grid-column: 2;
    justify-self: start;
    margin-top: -2px;
    padding: 4px 8px;
  }
}
