/* ============================================================
   JoyTV — Global Styles
   Modern, glassy, fully responsive (mobile → 4K)
   ============================================================ */

:root {
  /* palette */
  --bg: #07060f;
  --bg-2: #0b0a1a;
  --surface: rgba(22, 20, 41, 0.62);
  --surface-2: rgba(30, 27, 56, 0.7);
  --surface-solid: #14122a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ecebff;
  --text-dim: #a7a3c9;
  --text-mut: #6f6b93;

  --brand: #7c5cff;
  --brand-2: #ff5cc8;
  --brand-3: #2de2e6;
  --accent-grad: linear-gradient(120deg, #7c5cff 0%, #b15cff 40%, #ff5cc8 75%, #ff8a5c 100%);
  --accent-grad-2: linear-gradient(120deg, #2de2e6, #7c5cff 55%, #ff5cc8);

  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;

  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 0 1px var(--line), 0 22px 60px -20px rgba(124, 92, 255, 0.45);

  --topbar-h: 66px;
  --side-w: 280px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Light theme ---------- */
html[data-theme="light"] {
  --bg: #eceef8;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-2: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --line: rgba(26, 24, 48, 0.10);
  --line-strong: rgba(26, 24, 48, 0.18);
  --text: #171430;
  --text-dim: #4b4870;
  --text-mut: #847fa0;
  --shadow: 0 18px 50px -18px rgba(90, 80, 160, 0.28);
  --shadow-glow: 0 0 0 1px var(--line), 0 22px 60px -20px rgba(124, 92, 255, 0.35);
}
html[data-theme="light"] .bg-aurora {
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(124,92,255,.12), transparent 60%),
    radial-gradient(1000px 700px at 0% 100%, rgba(255,92,200,.10), transparent 55%),
    var(--bg);
}
html[data-theme="light"] .blob { opacity: .16; }
html[data-theme="light"] .grid-overlay { background-image:
  linear-gradient(rgba(26,24,48,.04) 1px, transparent 1px),
  linear-gradient(90deg, rgba(26,24,48,.04) 1px, transparent 1px); }
html[data-theme="light"] .topbar { background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.62)); }
html[data-theme="light"] .search input,
html[data-theme="light"] select,
html[data-theme="light"] .seg,
html[data-theme="light"] .server,
html[data-theme="light"] .now-tag,
html[data-theme="light"] .cat-chip,
html[data-theme="light"] .qn em,
html[data-theme="light"] .reset-btn,
html[data-theme="light"] .btn-soft,
html[data-theme="light"] .btn-ghost,
html[data-theme="light"] .pb-btn,
html[data-theme="light"] .share-link input,
html[data-theme="light"] .stgt { background: rgba(26,24,48,.045); }
html[data-theme="light"] .icon-btn:hover { background: rgba(26,24,48,.06); }
html[data-theme="light"] .switch i { background: rgba(26,24,48,.18); }
html[data-theme="light"] .card-thumb { background: linear-gradient(150deg, #eceefb, #dde1f2); }
html[data-theme="light"] .card-thumb .fallback,
html[data-theme="light"] .hero-tv-screen b { color: var(--brand); }
html[data-theme="light"] .toast { background: rgba(255,255,255,.96); color: var(--text); }
html[data-theme="light"] .search-kbd { background: rgba(26,24,48,.04); }
html[data-theme="light"] select option { background: #fff; color: var(--text); }

/* theme + language buttons */
.theme-btn .ic-moon { display: none; }
html[data-theme="light"] .theme-btn .ic-sun { display: none; }
html[data-theme="light"] .theme-btn .ic-moon { display: block; }
.lang-menu { position: absolute; top: calc(var(--topbar-h) - 6px); right: clamp(12px, 3vw, 26px); z-index: 70; width: 180px; max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: modalIn .22s var(--ease); }
.lang-menu[hidden] { display: none; }
.lang-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-dim); text-align: left; }
.lang-opt:hover { background: rgba(124,92,255,.12); color: var(--text); }
.lang-opt.active { color: #fff; background: var(--accent-grad); }
.lang-opt b { font-family: "Space Grotesk"; font-size: 12px; width: 26px; flex: none; opacity: .8; }
.lang-opt.active b { opacity: 1; }

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; margin: 0; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
input, select { font-family: inherit; }

::selection { background: rgba(124, 92, 255, 0.4); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(124,92,255,.5) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(124,92,255,.4); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,92,255,.7); background-clip: content-box; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ============================================================
   Animated background
   ============================================================ */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; background:
    radial-gradient(1200px 800px at 80% -10%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(1000px 700px at 0% 100%, rgba(255,92,200,.14), transparent 55%),
    var(--bg); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; mix-blend-mode: screen; animation: float 22s var(--ease) infinite; }
.blob-1 { width: 46vw; height: 46vw; background: #7c5cff; top: -12vw; left: -8vw; }
.blob-2 { width: 40vw; height: 40vw; background: #ff5cc8; bottom: -14vw; right: -6vw; animation-delay: -7s; }
.blob-3 { width: 30vw; height: 30vw; background: #2de2e6; top: 30%; left: 55%; animation-delay: -13s; opacity:.35; }
.grid-overlay { position:absolute; inset:0; background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 54px 54px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%); }
@keyframes float { 0%,100%{ transform: translate(0,0) scale(1);} 33%{ transform: translate(4vw,3vw) scale(1.08);} 66%{ transform: translate(-3vw,2vw) scale(.95);} }

/* ============================================================
   Top bar
   ============================================================ */
.topbar { position: sticky; top: 0; z-index: 60; backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: linear-gradient(180deg, rgba(8,7,18,.85), rgba(8,7,18,.55));
  border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 14px; height: var(--topbar-h); padding: 0 clamp(12px, 3vw, 26px); max-width: 1700px; margin: 0 auto; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; }
.logo { width: 42px; height: 42px; overflow: visible; filter: drop-shadow(0 6px 16px rgba(124,92,255,.55)); }
.logo-shine { animation: logoShine 4.5s var(--ease) infinite; }
.logo-play { transform-origin: 25px 26px; animation: logoPlay 2.6s var(--ease) infinite; }
.logo-ant { animation: logoAnt 3.2s var(--ease) infinite; }
@keyframes logoShine { 0% { transform: translateX(0); } 50%, 100% { transform: translateX(72px); } }
@keyframes logoPlay { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.13); } }
@keyframes logoAnt { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.brand-text { font-family: "Space Grotesk"; font-weight: 700; font-size: 22px; letter-spacing: -.5px; }
.brand-text.small { font-size: 18px; }
.brand-accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 3px 8px; border-radius: 99px; background: rgba(251,113,133,.16); color: #ffb3c0; border: 1px solid rgba(251,113,133,.35); }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #ff5c7a; box-shadow: 0 0 0 0 rgba(255,92,122,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%{ box-shadow:0 0 0 0 rgba(255,92,122,.7);} 70%{ box-shadow:0 0 0 7px rgba(255,92,122,0);} 100%{box-shadow:0 0 0 0 rgba(255,92,122,0);} }

.search { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
.search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-mut); width: 18px; height: 18px; }
.search input { width: 100%; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); padding: 0 44px 0 42px; font-size: 14.5px; transition: border-color .2s, background .2s, box-shadow .2s; }
.search input::placeholder { color: var(--text-mut); }
.search input:focus { outline: none; border-color: rgba(124,92,255,.6); background: rgba(124,92,255,.07); box-shadow: 0 0 0 4px rgba(124,92,255,.12); }
.search-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--text-mut); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; background: rgba(255,255,255,.03); }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--text-dim); border: 1px solid transparent; transition: .18s var(--ease); }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.06); border-color: var(--line); }
.icon-btn.is-active { color: #ffb3c0; background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.3); }
.badge-dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--brand-2); color:#fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg-2); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line); transition: .18s var(--ease); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--line-strong); }
.menu-btn { display: none; }

/* ============================================================
   Layout
   ============================================================ */
.layout { display: grid; grid-template-columns: var(--side-w) 1fr; max-width: 1700px; margin: 0 auto; align-items: start; }

.sidebar { position: sticky; top: var(--topbar-h); height: calc(100dvh - var(--topbar-h)); }
.sidebar-scroll { height: 100%; overflow-y: auto; padding: 22px 16px 30px; display: flex; flex-direction: column; gap: 22px; }
.sidebar-scrim { display: none; }

.side-block { display: flex; flex-direction: column; gap: 10px; }
.side-title { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-mut); padding-left: 4px; }

.quick-nav { display: flex; flex-direction: column; gap: 4px; }
.qn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-dim); font-weight: 600; font-size: 14px; transition: .16s var(--ease); }
.qn .ic { width: 19px; height: 19px; }
.qn em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-mut); background: rgba(255,255,255,.05); padding: 1px 8px; border-radius: 99px; }
.qn:hover { background: rgba(255,255,255,.05); color: var(--text); }
.qn.active { color: #fff; background: linear-gradient(100deg, rgba(124,92,255,.28), rgba(255,92,200,.16)); box-shadow: inset 0 0 0 1px rgba(124,92,255,.4); }
.qn.active em { background: rgba(255,255,255,.16); color:#fff; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--text-dim); background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: .16s var(--ease); }
.cat-chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.cat-chip.active { color: #fff; background: rgba(124,92,255,.2); border-color: rgba(124,92,255,.55); }
.cat-ic { width: 15px; height: 15px; opacity: .8; flex: none; }
.cat-chip.active .cat-ic { opacity: 1; }
.cat-chip em { font-style: normal; font-size: 11px; opacity: .55; }
.cat-chip.active em { opacity: .85; }
.skeleton-chip { width: 78px; height: 32px; border-radius: 11px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0%{ background-position: 200% 0;} 100%{ background-position: -200% 0;} }

.select-wrap { position: relative; }
.select-wrap .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-mut); pointer-events: none; }
.select-wrap::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--text-mut); border-bottom: 2px solid var(--text-mut); transform: translateY(-65%) rotate(45deg); pointer-events: none; }
select { width: 100%; height: 44px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text); padding: 0 36px 0 38px; font-size: 14px; appearance: none; -webkit-appearance: none; transition: .18s var(--ease); }
select:focus { outline: none; border-color: rgba(124,92,255,.6); box-shadow: 0 0 0 4px rgba(124,92,255,.12); }
select option { background: var(--surface-solid); color: var(--text); }

.seg { display: flex; gap: 4px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg-btn { flex: 1; height: 34px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); transition: .15s var(--ease); }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { color: #fff; background: var(--accent-grad); box-shadow: 0 4px 14px -6px rgba(124,92,255,.8); }

.switch-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); padding: 4px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.12); transition: .2s; }
.switch i::after { content:""; position:absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background:#fff; transition: .2s var(--ease); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }

.reset-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--text-dim); border: 1px solid var(--line); transition: .16s; }
.reset-btn .ic { width: 16px; height: 16px; }
.reset-btn:hover { color: var(--text); background: rgba(255,255,255,.05); }

.side-foot { margin-top: auto; font-size: 11.5px; color: var(--text-mut); line-height: 1.6; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.side-foot a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   Main / Hero
   ============================================================ */
.main { min-width: 0; padding: 22px clamp(14px, 3vw, 34px) 60px; }

.hero { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; padding: clamp(24px, 4vw, 46px); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(255,92,200,.08) 50%, rgba(45,226,230,.08));
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero::after { content:""; position:absolute; inset:0; background: radial-gradient(600px 300px at 90% 0%, rgba(45,226,230,.18), transparent 60%); pointer-events:none; }
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.hero-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero-title { font-size: clamp(30px, 5vw, 54px); font-weight: 700; letter-spacing: -1.5px; margin: 16px 0 12px; }
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--text-dim); font-size: clamp(14px, 1.5vw, 17px); max-width: 52ch; margin: 0 0 22px; }
.hero-stats { display: flex; gap: 28px; margin-bottom: 26px; }
.stat b { font-family: "Space Grotesk"; font-size: clamp(22px, 3vw, 30px); display: block; background: var(--accent-grad-2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12.5px; color: var(--text-mut); text-transform: uppercase; letter-spacing: 1px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 24px; border-radius: 14px; font-weight: 700; font-size: 15px; color: #fff; background: var(--accent-grad); box-shadow: 0 12px 30px -10px rgba(124,92,255,.8); transition: .18s var(--ease); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -10px rgba(124,92,255,.9); }
.btn-primary:active { transform: translateY(0); }
.btn-soft { display: inline-flex; align-items: center; height: 50px; padding: 0 22px; border-radius: 14px; font-weight: 600; font-size: 15px; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line-strong); transition: .18s var(--ease); }
.btn-soft:hover { background: rgba(255,255,255,.12); }

.hero-art { position: relative; z-index: 1; display: grid; place-items: center; }
.hero-tv { width: min(320px, 80%); aspect-ratio: 4/3; border-radius: 22px; padding: 14px; background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); border: 1px solid var(--line-strong); box-shadow: var(--shadow); transform: perspective(900px) rotateY(-14deg) rotateX(5deg); }
.hero-tv-screen { position: relative; width: 100%; height: 100%; border-radius: 14px; background: radial-gradient(circle at 30% 20%, rgba(124,92,255,.5), #0a0820); display: grid; place-content: center; grid-auto-flow: column; overflow: hidden; }
.hero-tv-screen b { font-family: "Space Grotesk"; font-size: 38px; font-weight: 700; color: #fff; }
.hero-tv-screen b.accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scan { position: absolute; left: 0; right: 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(255,255,255,.12), transparent); animation: scanmove 3.4s linear infinite; }
@keyframes scanmove { 0%{ transform: translateY(-120%);} 100%{ transform: translateY(280%);} }

/* ============================================================
   Player
   ============================================================ */
.player-section { margin-bottom: 30px; animation: rise .4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none; } }
.player-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }

.video-shell { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-glow); border: 1px solid var(--line); }
.video-shell video { width: 100%; height: 100%; object-fit: contain; background:#000; display:block; }
.video-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: linear-gradient(180deg, rgba(0,0,0,.7), transparent); pointer-events: none; transition: opacity .25s; z-index: 3; }
.vt-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vt-logo { width: 38px; height: 38px; border-radius: 9px; object-fit: contain; background: rgba(255,255,255,.1); padding: 3px; flex: none; }
.vt-logo:not([src]), .vt-logo[src=""] { visibility: hidden; }
.vt-meta { min-width: 0; }
.vt-meta strong { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-meta span { font-size: 12px; color: var(--text-dim); }
.vt-right { display: flex; align-items: center; gap: 8px; flex: none; }
.q-badge { font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 3px 8px; border-radius: 7px; background: rgba(124,92,255,.25); border: 1px solid rgba(124,92,255,.5); color: #d6ccff; }
.onair { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 3px 8px; border-radius: 7px; background: rgba(255,0,0,.18); border: 1px solid rgba(255,80,80,.4); color: #ff9a9a; }
.onair i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; animation: pulse 1.6s infinite; }
.video-shell.playing .video-top { opacity: 0; }
.video-shell.playing:hover .video-top { opacity: 1; }

.video-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: radial-gradient(circle at 50% 45%, rgba(20,18,42,.55), rgba(0,0,0,.8)); color: var(--text-dim); text-align: center; padding: 20px; z-index: 2; transition: opacity .3s; pointer-events: none; }
.video-state[hidden] { display: none; }
.video-state p { margin: 0; font-size: 14px; max-width: 38ch; }
.video-state .retry-inline { pointer-events: auto; margin-top: 4px; display: inline-flex; align-items:center; gap:8px; height: 40px; padding: 0 18px; border-radius: 11px; font-weight: 700; color:#fff; background: var(--accent-grad); }
.video-state .retry-inline .ic { width: 17px; height: 17px; }
.video-state .tap-play { pointer-events: auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); box-shadow: 0 14px 40px -10px rgba(124,92,255,.9); transition: transform .2s var(--ease); animation: tapPulse 2s var(--ease) infinite; }
.video-state .tap-play:hover { transform: scale(1.07); }
.video-state .tap-play:active { transform: scale(.96); }
.video-state .tap-play svg { width: 34px; height: 34px; fill: #fff; margin-left: 4px; }
@keyframes tapPulse { 0%,100% { box-shadow: 0 14px 40px -10px rgba(124,92,255,.9), 0 0 0 0 rgba(124,92,255,.5); } 50% { box-shadow: 0 14px 40px -10px rgba(124,92,255,.9), 0 0 0 14px rgba(124,92,255,0); } }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.player-bar { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pb-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 13.5px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--line); transition: .16s var(--ease); }
.pb-btn .ic { width: 18px; height: 18px; }
.pb-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-strong); transform: translateY(-1px); }
.pb-btn.is-active { color: #ffb3c0; border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.12); }
.pb-btn.is-active .ic { fill: rgba(251,113,133,.3); }
.pb-close { margin-left: auto; }
.pb-close:hover { color: var(--bad); border-color: rgba(251,113,133,.4); }

.player-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(12px); }
.side-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.side-card-head h3 { font-size: 15px; font-weight: 700; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--brand-3); padding: 5px 10px; border-radius: 9px; background: rgba(45,226,230,.1); border: 1px solid rgba(45,226,230,.3); transition: .15s; }
.mini-btn .ic { width: 15px; height: 15px; }
.mini-btn:hover { background: rgba(45,226,230,.2); }
.mini-btn[disabled] { opacity: .6; cursor: progress; }

.server-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.server { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); cursor: pointer; transition: .15s var(--ease); text-align: left; width: 100%; }
.server:hover { border-color: var(--line-strong); background: rgba(255,255,255,.06); }
.server.active { border-color: rgba(124,92,255,.6); background: rgba(124,92,255,.14); }
.server-ix { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(124,92,255,.18); color: #cbbcff; flex: none; }
.server.active .server-ix { background: var(--accent-grad); color:#fff; }
.server-info { min-width: 0; flex: 1; }
.server-info b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-info small { font-size: 11.5px; color: var(--text-mut); }
.server-status { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-mut); }
.server-status.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.server-status.bad { background: var(--bad); }
.server-status.checking { background: var(--warn); animation: pulse 1s infinite; }

.now-body { display: flex; gap: 12px; }
.now-body img { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: rgba(255,255,255,.08); padding: 5px; flex: none; }
.now-body strong { font-size: 15px; }
.now-body p { font-size: 12.5px; color: var(--text-dim); margin: 3px 0 8px; }
.now-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.now-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text-dim); border: 1px solid var(--line); }
.tag-ic { width: 13px; height: 13px; flex: none; opacity: .8; }
.now-tag b.cc { font-size: 9.5px; font-weight: 800; letter-spacing: .4px; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.12); color: #fff; }
.now-site { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--brand-3); }
.now-site .ic { width: 15px; height: 15px; }

/* Theater mode */
.theater .hero, .theater .sidebar { display: none; }
.theater .layout { grid-template-columns: 1fr; }
.theater .player-grid { grid-template-columns: 1fr; }
.theater .player-main { max-width: 1300px; margin: 0 auto; width: 100%; }
.theater .player-side { max-width: 1300px; margin: 0 auto; width: 100%; flex-direction: row; flex-wrap: wrap; }
.theater .player-side .side-card { flex: 1; min-width: 280px; }

/* ============================================================
   Content / Grid
   ============================================================ */
.content { scroll-margin-top: calc(var(--topbar-h) + 14px); }
.content-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.ch-title h2 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; }
.result-count { font-size: 13px; color: var(--text-mut); }
.ch-tools { display: flex; gap: 10px; }
.sort-wrap { position: relative; }
.sort-wrap .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-mut); pointer-events: none; }
.sort-wrap select { width: auto; min-width: 165px; padding-left: 34px; height: 42px; }
.sort-wrap::after { content:""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--text-mut); border-bottom: 2px solid var(--text-mut); transform: translateY(-65%) rotate(45deg); pointer-events: none; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.active-filters:empty { display: none; }
.af-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 6px 8px 6px 12px; border-radius: 99px; background: rgba(124,92,255,.16); border: 1px solid rgba(124,92,255,.4); color: #d6ccff; }
.af-chip button { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); color:#fff; }
.af-chip button:hover { background: rgba(255,255,255,.3); }
.af-chip button svg { width: 11px; height: 11px; stroke-width: 2.5; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }

.card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); border-color: rgba(124,92,255,.5); box-shadow: 0 18px 40px -20px rgba(124,92,255,.6); }
.card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.card.active { border-color: rgba(124,92,255,.8); box-shadow: var(--shadow-glow); }
.card-thumb { position: relative; aspect-ratio: 16/10; background: linear-gradient(150deg, #1a1738, #0e0c22); display: grid; place-items: center; overflow: hidden; }
.card-thumb img { width: 64%; height: 64%; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0,0,0,.5)); transition: transform .3s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.06); }
.card-thumb .fallback { font-family: "Space Grotesk"; font-weight: 700; font-size: 26px; color: #fff; opacity: .9; text-align:center; padding: 0 10px; line-height:1.1; }
.card-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7,6,15,.45); opacity: 0; transition: opacity .2s; }
.card:hover .card-play { opacity: 1; }
.card-play span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); box-shadow: 0 8px 24px -6px rgba(124,92,255,.9); transform: scale(.8); transition: transform .25s var(--ease); }
.card:hover .card-play span { transform: scale(1); }
.card-play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.card-flag { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; letter-spacing: .5px; line-height: 1; padding: 3px 6px; border-radius: 6px; color: #fff; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.16); }
.card-q { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; letter-spacing: .4px; padding: 3px 7px; border-radius: 6px; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.card-fav { position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.15); color: #fff; opacity: 0; transform: translateY(4px); transition: .18s var(--ease); z-index: 4; }
.card:hover .card-fav { opacity: 1; transform: none; }
.card-fav .ic { width: 16px; height: 16px; }
.card-fav.on { opacity: 1; transform: none; color: #ff6b96; background: rgba(251,113,133,.2); }
.card-fav.on .ic { fill: #ff6b96; }
.card-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 5px; }
.card-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-mut); }
.card-cat { text-transform: capitalize; }
.card-servers { display: inline-flex; align-items: center; gap: 4px; }
.card-servers::before { content:""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }

/* skeleton card */
.sk-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.sk-card .sk-thumb { aspect-ratio: 16/10; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-card .sk-line { height: 11px; margin: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-card .sk-line.short { width: 50%; }

.state-block { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.state-block[hidden] { display: none; }
.state-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; box-shadow: var(--shadow); }
.state-ic svg { width: 30px; height: 30px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.state-block h3 { font-size: 20px; }
.state-block p { color: var(--text-dim); margin: 0 0 8px; }

.grid-loader { display: none; justify-content: center; padding: 26px; }
.grid-loader.on { display: flex; }
.grid-loader::after { content:""; width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.sentinel { height: 1px; }
.load-more { display: block; margin: 22px auto 0; height: 46px; padding: 0 26px; border-radius: 12px; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); }
.load-more:hover { background: rgba(255,255,255,.12); }

/* footer */
.footer { margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--text-mut); }
.footer-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.footer-row p { font-size: 12.5px; line-height: 1.7; max-width: 80ch; margin: 0; }
.footer-row a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.footer-meta { display: flex; justify-content: space-between; margin-top: 18px; font-size: 12px; }

/* ============================================================
   FIFA World Cup highlight
   ============================================================ */
/* sidebar nav item */
.fifa-nav { position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(100deg, rgba(16,185,129,.30), rgba(245,158,11,.24));
  box-shadow: inset 0 0 0 1px rgba(255,205,90,.45); }
.fifa-nav:hover { background: linear-gradient(100deg, rgba(16,185,129,.42), rgba(245,158,11,.34)); }
.fifa-nav.active { color: #fff; background: linear-gradient(100deg, rgba(16,185,129,.5), rgba(245,158,11,.42)); box-shadow: inset 0 0 0 1px rgba(255,205,90,.7); }
.fifa-nav > span:nth-of-type(2) { font-weight: 700; }
.fifa-trophy { width: 19px; height: 19px; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); transform-origin: 50% 80%; animation: trophyBob 2.8s var(--ease) infinite; }
.fifa-live { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 2px 7px; border-radius: 99px; background: rgba(255,70,70,.2); border: 1px solid rgba(255,90,90,.4); color: #ffcad1; }
.fifa-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; animation: pulse 1.6s infinite; }
.fifa-nav::after { content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none; animation: fifaGlow 3s ease-in-out infinite; }
.fifa-nav-shine { position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-18deg); animation: shineSweep 4.2s ease-in-out infinite; pointer-events: none; }
@keyframes trophyBob { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-2px) rotate(5deg); } }
@keyframes fifaGlow { 0%,100% { box-shadow: 0 0 0 1px rgba(255,210,90,.0); } 50% { box-shadow: 0 0 14px rgba(255,200,80,.5); } }
@keyframes shineSweep { 0% { left: -60%; } 38%,100% { left: 150%; } }

/* featured banner */
.fifa-banner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(16px, 2.6vw, 26px); margin-bottom: 22px; border-radius: var(--radius-lg); cursor: pointer;
  background: linear-gradient(115deg, #0a3d2c 0%, #0e5c3f 28%, #137a4f 52%, #c08a16 100%);
  background-size: 220% 220%; animation: fifaGradient 11s ease infinite, fadeUp .6s var(--ease) backwards .1s;
  border: 1px solid rgba(255,215,120,.4);
  box-shadow: 0 22px 54px -24px rgba(19,122,79,.85), inset 0 0 0 1px rgba(255,255,255,.05);
  transition: transform .25s var(--ease), box-shadow .25s; }
.fifa-banner:hover { transform: translateY(-3px); box-shadow: 0 30px 64px -22px rgba(19,122,79,1); }
.fifa-banner:active { transform: translateY(-1px); }
.fifa-banner:focus-visible { outline: 2px solid #ffd56b; outline-offset: 3px; }
@keyframes fifaGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.fifa-pitch { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 78px);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); }
.fifa-shine { position: absolute; top: 0; left: -30%; width: 22%; height: 100%; transform: skewX(-18deg); pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); animation: shineSweep 5.5s ease-in-out infinite 1s; }
.fifa-banner-left { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; min-width: 0; }
.fifa-banner-trophy { width: clamp(42px, 6vw, 62px); height: clamp(42px, 6vw, 62px); flex: none; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); transform-origin: 50% 85%; animation: trophyBob 3.2s var(--ease) infinite; }
.fifa-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: #ffe9b0; }
.fifa-tag i { width: 7px; height: 7px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 9px #ff5a5a; animation: pulse 1.6s infinite; }
.fifa-banner-text h3 { font-size: clamp(20px, 3vw, 30px); color: #fff; margin: 7px 0 4px; letter-spacing: -.5px; }
.fifa-banner-text p { font-size: clamp(12.5px, 1.4vw, 14.5px); color: rgba(255,255,255,.84); margin: 0; max-width: 48ch; }
.fifa-banner-right { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.fifa-ball { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); animation: ballSpin 7s linear infinite; }
@keyframes ballSpin { to { transform: rotate(360deg); } }
.fifa-cta { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 13px; font-weight: 800; font-size: 15px; color: #0a3d2c; white-space: nowrap;
  background: linear-gradient(180deg, #ffe08a, #f5b301); box-shadow: 0 10px 24px -8px rgba(245,179,1,.8); transition: .18s var(--ease); }
.fifa-cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 32px -8px rgba(245,179,1,.95); }
.fifa-cta .ic { width: 18px; height: 18px; }

/* ============================================================
   Entrance & scroll-reveal animations ("little by little")
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* topbar drops in once */
.topbar { animation: slideDown .55s var(--ease); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }

/* hero contents stagger in (backwards fill -> never locks hover transforms) */
.hero-eyebrow { animation: fadeUp .6s var(--ease) backwards .05s; }
.hero-title   { animation: fadeUp .6s var(--ease) backwards .14s; }
.hero-sub     { animation: fadeUp .6s var(--ease) backwards .23s; }
.hero-stats   { animation: fadeUp .6s var(--ease) backwards .32s; }
.hero-cta     { animation: fadeUp .6s var(--ease) backwards .41s; }
.hero-art     { animation: fadeUp .8s var(--ease) backwards .28s; }

/* sidebar blocks ease in */
.sidebar-scroll > .side-block { animation: fadeUp .5s var(--ease) backwards; }
.sidebar-scroll > .side-block:nth-child(1) { animation-delay: .06s; }
.sidebar-scroll > .side-block:nth-child(2) { animation-delay: .12s; }
.sidebar-scroll > .side-block:nth-child(3) { animation-delay: .18s; }
.sidebar-scroll > .side-block:nth-child(4) { animation-delay: .24s; }
.sidebar-scroll > .side-block:nth-child(5) { animation-delay: .30s; }

/* each channel card animates in with a small per-batch stagger */
.card { animation: cardIn .5s var(--ease) backwards; animation-delay: var(--d, 0ms); }

/* generic scroll reveal (only on elements without hover transforms) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* gentle interactive feedback */
.btn-primary:active, .fifa-cta:active, .pb-btn:active, .qn:active { transform: scale(.97); }
.cat-chip:active, .seg-btn:active { transform: scale(.96); }

/* ============================================================
   Credit, filter-chip icon, video-state icon
   ============================================================ */
.chip-ic { width: 14px; height: 14px; flex: none; }
.video-state .vs-ic svg { width: 44px; height: 44px; fill: none; stroke: var(--text-dim); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.credit-card { display: flex; gap: 11px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(124,92,255,.08); border: 1px solid rgba(124,92,255,.22); margin-bottom: 12px; }
.credit-avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: "Space Grotesk"; font-weight: 700; font-size: 13px; letter-spacing: .5px; color: #fff; background: var(--accent-grad); flex: none; box-shadow: 0 5px 14px -5px rgba(124,92,255,.8); }
.credit-avatar.lg { width: 52px; height: 52px; font-size: 16px; border-radius: 15px; }
.credit-by { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-mut); }
.credit-card strong, .footer-credit strong { font-family: "Space Grotesk"; font-size: 15px; color: var(--text); display: block; letter-spacing: -.2px; }
.credit-card em, .footer-credit em { font-style: normal; font-size: 11px; color: var(--text-dim); }
.footer-credit { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); margin-top: 16px; }
.footer-credit strong { font-size: 17px; }

/* boot screen logo + credit */
.boot-mark { margin-bottom: 2px; }
.logo-boot { width: 80px; height: 80px; overflow: visible; filter: drop-shadow(0 12px 32px rgba(124,92,255,.6)); animation: bootPop .6s var(--ease) both; }
@keyframes bootPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.boot-credit { margin-top: 4px; font-size: 11.5px; color: var(--text-mut); letter-spacing: .3px; }

/* ============================================================
   Skip link (a11y)
   ============================================================ */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 400; background: var(--brand); color: #fff; padding: 11px 18px; font-weight: 700; border-radius: 0 0 12px 0; }
.skip-link:focus { left: 0; outline: 2px solid #fff; outline-offset: -4px; }

/* ============================================================
   Share modal
   ============================================================ */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 18px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(5,4,12,.62); backdrop-filter: blur(5px); animation: fade .25s; }
.modal-card { position: relative; width: min(440px, 100%); background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); animation: modalIn .3s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-dim); }
.modal-x:hover { background: rgba(255,255,255,.08); color: var(--text); }
.modal-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal-card h3 { font-size: 21px; }
.modal-sub { color: var(--text-dim); font-size: 13.5px; margin: 5px 0 18px; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-link { display: flex; gap: 8px; margin-bottom: 18px; }
.share-link input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text-dim); padding: 0 14px; font-size: 13px; }
.share-link input:focus { outline: none; border-color: rgba(124,92,255,.6); }
.share-copy { flex: none; height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 14px; color: #fff; background: var(--accent-grad); box-shadow: 0 8px 20px -8px rgba(124,92,255,.8); transition: .16s var(--ease); }
.share-copy:hover { transform: translateY(-1px); }
.share-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); gap: 10px; }
.stgt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 13px 6px; border-radius: 14px; font-size: 12px; font-weight: 600; color: var(--text-dim); border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: .16s var(--ease); }
.stgt:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); }
.stgt-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: "Space Grotesk"; font-weight: 700; font-size: 19px; }
.stgt-ic svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stgt-ic.wa { background: #25d366; } .stgt-ic.tg { background: #2aabee; } .stgt-ic.fb { background: #1877f2; }
.stgt-ic.x { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); } .stgt-ic.em { background: var(--brand); }
.stgt-ic.sys { background: var(--surface-2); border: 1px solid var(--line); }
body.modal-open { overflow: hidden; }

/* ============================================================
   Privacy consent banner
   ============================================================ */
.consent[hidden] { display: none; }
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 180; width: min(380px, calc(100vw - 32px)); animation: rise .45s var(--ease); }
.consent-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 15px; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.consent-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(124,92,255,.15); color: var(--brand); flex: none; }
.consent-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.consent-card p { flex: 1; min-width: 170px; margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.consent-btns { display: flex; gap: 8px; margin-left: auto; }
.consent-no { height: 38px; padding: 0 14px; border-radius: 11px; font-weight: 600; font-size: 13px; color: var(--text-dim); border: 1px solid var(--line); }
.consent-no:hover { color: var(--text); background: rgba(124,92,255,.08); }
.consent-yes { height: 38px; padding: 0 18px; border-radius: 11px; font-weight: 700; font-size: 13px; color: #fff; background: var(--accent-grad); box-shadow: 0 8px 20px -8px rgba(124,92,255,.8); }
.consent-yes:hover { transform: translateY(-1px); }
@media (max-width: 620px) { .consent { left: 10px; bottom: 10px; width: calc(100vw - 20px); } }

/* ============================================================
   Toasts
   ============================================================ */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: 92vw; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 13px; background: rgba(20,18,42,.92); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 500; backdrop-filter: blur(12px); animation: toastIn .3s var(--ease); pointer-events: auto; }
.toast .ic { width: 18px; height: 18px; }
.toast.ok { border-color: rgba(52,211,153,.4); } .toast.ok .ic { color: var(--ok); }
.toast.bad { border-color: rgba(251,113,133,.4); } .toast.bad .ic { color: var(--bad); }
.toast.info .ic { color: var(--brand-3); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96);} to { opacity:1; transform: none;} }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96);} }

/* ============================================================
   Boot loader
   ============================================================ */
.boot { position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--bg); transition: opacity .5s, visibility .5s; }
.boot.hide { opacity: 0; visibility: hidden; }
.boot-logo span { font-family: "Space Grotesk"; font-size: 42px; font-weight: 700; letter-spacing: -1px; }
.boot-logo b { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-bar { width: 220px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: var(--accent-grad); animation: bootslide 1.1s var(--ease) infinite; }
@keyframes bootslide { 0%{ transform: translateX(-100%);} 100%{ transform: translateX(350%);} }
.boot p { color: var(--text-mut); font-size: 13.5px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .player-grid { grid-template-columns: 1fr; }
  .player-side { flex-direction: row; flex-wrap: wrap; }
  .player-side .side-card { flex: 1; min-width: 260px; }
}

@media (max-width: 920px) {
  :root { --side-w: 0px; }
  .menu-btn { display: grid; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: 0; width: min(310px, 86vw); height: 100dvh; z-index: 90; background: var(--bg-2); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .32s var(--ease); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .sidebar-scroll { padding-top: 18px; }
  body.drawer-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); animation: fade .25s; }
  @keyframes fade { from { opacity: 0; } }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .search-kbd { display: none; }
}

@media (max-width: 620px) {
  .topbar-inner { gap: 8px; }
  .brand-text { display: none; }
  .live-pill { display: none; }
  .share-btn span { display: none; }
  .share-btn { padding: 0; width: 42px; justify-content: center; }
  .sourceBtn { display: none; }
  .search { max-width: none; }
  .search input { height: 42px; font-size: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .hero-stats { gap: 18px; }
  .hero-cta { width: 100%; }
  .hero-cta .btn-primary, .hero-cta .btn-soft { flex: 1; justify-content: center; }
  .main { padding: 16px 14px 50px; }
  /* YouTube-style: edge-to-edge video + horizontally scrolling action pills */
  .player-section { margin: 0 -14px 24px; }
  .player-grid { gap: 0; }
  .video-shell { border-radius: 0; border-left: 0; border-right: 0; }
  .player-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0; padding: 12px 14px 4px; gap: 9px; }
  .player-bar::-webkit-scrollbar { display: none; }
  .player-bar .pb-btn { flex: none; height: 40px; }
  .player-bar .pb-close { margin-left: 0; }
  .player-side { padding: 14px 14px 0; }
  .fifa-banner { flex-direction: column; align-items: stretch; }
  .fifa-ball { display: none; }
  .fifa-banner-right { width: 100%; }
  .fifa-cta { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* large screens */
@media (min-width: 1600px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .blob { display: none; }
}

@media (hover: none) {
  .card-fav { opacity: 1; transform: none; }
  .card-play { opacity: 1; background: rgba(7,6,15,.18); }
  .card-play span { transform: scale(.85); }
}
