/* ============ Tokens ============ */
:root {
  --bg: #000;
  --surface: #141519;
  --surface-2: #23252b;
  --surface-3: #2f3138;
  --line: #2b2d33;
  --text: #fff;
  --text-2: #dadada;
  --muted: #a0a0a0;
  --accent: #ff640a;
  --accent-hover: #ff7a2e;
  --accent-ink: #000;
  --star: #ffc12e;
  --dub: #2abdbb;
  --sub: #a7a7ff;
  --danger: #ff5c5c;

  --radius: 6px;
  --gutter: clamp(16px, 4vw, 60px);
  --nav-h: 64px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --fast: 160ms;
  --med: 320ms;
  --slow: 640ms;

  color-scheme: dark;
}

/* ============ Global Scrollbar Hiding ============ */
*, *::before, *::after {
  box-sizing: border-box;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 900; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #000; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #000; padding: 8px 14px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* ============ Nav ============ */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  background: linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,0));
  transition: background var(--med) var(--ease-out), box-shadow var(--med) var(--ease-out);
}
.nav.solid { background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 900; letter-spacing: -0.02em; }
.logo svg { width: 28px; height: 28px; stroke: none; }
.logo svg circle { fill: var(--accent); }
.logo svg path { fill: #000; }
.logo b { color: var(--accent); font-weight: 900; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  position: relative; padding: 8px 12px; font-weight: 700; font-size: 14px; color: var(--text-2);
  transition: color var(--fast);
}
.nav-links a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--med) var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 40px; height: 40px; border-radius: var(--radius); color: var(--text-2);
  transition: background var(--fast), color var(--fast), transform var(--fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.search-trigger { margin-left: auto; padding: 0 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line); min-width: 240px; justify-content: flex-start; }
.search-hint { color: var(--muted); font-size: 14px; }
.search-trigger kbd { margin-left: auto; font: 700 11px/1 'Lato', sans-serif; color: var(--muted); border: 1px solid var(--surface-3); border-radius: 4px; padding: 3px 6px; }
.menu-btn { display: none; }

/* ============ Layout & page transitions ============ */
#app { min-height: 100vh; outline: none; }
.page { animation: pageIn var(--slow) var(--ease-out) both; }
.page.leaving { animation: pageOut 180ms var(--ease-in-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pageOut { to { opacity: 0; transform: translateY(-6px); } }
.container { padding: 0 var(--gutter); }
.page-top { padding-top: calc(var(--nav-h) + 32px); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--slow) var(--ease-out), transform var(--slow) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ============ Hero carousel ============ */
.hero { position: relative; height: min(88vh, 820px); min-height: 520px; overflow: hidden; background: var(--surface); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease-in-out), visibility 0s 300ms; }
.hero-slide.active { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-in-out), visibility 0s; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; transform: scale(1.12); }
.hero-slide.active .hero-bg { animation: kenburns var(--hero-ms, 5000ms) linear forwards; }
@keyframes kenburns { from { transform: scale(1.12) translateX(1%); } to { transform: scale(1) translateX(0); } }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.65) 38%, rgba(0,0,0,0) 72%),
    linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 38%);
}
.hero-content {
  position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(110px, 18vh, 170px);
  width: min(560px, calc(100% - 2 * var(--gutter)));
}
.hero-content > * { opacity: 0; transform: translateY(18px); }
.hero-slide.active .hero-content > * { animation: rise 300ms var(--ease-out) forwards; }
.hero-slide.active .hero-content > *:nth-child(2) { animation-delay: 40ms; }
.hero-slide.active .hero-content > *:nth-child(3) { animation-delay: 80ms; }
.hero-slide.active .hero-content > *:nth-child(4) { animation-delay: 120ms; }
.hero-slide.active .hero-content > *:nth-child(5) { animation-delay: 160ms; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 900; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
.hero h1 { font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.hero-synopsis { color: var(--text-2); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-dots { position: absolute; z-index: 3; left: var(--gutter); bottom: clamp(56px, 9vh, 90px); display: flex; gap: 8px; }
.hero-dot { position: relative; width: 36px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); overflow: hidden; transition: width var(--fast) var(--ease-out); }
.hero-dot::before { content: ''; position: absolute; inset: -10px 0; }
.hero-dot.active { width: 64px; }
.hero-dot span { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero-dot.done span { transform: scaleX(1); }
.hero-dot.active span { animation: fill var(--hero-ms, 5000ms) linear forwards; }
.hero.paused .hero-dot.active span { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.hero-arrows { position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(48px, 8vh, 80px); display: flex; gap: 8px; }
.hero-arrows button { width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; transition: background var(--fast), transform var(--fast); }
.hero-arrows button:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.hero-arrows button:active { transform: scale(.92); }

/* ============ Buttons, badges ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  font-weight: 900; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 2px; transition: background var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast);
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 8px 24px -8px rgba(255,100,10,.7); }
.btn-ghost { border: 2px solid var(--accent); color: var(--accent); }
.btn-ghost:hover { background: rgba(255,100,10,.12); }
.btn-plain { background: var(--surface-2); color: var(--text); }
.btn-plain:hover { background: var(--surface-3); }

.score { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; color: var(--text); }
.score svg { width: 15px; height: 15px; fill: var(--star); stroke: none; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; font-size: 12px; font-weight: 700; border-radius: 3px; background: rgba(255,255,255,.1); color: var(--text-2); white-space: nowrap; }
.lang { display: inline-flex; gap: 4px; }
.lang span { font-size: 11px; font-weight: 900; letter-spacing: .04em; padding: 2px 6px; border-radius: 3px; }
.lang .s { color: var(--sub); background: rgba(167,167,255,.14); }
.lang .d { color: var(--dub); background: rgba(42,189,187,.14); }
.lang .d.partial { color: var(--star); background: rgba(255,193,46,.14); }
.sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

/* ============ Rows / carousels ============ */
.rows { position: relative; z-index: 2; margin-top: -24px; padding-bottom: 40px; }
.row { margin-bottom: 44px; }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); margin-bottom: 14px; }
.row-head h2 { font-size: clamp(19px, 2vw, 24px); }
.row-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.row-more { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; transition: color var(--fast); }
.row-more:hover { color: var(--accent); }
.row-more svg { width: 16px; height: 16px; transition: transform var(--fast); }
.row-more:hover svg { transform: translateX(3px); }
.track-wrap { position: relative; }
.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(140px, 15vw, 210px); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  padding: 8px var(--gutter) 24px; scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.track-btn {
  position: absolute; top: 8px; bottom: 24px; width: calc(var(--gutter) - 4px); min-width: 36px; z-index: 4;
  display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff;
  opacity: 0; transition: opacity var(--med) var(--ease-out), background var(--fast);
}
.track-btn svg { width: 30px; height: 30px; transition: transform var(--fast); }
.track-btn.prev { left: 0; } .track-btn.next { right: 0; }
.track-wrap:hover .track-btn:not([disabled]) { opacity: 1; }
.track-btn:hover svg { transform: scale(1.2); }
.track-btn[disabled] { pointer-events: none; }

/* Top-10 style ranked cards */
.track.ranked { grid-auto-columns: clamp(210px, 22vw, 300px); gap: 22px; }
/* Fixed number column so every poster in the row is exactly the same size, "10" included. */
.ranked-item { display: grid; grid-template-columns: clamp(54px, 5.4vw, 78px) 1fr; align-items: end; }
.ranked-item .card { position: relative; z-index: 1; }
.track.ranked .card-title { height: 39px; }
.track.ranked .card-sub { height: 22px; }
.rank-num {
  /* sits on the poster's bottom edge: title (10 + 39) + sub-line (4 + 22) below it */
  margin-bottom: 75px;
  font-size: clamp(80px, 9vw, 130px); font-weight: 900; line-height: .75; letter-spacing: -0.08em;
  color: #000; -webkit-text-stroke: 2px #6b6b6b; margin-right: -14px; transition: -webkit-text-stroke-color var(--med);
}
.ranked-item:hover .rank-num { -webkit-text-stroke-color: var(--accent); }
.rank-num { justify-self: end; white-space: nowrap; transition: -webkit-text-stroke-color var(--med), transform var(--med) var(--ease-out); }
.rank-num.two { letter-spacing: -0.16em; font-size: clamp(66px, 7.4vw, 108px); }
.ranked-item:hover .rank-num { transform: translateX(-4px); }

/* ============ Card ============ */
.card { position: relative; display: block; opacity: 0; animation: cardIn 560ms var(--ease-out) forwards; animation-delay: calc(min(var(--i, 0), 12) * 45ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.card-poster { position: relative; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out), opacity 400ms; opacity: 0; }
.card-poster img.loaded { opacity: 1; }
.card:hover .card-poster img { transform: scale(1.06); }
.card-tag { position: absolute; top: 8px; left: 8px; z-index: 1; }
.card-tag.airing { background: var(--accent); color: #000; }
.card-hover {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: linear-gradient(180deg, rgba(20,21,25,.88), rgba(20,21,25,.97));
  opacity: 0; transition: opacity var(--med) var(--ease-out);
}
.card-hover > * { transform: translateY(8px); transition: transform var(--med) var(--ease-out); }
.card:hover .card-hover, .card:focus-visible .card-hover { opacity: 1; }
.card:hover .card-hover > *, .card:focus-visible .card-hover > * { transform: none; }
.card-hover h4 { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-hover .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 12.5px; }
.card-hover .syn { color: var(--text-2); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.card-hover .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.card-hover .go svg { width: 16px; height: 16px; }
.card-title { margin-top: 10px; font-size: 14px; line-height: 1.4; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color var(--fast); }
.card:hover .card-title { color: var(--accent); }
.card-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--muted); font-size: 12.5px; }

/* ============ Skeletons ============ */
.sk { background: var(--surface-2); border-radius: 4px; position: relative; overflow: hidden; }
.sk::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-poster { aspect-ratio: 2 / 3; }
.sk-line { height: 12px; margin-top: 10px; width: 80%; }
.sk-hero { height: min(88vh, 820px); min-height: 520px; border-radius: 0; }

/* ============ Detail page ============ */
.detail-hero { position: relative; min-height: 560px; padding: calc(var(--nav-h) + 48px) var(--gutter) 40px; overflow: hidden; }
.detail-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; filter: saturate(1.1); animation: bgIn 1.4s var(--ease-out) both; }
@keyframes bgIn { from { opacity: 0; transform: scale(1.08); } to { opacity: .55; transform: scale(1); } }
.detail-bg.blur { filter: blur(28px) saturate(1.4); transform: scale(1.2); }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #000 2%, rgba(0,0,0,.6) 55%, rgba(0,0,0,.75)), linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.2)); }
.detail-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.detail-poster { border-radius: 6px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0,0,0,.9); animation: posterIn 800ms var(--ease-out) both; }
@keyframes posterIn { from { opacity: 0; transform: translateY(24px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
.detail-main > * { animation: rise 700ms var(--ease-out) both; opacity: 0; }
.detail-main > *:nth-child(2) { animation-delay: 70ms; }
.detail-main > *:nth-child(3) { animation-delay: 140ms; }
.detail-main > *:nth-child(4) { animation-delay: 210ms; }
.detail-main > *:nth-child(5) { animation-delay: 280ms; }
.detail-main > *:nth-child(6) { animation-delay: 350ms; }
.detail-main > *:nth-child(7) { animation-delay: 420ms; }
.detail-alt { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.detail-main h1 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 14px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-2); margin-bottom: 22px; }
.genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--surface-3); font-size: 13px; font-weight: 700; color: var(--text-2); transition: border-color var(--fast), color var(--fast), background var(--fast), transform var(--fast); }
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #000; }

.ratings { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.rating-box { min-width: 128px; padding: 12px 16px; border-radius: 6px; background: rgba(20,21,25,.75); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.rating-box .label { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rating-box .value { display: flex; align-items: baseline; gap: 4px; font-size: 28px; font-weight: 900; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rating-box .value small { font-size: 14px; color: var(--muted); font-weight: 700; }
.rating-box .value svg { width: 20px; height: 20px; fill: var(--star); stroke: none; align-self: center; }
.rating-box .foot { font-size: 12px; color: var(--muted); }
.rating-box.imdb .label { color: #f5c518; }
.rating-bar { height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.rating-bar i { display: block; height: 100%; background: var(--star); transform-origin: left; animation: grow 1.2s var(--ease-out) 400ms both; }
@keyframes grow { from { transform: scaleX(0); } }

.synopsis { color: var(--text-2); font-size: 16px; max-width: 760px; white-space: pre-line; margin-bottom: 22px; }
.synopsis.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { color: var(--accent); font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: -14px 0 22px; display: inline-block; }
.link-btn:hover { text-decoration: underline; }

.countdown { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 6px; background: rgba(255,100,10,.12); border: 1px solid rgba(255,100,10,.35); color: var(--text); margin-bottom: 22px; font-size: 14px; }
.countdown b { color: var(--accent); font-variant-numeric: tabular-nums; }

.section { padding: 32px var(--gutter); }
.section h2 { font-size: 22px; margin-bottom: 18px; }
.info-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.panel h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 14px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; color: var(--text); }
.lang-grid { display: grid; gap: 14px; }
.lang-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 6px; background: var(--surface-2); }
.lang-row .ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.lang-row .ico svg { width: 18px; height: 18px; }
.lang-row.yes .ico { background: rgba(42,189,187,.15); color: var(--dub); }
.lang-row.part .ico { background: rgba(255,193,46,.15); color: var(--star); }
.lang-row.no .ico { background: rgba(255,255,255,.06); color: var(--muted); }
.lang-row strong { display: block; font-size: 14px; }
.lang-row span { font-size: 13px; color: var(--muted); }
.stream-links { display: flex; flex-wrap: wrap; gap: 10px; }
.stream-links a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 4px; background: var(--surface-2); font-weight: 700; font-size: 14px; transition: background var(--fast), transform var(--fast); }
.stream-links a:hover { background: var(--surface-3); transform: translateY(-2px); }
.stream-links svg { width: 15px; height: 15px; color: var(--muted); }

.trailer-thumb { position: relative; display: block; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.trailer-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out), filter var(--med); filter: brightness(.7); }
.trailer-thumb:hover img { transform: scale(1.04); filter: brightness(.55); }
.trailer-thumb .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: transform var(--med) var(--ease-out); box-shadow: 0 0 0 0 rgba(255,100,10,.6); animation: ring 2.2s infinite; }
.trailer-thumb .play svg { width: 30px; height: 30px; fill: #000; stroke: none; margin-left: 4px; }
.trailer-thumb:hover .play { transform: scale(1.1); }
@keyframes ring { 70% { box-shadow: 0 0 0 22px rgba(255,100,10,0); } 100% { box-shadow: 0 0 0 0 rgba(255,100,10,0); } }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.char { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); transition: border-color var(--fast), transform var(--fast); }
.char:hover { border-color: var(--surface-3); transform: translateY(-2px); }
.char img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.char strong { display: block; font-size: 14px; }
.char span { display: block; font-size: 12.5px; color: var(--muted); }

/* ============ Browse ============ */
.browse-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.browse-head h1 { font-size: clamp(26px, 3vw, 36px); }
.browse-head p { color: var(--muted); margin-top: 4px; }
.filters { position: sticky; top: var(--nav-h); z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0; margin-bottom: 18px; background: rgba(0,0,0,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.select { position: relative; }
.select select {
  appearance: none; height: 38px; padding: 0 34px 0 12px; border-radius: 4px; border: 1px solid var(--surface-3);
  background: var(--surface); color: var(--text); font: 700 13.5px 'Lato', sans-serif; cursor: pointer; transition: border-color var(--fast);
}
.select select:hover, .select select:focus { border-color: var(--accent); outline: none; }
.select::after { content: ''; position: absolute; right: 13px; top: 15px; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--surface-3); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: border-color var(--fast), background var(--fast), color var(--fast); }
.toggle.on { border-color: var(--dub); background: rgba(42,189,187,.12); color: var(--dub); }
.toggle .box { width: 16px; height: 16px; border-radius: 3px; border: 2px solid currentColor; display: grid; place-items: center; }
.toggle .box svg { width: 11px; height: 11px; stroke-width: 3.5; opacity: 0; transform: scale(.4); transition: opacity var(--fast), transform var(--fast) var(--ease-out); }
.toggle.on .box svg { opacity: 1; transform: none; }
.filter-q { flex: 1 1 200px; min-width: 160px; height: 38px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--surface-3); background: var(--surface); color: var(--text); font: 700 13.5px 'Lato', sans-serif; }
.filter-q:focus { outline: none; border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 42vw), 1fr)); gap: 28px 18px; }
.loader-row { display: grid; place-items: center; padding: 40px 0 60px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Schedule ============ */
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin-bottom: 26px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 auto; min-width: 104px; padding: 12px 16px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: background var(--fast), border-color var(--fast), transform var(--fast); }
.day:hover { border-color: var(--surface-3); transform: translateY(-2px); }
.day small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.day strong { font-size: 16px; }
.day.on { background: var(--accent); border-color: var(--accent); color: #000; }
.day.on small { color: rgba(0,0,0,.65); }
.timeline { display: grid; gap: 10px; }
.slot { display: grid; grid-template-columns: 82px 64px 1fr auto; gap: 16px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); opacity: 0; animation: slideIn 500ms var(--ease-out) forwards; animation-delay: calc(min(var(--i, 0), 14) * 40ms); transition: border-color var(--fast), background var(--fast); }
.slot:hover { border-color: var(--accent); background: var(--surface-2); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.slot time { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; text-align: center; }
.slot.past time { color: var(--muted); }
.slot img { width: 64px; height: 88px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.slot h3 { font-size: 16px; margin-bottom: 4px; }
.slot .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 13px; }
.slot .ep { font-weight: 900; color: var(--accent); font-size: 13px; text-align: right; white-space: nowrap; }
.slot .ep small { display: block; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============ Search overlay ============ */
.search-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.75); backdrop-filter: blur(6px); display: flex; justify-content: center; padding: 10vh 16px 16px; animation: fadeIn 200ms var(--ease-out); }
.search-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.search-panel { width: min(720px, 100%); max-height: 80vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px -20px #000; animation: panelIn 320ms var(--ease-out); }
@keyframes panelIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
.search-bar { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); }
.search-bar > svg { color: var(--muted); }
.search-bar input { flex: 1; height: 48px; background: none; border: 0; color: var(--text); font: 700 18px 'Lato', sans-serif; outline: none; min-width: 0; }
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-results { overflow-y: auto; padding: 8px; scrollbar-width: none !important; -ms-overflow-style: none !important; }
.search-results::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.search-empty { padding: 28px; text-align: center; color: var(--muted); }
.result { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 6px; opacity: 0; animation: rise 360ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 30ms); transform: translateY(8px); }
.result:hover, .result.sel { background: var(--surface-2); }
.result img { width: 48px; height: 68px; object-fit: cover; border-radius: 3px; background: var(--surface-2); }
.result strong { display: block; font-size: 15px; }
.result .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 2px; }
.search-all { display: block; margin: 6px; padding: 12px; text-align: center; border-radius: 6px; background: var(--surface-2); color: var(--accent); font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.search-all:hover { background: var(--surface-3); }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); animation: fadeIn 240ms; }
.modal-body { position: relative; width: min(1100px, 100%); animation: panelIn 360ms var(--ease-out); }
.modal-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.modal-frame iframe { width: 100%; height: 100%; border: 0; }
.modal-close { position: absolute; top: -48px; right: 0; color: #fff; }

/* ============ States & footer ============ */
.state { display: grid; place-items: center; gap: 14px; text-align: center; padding: calc(var(--nav-h) + 80px) var(--gutter) 80px; color: var(--muted); }
.state h2 { color: var(--text); font-size: 24px; }
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 44px var(--gutter) 28px; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-note { color: var(--muted); font-size: 13.5px; max-width: 420px; margin-top: 12px; }
.footer-cols { display: flex; gap: 56px; }
.footer-cols h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-cols a { display: block; font-size: 14px; color: var(--text-2); padding: 3px 0; transition: color var(--fast); }
.footer-cols a:hover { color: var(--accent); }
.footer-status { color: #6b6b6b; font-size: 12px; margin-top: 28px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 14px; transition: opacity var(--med) var(--ease-out), transform var(--med) var(--ease-out); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .info-layout { grid-template-columns: 1fr; }
  .search-trigger { min-width: 0; }
  .search-hint, .search-trigger kbd { display: none; }
}
@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .nav { background: var(--surface); }
  .nav-inner { gap: 12px; }
  .menu-btn { display: inline-flex; }
  .search-trigger { margin-left: auto; background: none; border: 0; padding: 0; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity var(--med) var(--ease-out), transform var(--med) var(--ease-out);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 0; font-size: 16px; }
  .nav-links a::after { left: 0; right: auto; width: 24px; bottom: 6px; }
  .hero { height: 78vh; min-height: 500px; }
  .hero-slide::after { background: linear-gradient(0deg, #000 8%, rgba(0,0,0,.7) 50%, rgba(0,0,0,.2)); }
  .hero-content { bottom: 96px; }
  .hero-synopsis { -webkit-line-clamp: 2; font-size: 14.5px; }
  .hero-arrows { display: none; }
  .hero-dots { bottom: 52px; gap: 6px; }
  .hero-dot { width: 18px; }
  .hero-dot.active { width: 40px; }
  .rows { margin-top: -30px; }
  .track-btn { display: none; }
  .detail-hero { padding-top: calc(var(--nav-h) + 24px); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-poster { width: 160px; }
  .ratings .rating-box { flex: 1 1 128px; }
  .slot { grid-template-columns: 60px 48px 1fr; gap: 12px; }
  .slot img { width: 48px; height: 66px; }
  .slot .ep { grid-column: 3; text-align: left; }
  .slot time { font-size: 15px; }
  .footer-cols { gap: 32px; }
}

@media (hover: none) {
  .card-hover { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   v2 polish: glass nav, micro-interactions, richer detail, search UX
   ===================================================================== */

/* Glass nav */
.nav.solid { background: rgba(20, 21, 25, .82); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.logo svg { transition: transform var(--med) var(--ease-out); }
.logo:hover svg { transform: rotate(-12deg) scale(1.08); }
.search-trigger { transition: background var(--fast), border-color var(--med), box-shadow var(--med), min-width var(--med) var(--ease-out); }
.search-trigger:hover { border-color: rgba(255,100,10,.6); box-shadow: 0 0 0 4px rgba(255,100,10,.12); min-width: 280px; }
.search-trigger svg { transition: transform var(--med) var(--ease-out); }
.search-trigger:hover svg { transform: rotate(-10deg) scale(1.1); color: var(--accent); }

/* Route progress + back to top */
.route-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), #ffb36b); box-shadow: 0 0 12px rgba(255,100,10,.7); opacity: 0; }
.route-progress.run { opacity: 1; animation: progressRun 8s cubic-bezier(.1,.7,.1,1) forwards; }
.route-progress.done { transform: scaleX(1); opacity: 0; animation: none; transition: transform 200ms var(--ease-out), opacity 400ms 200ms; }
@keyframes progressRun { from { transform: scaleX(0); } to { transform: scaleX(.92); } }
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #000; box-shadow: 0 10px 30px -8px rgba(255,100,10,.7); opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; transition: opacity var(--med) var(--ease-out), transform var(--med) var(--ease-out); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top:active { transform: scale(.92); }

/* Buttons: light sweep on hover */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0s; }
.btn:hover::after { transform: translateX(120%); transition: transform 700ms var(--ease-out); }
.btn svg { transition: transform var(--med) var(--ease-out); }
.btn:hover svg { transform: scale(1.15); }

/* Cards: lift + glow */
.card .card-poster { transition: transform var(--med) var(--ease-out), box-shadow var(--med) var(--ease-out); box-shadow: 0 0 0 1px rgba(255,255,255,.04); }
.card:hover .card-poster, .card:focus-visible .card-poster { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--accent), 0 18px 40px -12px rgba(255,100,10,.45); }
.card:active .card-poster { transform: translateY(-2px) scale(.98); }
.card.is-static { cursor: default; }
.card.is-static:hover .card-poster { box-shadow: 0 0 0 1px var(--surface-3); transform: none; }
.card.is-static:hover .card-title { color: var(--text); }
.card-poster.no-img, .result-img.no-img { display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #3a2a20, var(--surface-2) 60%); }
.card-poster.no-img::before { content: attr(data-title); padding: 16px; text-align: center; font-weight: 900; font-size: 14px; color: var(--text-2); }
.rel-tag { background: rgba(0,0,0,.75); color: #fff; backdrop-filter: blur(6px); }
.track { padding-top: 14px; }

/* Chips */
.chip svg { width: 13px; height: 13px; }
.chip-x { gap: 6px; background: rgba(255,100,10,.12); border-color: rgba(255,100,10,.45); color: var(--text); animation: popIn 320ms var(--ease-out) both; }
.chip-x:hover { background: rgba(255,100,10,.25); color: var(--text); }
.chip-x svg { transition: transform var(--fast); }
.chip-x:hover svg { transform: rotate(90deg); }
@keyframes popIn { from { opacity: 0; transform: scale(.8); } }

/* Browse filters */
.filter-q-wrap { position: relative; flex: 1 1 260px; min-width: 200px; display: flex; align-items: center; }
.filter-q-wrap > svg { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; transition: color var(--fast); }
.filter-q-wrap:focus-within > svg { color: var(--accent); }
.filter-q-wrap .filter-q { flex: 1; padding-left: 38px; padding-right: 36px; transition: border-color var(--fast), box-shadow var(--med); }
.filter-q-wrap .filter-q:focus { box-shadow: 0 0 0 4px rgba(255,100,10,.14); }
.filter-q-spin, .search-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .7s linear infinite; opacity: 0; transition: opacity var(--fast); flex-shrink: 0; }
.filter-q-spin { position: absolute; right: 12px; }
.filter-q-wrap.busy .filter-q-spin, .search-bar.busy .search-spin { opacity: 1; }
.reset-btn { height: 38px; padding: 0 12px; color: var(--muted); font-weight: 700; font-size: 13.5px; border-radius: 4px; transition: color var(--fast), background var(--fast); }
.reset-btn:hover { color: var(--accent); background: rgba(255,100,10,.08); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.active-filters:empty { display: none; }
.grid { transition: opacity var(--med); }
.grid.refreshing { opacity: .35; pointer-events: none; }
.browse-head p b { color: var(--accent); }
.end-note { color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.empty-state { padding: 40px 0; }
.empty-art { font-size: 40px; color: var(--accent); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* Detail extras */
.muted-note { color: var(--muted); }
.sub-h { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.stream-links .platform { position: relative; height: 46px; padding: 0 18px; font-size: 15px; border: 1px solid var(--line); opacity: 0; transform: translateY(8px); }
.reveal.in .stream-links .platform { animation: rise 500ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 50ms); }
.stream-links .platform:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface-2)); }
.platform-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.stream-links.small a { height: 34px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.related .card-sub { font-size: 12px; }

.dist { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 6px; }
.dist-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.dist-bar { width: 100%; height: var(--h); border-radius: 4px 4px 2px 2px; background: hsl(var(--hue) 75% 52%); transform-origin: bottom; transform: scaleY(0); transition: filter var(--fast); }
.reveal.in .dist-bar { animation: barUp 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 50ms + 150ms); }
.dist-col:hover .dist-bar { filter: brightness(1.25); }
.dist-col small { font-size: 11px; color: var(--muted); font-weight: 700; }
@keyframes barUp { to { transform: scaleY(1); } }
.status-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 22px; gap: 2px; }
.status-bar span { transform-origin: left; }
.reveal.in .status-bar span { animation: grow 900ms var(--ease-out) both 300ms; }
.status-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.status-legend span { display: inline-flex; align-items: center; gap: 6px; }
.status-legend i { width: 9px; height: 9px; border-radius: 2px; }
.st-watching { background: #2abdbb; } .st-plantowatch { background: #a7a7ff; } .st-completed { background: #5fd068; }
.st-dropped { background: #ff5c5c; } .st-onhold { background: #ffc12e; }
.tag-list { display: grid; gap: 8px; }
.tag { position: relative; display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 12px; border-radius: 4px; background: var(--surface-2); overflow: hidden; font-size: 13.5px; font-weight: 700; }
.tag::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, rgba(255,100,10,.28), rgba(255,100,10,.08)); transform-origin: left; transform: scaleX(0); }
.reveal.in .tag::before { animation: grow 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 40ms + 150ms); }
.tag span, .tag b { position: relative; }
.tag b { color: var(--muted); font-size: 12px; }
.themes { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; }
.themes li::marker { color: var(--accent); font-weight: 900; }

/* Search overlay v2 */
.search-overlay.closing { animation: fadeOut 200ms var(--ease-in-out) forwards; }
.search-overlay.closing .search-panel { animation: panelOut 200ms var(--ease-in-out) forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes panelOut { to { opacity: 0; transform: translateY(-10px) scale(.98); } }
.search-panel { animation: panelIn 380ms var(--ease-out); }
.search-bar { position: relative; }
.search-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); transform: scaleX(0); transition: transform 500ms var(--ease-out); }
.search-bar:focus-within::after { transform: scaleX(1); }
.search-bar.busy::after { transform: scaleX(1); background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat; background-size: 40% 100%; animation: scan 1s linear infinite; }
@keyframes scan { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.link-mini { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-radius: 4px; transition: color var(--fast), background var(--fast); }
.link-mini:hover { color: var(--accent); background: rgba(255,100,10,.08); }
.search-results { transition: opacity var(--fast); }
.search-results.stale { opacity: .45; }
.search-group { margin-bottom: 8px; }
.search-group-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 6px; font-size: 11.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px 8px; }
.search-chips .chip { gap: 6px; animation: popIn 300ms var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
.result { transition: background var(--fast); position: relative; }
.result::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); transform: scaleY(0); transition: transform var(--med) var(--ease-out); }
.result:hover::before, .result.sel::before { transform: scaleY(1); }
.result-img { width: 48px; height: 68px; border-radius: 3px; overflow: hidden; background: var(--surface-2); flex-shrink: 0; }
.result-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 250ms ease-out; display: block; }
.result-img img.loaded { opacity: 1; }
.result .alt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.result mark { color: var(--accent); background: rgba(255,100,10,.18); border-radius: 2px; padding: 0 1px; }
.result-go { color: var(--muted); transition: transform var(--med) var(--ease-out), color var(--fast); }
.result:hover .result-go, .result.sel .result-go { transform: translateX(4px); color: var(--accent); }
.result-sk { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 8px 10px; align-items: center; }
.result-sk > .sk { height: 68px; }
.result-sk div { display: grid; gap: 8px; }
.result-sk div .sk { height: 12px; width: 70%; }
.result-sk div .sk + .sk { width: 40%; }
.search-empty strong { display: block; color: var(--text); margin: 8px 0 4px; font-size: 16px; }
.search-all { display: flex; align-items: center; justify-content: center; gap: 6px; }
.search-all svg { width: 16px; height: 16px; transition: transform var(--fast); }
.search-all:hover svg { transform: translateX(4px); }
.search-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.search-foot kbd { font: 700 11px 'Lato', sans-serif; border: 1px solid var(--surface-3); border-radius: 4px; padding: 2px 6px; margin-right: 4px; color: var(--text-2); }

@media (max-width: 760px) {
  .search-foot { display: none; }
  .search-overlay { padding: 0; }
  .search-panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .search-trigger:hover { min-width: 0; box-shadow: none; }
  .filter-q-wrap { flex-basis: 100%; }
  .dist { height: 110px; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .dist-bar, .tag::before, .stream-links .platform { transform: none; opacity: 1; }
}

/* =====================================================================
   v3: custom icons, logo, dropdowns, schedule tabs, detail polish
   ===================================================================== */

/* Icons: custom duotone set */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.score .ic { width: 15px; height: 15px; color: var(--star); }
.rating-box .value .ic { width: 20px; height: 20px; color: var(--star); }
.menu-ic path { transition: transform var(--med) var(--ease-out); transform-origin: center; }
.menu-btn[aria-expanded="true"] .menu-ic path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-ic path:nth-child(2) { transform: scaleX(0); }
.menu-btn[aria-expanded="true"] .menu-ic path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Logo */
.logo { gap: 10px; font-size: 20px; letter-spacing: -0.03em; }
.logo .logo-mark { width: 30px; height: 30px; stroke: none; filter: drop-shadow(0 4px 12px rgba(255,80,60,.35)); transition: transform 500ms var(--ease-out); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-spark { transform-origin: 22.6px 9.1px; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 70%, 100% { transform: scale(1) rotate(0); opacity: 1; } 80% { transform: scale(1.5) rotate(45deg); opacity: .8; } 90% { transform: scale(.7) rotate(90deg); } }
.logo b { background: linear-gradient(90deg, #ff8a3d, #ff3d6e); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Nav search field with rotating hint */
.search-trigger { border-radius: 10px; }
.search-hint { position: relative; overflow: hidden; max-width: 190px; height: 20px; display: inline-block; text-align: left; }
.search-hint-text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform 260ms var(--ease-out), opacity 260ms; }
.search-hint-text.out { transform: translateY(-12px); opacity: 0; }

/* Custom dropdown */
.select.cs { position: relative; }
.select.cs::after { display: none; }
.select.cs select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.cs-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; min-width: 140px; padding: 0 10px 0 14px; border-radius: 8px; border: 1px solid var(--surface-3); background: var(--surface); font-weight: 700; font-size: 13.5px; color: var(--text); transition: border-color var(--fast), background var(--fast), box-shadow var(--med); }
.cs-btn:hover { border-color: #4a4d55; background: var(--surface-2); }
.cs.open .cs-btn, .cs-btn:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,100,10,.14); outline: none; }
.cs.has-value .cs-btn { border-color: rgba(255,100,10,.55); background: rgba(255,100,10,.08); }
.cs-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.cs-chev { width: 16px; height: 16px; color: var(--muted); transition: transform var(--med) var(--ease-out), color var(--fast); }
.cs.open .cs-chev { transform: rotate(180deg); color: var(--accent); }
.cs-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 100%; width: max-content; max-width: 280px; padding: 6px; border-radius: 12px; background: rgba(30,32,38,.96); backdrop-filter: blur(14px); border: 1px solid #383b43; box-shadow: 0 24px 60px -16px rgba(0,0,0,.9); transform-origin: top left; animation: menuIn 220ms var(--ease-out); }
.cs.up .cs-menu { top: auto; bottom: calc(100% + 8px); transform-origin: bottom left; }
.cs.closing .cs-menu { animation: menuOut 140ms var(--ease-in-out) forwards; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
@keyframes menuOut { to { opacity: 0; transform: translateY(-4px) scale(.97); } }
.cs-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #4a4d55 transparent; }
.cs-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 9px 10px; border-radius: 7px; font-size: 14px; font-weight: 700; color: var(--text-2); text-align: left; opacity: 0; animation: optIn 260ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 14ms); }
@keyframes optIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.cs-opt .ic { width: 15px; height: 15px; color: var(--accent); opacity: 0; transform: scale(.5); transition: opacity var(--fast), transform var(--med) var(--ease-out); }
.cs-opt.kb { background: rgba(255,255,255,.07); color: var(--text); }
.cs-opt.on { color: var(--accent); }
.cs-opt.on .ic { opacity: 1; transform: none; }
.cs-search { display: flex; align-items: center; gap: 8px; padding: 4px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid #383b43; }
.cs-search .ic { width: 16px; height: 16px; color: var(--muted); }
.cs-search input { flex: 1; height: 32px; background: none; border: 0; outline: none; color: var(--text); font: 700 13.5px 'Lato', sans-serif; }
.cs-empty { padding: 12px; color: var(--muted); font-size: 13px; }
.toggle, .filter-q, .reset-btn { border-radius: 8px; }
.filters { gap: 10px; }

/* Top 10 spacing on narrow screens */
@media (max-width: 760px) {
  .track.ranked { grid-auto-columns: 200px; }
  .cs-btn { min-width: 0; }
  .select.cs { flex: 1 1 140px; }
  .select.cs .cs-btn { width: 100%; }
}

/* Schedule: gliding day pill + list swap */
.days { position: relative; isolation: isolate; padding: 4px; margin-left: -4px; }
.day { position: relative; z-index: 1; background: var(--surface); transition: color var(--med), border-color var(--fast), transform var(--fast), background var(--med); }
.day.on { background: transparent; border-color: transparent; color: #000; }
.day-pill { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 6px; background: linear-gradient(135deg, #ff8a3d, var(--accent)); box-shadow: 0 10px 26px -10px rgba(255,100,10,.8); transition: transform 420ms var(--ease-out), width 420ms var(--ease-out); pointer-events: none; }
.day-count { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; font-weight: 900; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(255,255,255,.08); color: var(--muted); display: grid; place-items: center; }
.day-count:empty { display: none; }
.day.on .day-count { background: rgba(0,0,0,.18); color: #000; }
.timeline.swap > * { animation: swapIn 420ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 10) * 35ms); }
@keyframes swapIn { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 18px)); } to { opacity: 1; transform: none; } }
.slot { opacity: 1; animation: none; }
.slot-img { width: 64px; height: 88px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.slot-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms, transform 500ms var(--ease-out); }
.slot-img img.loaded { opacity: 1; }
.slot:hover .slot-img img { transform: scale(1.08); }
.slot .ep small .ic { width: 12px; height: 12px; vertical-align: -1px; color: #5fd068; }
.slot.past { opacity: .7; }
.slot.past:hover { opacity: 1; }
.slot-sk { pointer-events: none; }
.now-line { position: relative; display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.now-line::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,100,10,.7); animation: ring 1.8s infinite; flex-shrink: 0; }
.now-line::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
@media (max-width: 760px) {
  .slot-img { width: 48px; height: 66px; }
}

/* Detail polish */
.lang-row .ico .ic { width: 20px; height: 20px; }
.countdown .ic { color: var(--accent); }
.rating-box { border-radius: 10px; transition: transform var(--med) var(--ease-out), border-color var(--fast); }
.rating-box:hover { transform: translateY(-3px); border-color: #3a3d45; }
.panel { border-radius: 12px; }
.trailer-thumb { border-radius: 12px; }
.trailer-thumb .play .ic { width: 30px; height: 30px; color: #000; margin-left: 4px; }
.stream-links a { border-radius: 8px; }
.chip { transition: border-color var(--fast), color var(--fast), background var(--fast), transform var(--med) var(--ease-out); }
.synopsis { text-wrap: pretty; }

/* Cards: rounder posters, softer badges */
.card-poster { border-radius: 8px; }
.pill { border-radius: 5px; }
.card-tag.airing { display: inline-flex; align-items: center; gap: 5px; }
.card-tag.airing::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #000; animation: pulse 1.6s ease-in-out infinite; }
.lang span { border-radius: 4px; }

/* Hero */
.hero-kicker .ic { width: 14px; height: 14px; color: var(--accent); }
.btn { border-radius: 8px; }
.btn .ic { width: 18px; height: 18px; }
.hero-arrows button .ic, .track-btn .ic { width: 24px; height: 24px; }
.track-btn .ic { width: 30px; height: 30px; }

@media (prefers-reduced-motion: reduce) {
  .cs-opt { opacity: 1; }
  .logo-spark { animation: none; }
}

/* Fan stats: one wide panel, chart + viewer status side by side */
.panel.fans { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 40px; align-items: stretch; }
.panel.fans > :only-child { grid-column: 1 / -1; }
.fans-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.fans-head h3, .fans-status h3 { margin: 0; }
.fans-head p { font-size: 13px; color: var(--muted); }
.fans-head p b { color: #5fd068; font-size: 15px; }
.fans .dist { height: 170px; }
.fans-status { display: flex; flex-direction: column; padding-left: 40px; border-left: 1px solid var(--line); }
.fans-status .status-bar { margin: 18px 0 16px; height: 10px; }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.status-list li { display: grid; grid-template-columns: 10px 1fr auto 44px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; font-size: 14px; transition: background var(--fast); }
.status-list li:hover { background: var(--surface-2); }
.status-list i { width: 10px; height: 10px; border-radius: 3px; }
.status-list span { color: var(--text-2); }
.status-list b { font-variant-numeric: tabular-nums; }
.status-list em { font-style: normal; color: var(--muted); text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.reveal.in .status-list li { animation: rise 500ms var(--ease-out) both; animation-delay: calc(var(--i) * 60ms + 300ms); }
@media (max-width: 860px) {
  .panel.fans { grid-template-columns: 1fr; gap: 28px; }
  .fans-status { padding-left: 0; border-left: 0; padding-top: 24px; border-top: 1px solid var(--line); }
}


/* ============ Streambert OTT Style Watch Page ============ */
:root {
  --red: #e50914;
  --red-dim: rgba(229, 9, 20, 0.08);
  --red-glow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

.watch-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px var(--gutter) 80px;
}

/* ── Top Header Above Player ────────────────────────────────────────── */
.player-top-header {
  margin-bottom: 12px;
}

.player-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag-red {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
  flex-shrink: 0;
}

.player-ep-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 65%;
}

.mark-watched-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #eee;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mark-watched-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.mark-watched-btn.watched {
  background: rgba(72, 199, 116, 0.16);
  border-color: rgba(72, 199, 116, 0.5);
  color: #48c774;
}

.mark-watched-btn.watched:hover {
  background: rgba(72, 199, 116, 0.24);
}

/* ── Clean Unified Cinema Player ───────────────────────────────────── */
.cinema-player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cinema-player-box.theater-mode {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  border-radius: 0;
  max-height: 90vh;
}

.cinema-player-mount {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cinema-video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  outline: none;
}

.cinema-iframe-element {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.cinema-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  transition: opacity 0.25s ease;
}

.cinema-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.cinema-loader p {
  font-size: 14px;
  color: #bbb;
  font-weight: 500;
}

/* ── Permanent Server & Audio Toolbar (ALWAYS VISIBLE OUTSIDE FRAME) ── */
.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-top: 14px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.toolbar-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #888;
  text-transform: uppercase;
}

.server-pill-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.server-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.server-pill .server-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #666;
  transition: background 0.15s ease;
}

.server-pill.active {
  background: rgba(255, 61, 110, 0.15);
  border-color: #ff3d6e;
  color: #fff;
  font-weight: 700;
}

.server-pill.active .server-dot {
  background: #ff3d6e;
  box-shadow: 0 0 8px #ff3d6e;
}

.audio-toggle-pills {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.audio-pill {
  padding: 7px 14px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.audio-pill.active {
  background: var(--red);
  color: #fff;
}

.quality-select {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.toolbar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #bbb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-action-btn:hover,
.toolbar-action-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.player-error-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  color: #fff;
}

.player-error-view .err-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.player-error-view .err-desc {
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
  max-width: 480px;
}

.player-error-view .err-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Player Container & Webview/Iframe ──────────────────────────────── */
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-wrap.theater-mode {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  border-radius: 0;
  max-height: 88vh;
}

/* ── Custom OTT Video Player (Full Specification) ────────────────────── */
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.player-wrap.theater-mode {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  border-radius: 0;
  max-height: 88vh;
}

.player-wrap iframe,
.player-wrap video,
.native-video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  object-fit: contain;
}

.native-video-player::cue {
  background-color: rgba(10, 11, 14, 0.85);
  color: #ffffff;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  border-radius: 4px;
  padding: 3px 8px;
}

/* Big Center Play Button */
.player-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, opacity 0.25s;
}

.player-center-play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
}

.player-center-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--red);
  border-color: var(--red);
}

.player-center-play.playing {
  opacity: 0;
  pointer-events: none;
}

/* Custom Player Top Bar */
.player-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 35;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0) 100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.player-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-brand-info {
  display: flex;
  flex-direction: column;
}

.player-brand-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.player-brand-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #999;
  text-transform: uppercase;
}

.player-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pill Buttons matching the uploaded UI */
.player-pill-btn {
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f0f0f0;
  border-radius: 7px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.player-pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.player-pill-btn.active {
  background: rgba(229, 9, 20, 0.85);
  border-color: var(--red);
  color: #fff;
}

.player-pill-btn svg,
.player-pill-btn .ic {
  width: 14px;
  height: 14px;
}

.player-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #48c774;
}

/* Custom Player Bottom Bar */
.player-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 20px 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.65) 60%, rgba(0, 0, 0, 0) 100%);
  z-index: 35;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

/* Scrubber / Progress Bar */
.player-timeline-wrap {
  position: relative;
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
  user-select: none;
  -webkit-user-select: none;
}

.player-timeline-rail {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  position: relative;
  transition: height 0.15s ease;
}

.player-timeline-wrap:hover .player-timeline-rail,
.player-timeline-wrap.is-seeking .player-timeline-rail {
  height: 6px;
}

.player-timeline-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width 0.1s linear;
}

.player-timeline-played {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

.player-timeline-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--red);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  transition: transform 0.15s ease;
}

.player-timeline-wrap:hover .player-timeline-thumb,
.player-timeline-wrap.is-seeking .player-timeline-thumb {
  transform: translate(-50%, -50%) scale(1.3);
}

.player-timeline-tooltip {
  position: absolute;
  bottom: 28px;
  transform: translateX(-50%);
  background: #141519;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.15s ease;
  z-index: 40;
}

/* Bottom Controls Row */
.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-controls-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-ctrl-btn {
  background: transparent;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s, transform 0.15s;
}

.player-ctrl-btn:hover {
  color: #fff;
  transform: scale(1.08);
}

.player-ctrl-btn svg,
.player-ctrl-btn .ic {
  width: 20px;
  height: 20px;
}

#playerPlayBtn .play-ic {
  display: block !important;
}
#playerPlayBtn .pause-ic {
  display: none !important;
}
#playerPlayBtn.is-playing .play-ic {
  display: none !important;
}
#playerPlayBtn.is-playing .pause-ic {
  display: block !important;
}

.player-skip-ic {
  width: 22px !important;
  height: 22px !important;
}
.player-skip-ic text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 7.5px;
  font-weight: 800;
  fill: currentColor;
  stroke: none;
  pointer-events: none;
}

/* Volume Control Group */
.player-volume-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-volume-slider {
  width: 70px;
  height: 4px;
  appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

/* Time Display matching the screenshot: 0:01 / 2:25:00 • Ends at 6:05 PM */
.player-time-display {
  font-size: 13px;
  font-weight: 700;
  color: #bbb;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.player-time-current {
  color: #fff;
}

.player-time-ends {
  color: #888;
  margin-left: 6px;
}

/* ── Quality / Settings Popover Modal (Matching Image 1) ───────────────── */
.player-popup-menu {
  position: absolute;
  top: 58px;
  right: 18px;
  z-index: 60;
  width: 360px;
  max-width: 90vw;
  background: rgba(18, 19, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.15s ease;
}

.player-popup-menu[hidden] {
  display: none !important;
}

.player-popup-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-height: 190px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.player-popup-col {
  display: flex;
  flex-direction: column;
}

.player-popup-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 8px;
  padding-left: 6px;
}

.player-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.player-popup-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.player-popup-item.active {
  color: #fff;
  font-weight: 800;
}

.player-popup-check {
  font-weight: 800;
  color: var(--red);
  font-size: 13px;
  display: none;
  margin-left: auto;
}

.player-popup-item.active .player-popup-check {
  display: inline-block !important;
}

.player-popup-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}

/* Settings Rows */
.player-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e0;
  transition: background 0.15s;
}

.player-setting-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.player-setting-val {
  color: #888;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Controls Auto-hide */
.player-wrap.controls-hidden {
  cursor: none;
}

.player-wrap.controls-hidden .player-top-bar,
.player-wrap.controls-hidden .player-bottom-bar,
.player-wrap.controls-hidden .player-center-play {
  opacity: 0;
  pointer-events: none;
}

/* Lock Overlay */
.player-unlock-pill {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(229, 9, 20, 0.9);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s infinite;
}

.player-wrap.is-locked .player-top-bar,
.player-wrap.is-locked .player-bottom-bar,
.player-wrap.is-locked .player-center-play,
.player-wrap.initial-loading .player-top-bar,
.player-wrap.initial-loading .player-bottom-bar,
.player-wrap.initial-loading .player-center-play,
.player-wrap.initial-loading .player-popup-menu {
  opacity: 0 !important;
  pointer-events: none !important;
}

.player-loader {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #fff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: auto;
}

.player-wrap.initial-loading .player-loader {
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.player-loader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.player-error-overlay {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: rgba(10, 10, 15, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.player-error-box {
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 24px 32px;
  text-align: center;
  color: #fff;
  max-width: 420px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}
}

.player-loader .spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--red);
  box-shadow: 0 0 24px rgba(229, 9, 20, 0.45);
  animation: spin 0.8s linear infinite;
}

.player-loader p {
  display: none !important;
}

/* ── Player Overlay Toolbar ─────────────────────────────────────────── */
.player-overlay-group {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.player-wrap:hover .player-overlay-group {
  opacity: 1;
}

.player-overlay-btn {
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s;
}

.player-overlay-btn:hover {
  background: rgba(229, 9, 20, 0.9);
  border-color: var(--red);
}

.player-overlay-btn.active {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.player-overlay-btn svg,
.player-overlay-btn .ic {
  width: 15px;
  height: 15px;
}

.player-blocked-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  margin-left: 2px;
}

/* ── Universal hidden override ───────────────────────────────────────── */
[hidden] {
  display: none !important;
}

/* ── Streambert Source Dropdown ──────────────────────────────────────── */
.source-dropdown {
  position: absolute;
  top: 48px;
  left: 12px;
  z-index: 50;
  min-width: 220px;
  background: #141519;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: fadeIn 0.15s ease;
}

.source-dropdown[hidden] {
  display: none !important;
}

.source-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #ddd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.source-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.source-dropdown__item--active {
  background: rgba(229, 9, 20, 0.22);
  color: #ff5252;
  font-weight: 800;
}

.source-dropdown__tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #aaa;
}

.source-dropdown__note {
  font-size: 11px;
  color: #888;
}

/* ── Progress Bar & Marks ───────────────────────────────────────────── */
.progress-bar-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar-outer {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-pct-label {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 80px;
}

.progress-mark-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.progress-mark-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-right: 4px;
}

.progress-mark-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ccc;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.progress-mark-btn:hover {
  background: rgba(229, 9, 20, 0.2);
  border-color: var(--red);
  color: #fff;
}

/* ── Episodes Section ────────────────────────────────────────────────── */
.episodes-section {
  margin-top: 32px;
}

.episodes-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.episodes-section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.episodes-count-badge {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Season selector tabs */
.season-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.season-btn {
  padding: 8px 22px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #141519;
  color: #aaa;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.season-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.season-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: var(--red-glow);
}

.season-btn.season-watched {
  border-color: rgba(72, 199, 116, 0.6);
  color: #48c774;
}

.season-btn.season-watched.active {
  background: rgba(72, 199, 116, 0.9);
  border-color: #48c774;
  color: #fff;
}

/* Episodes Grid (Streambert 4-column layout) */
.episodes-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.episode-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #141519;
  border: 1px solid #23252b;
  cursor: pointer;
  transition: all 0.2s;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.episode-card:hover {
  border-color: var(--red);
  background: #1a1b22;
  transform: translateY(-2px);
}

.episode-card.playing {
  border-color: var(--red);
  background: var(--red-dim);
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.25);
}

.episode-thumb {
  width: 120px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-playing-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
}

.episode-playing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: playing-pulse 1.1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes playing-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.75);
  }
}

.episode-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
}

.episode-card:hover .episode-thumb-play {
  opacity: 1;
}

.episode-thumb-play svg,
.episode-thumb-play .ic {
  width: 22px;
  height: 22px;
}

.episode-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.episode-num {
  font-size: 11px;
  color: var(--red);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.episode-watched-check {
  color: #48c774;
  font-size: 12px;
}

.episode-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 5px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.episode-desc-wrap {
  display: flex;
  flex-direction: column;
}

.episode-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.episode-desc.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episode-desc-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
  opacity: 0.85;
}

.episode-desc-toggle:hover {
  opacity: 1;
}

.episode-progress-bar {
  margin-top: 6px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.episode-progress-fill {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
}

/* ── AdShield Modal ─────────────────────────────────────────────────── */
.adshield-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.adshield-modal-backdrop[hidden] {
  display: none !important;
}

.adshield-modal-card {
  width: 90%;
  max-width: 440px;
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  color: #fff;
}

.adshield-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.adshield-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  margin: 0;
}

.adshield-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.adshield-stat-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.adshield-stat-num {
  font-size: 24px;
  font-weight: 900;
  color: var(--red);
}

.adshield-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.adshield-note {
  font-size: 13px;
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .player-ep-title {
    max-width: 100%;
    order: 3;
    width: 100%;
    margin-top: 4px;
  }
  .mark-watched-btn {
    margin-left: auto;
  }
  .episodes-grid {
    grid-template-columns: 1fr;
  }
}

/* HD backdrops (TMDB) + official title logos */
.hero-bg, .detail-bg { background-image: var(--bg-sm); }
/* Full-resolution banner only where it shows: wide screens or high-DPI screens. */
@media (min-width: 1400px), (min-width: 900px) and (min-resolution: 1.5dppx) {
  .hero-bg, .detail-bg { background-image: var(--bg-lg); }
}
.hero-bg.hd { background-position: center 30%; }
.detail-bg.hd { background-position: center 25%; filter: none; animation-name: bgInHd; }
@keyframes bgInHd { from { opacity: 0; transform: scale(1.06); } to { opacity: .72; transform: scale(1); } }
.title-logo-wrap { line-height: 0; margin-bottom: 18px; }
.title-logo { display: block; max-width: min(460px, 80%); max-height: 150px; width: auto; height: auto; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 6px 24px rgba(0,0,0,.6)); }
.title-logo.wide { max-height: 120px; }
.detail-main .title-logo { max-height: 130px; max-width: min(520px, 100%); }
@media (max-width: 760px) {
  .title-logo { max-height: 90px; max-width: 85%; }
  .detail-main .title-logo { max-height: 90px; }
}

/* Seasons row */
.season-tag { background: rgba(0,0,0,.78); color: #fff; backdrop-filter: blur(6px); font-weight: 900; }
.season-now { position: absolute; right: 8px; top: 8px; z-index: 1; background: rgba(255,255,255,.92); color: #000; }
.season-now.airing { background: var(--accent); }
.season-card.current .card-poster { box-shadow: 0 0 0 2px var(--accent), 0 14px 32px -14px rgba(255,100,10,.6); }
.season-card.current .card-title { color: var(--accent); }
.season-card .card-sub { gap: 10px; }
.seasons-row + .seasons-row { margin-top: -8px; }
.logo-sub { display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 16px; padding: 5px 12px; border-radius: 999px; background: rgba(255,100,10,.14); border: 1px solid rgba(255,100,10,.4); color: var(--text); font-size: 13px; font-weight: 900; letter-spacing: .04em; }

/* ===== Streambert-style detail header ===== */
.detail-hero.sb { min-height: min(92vh, 860px); display: flex; align-items: flex-end; padding-bottom: 56px; }
.detail-hero.sb .detail-grid { width: 100%; align-items: end; }
/* Show the artwork at full strength; darken only behind the text and at the bottom edge. */
.detail-hero.sb.has-art .detail-bg { opacity: 1; animation: sbBgIn 1.2s var(--ease-out) both; background-position: center 20%; }
@keyframes sbBgIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
.detail-hero.sb::after {
  background:
    linear-gradient(90deg, #000 0%, rgba(0,0,0,.92) 24%, rgba(0,0,0,.62) 44%, rgba(0,0,0,.15) 68%, rgba(0,0,0,0) 82%),
    linear-gradient(0deg, #000 0%, rgba(0,0,0,.55) 18%, rgba(0,0,0,0) 42%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 18%);
}
.detail-hero.sb .detail-poster { max-width: 250px; border-radius: 10px; box-shadow: 0 30px 70px -20px #000, 0 0 0 1px rgba(255,255,255,.08); }
.detail-hero.sb .detail-main { max-width: 820px; }
.sb-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .45em; text-transform: uppercase; }
.sb-live { letter-spacing: .08em; font-size: 11px; padding: 3px 8px; border-radius: 4px; background: var(--accent); color: #000; }
.detail-hero.sb h1:not(.title-logo-wrap) { font-family: 'Bebas Neue', 'Lato', sans-serif; font-weight: 400; font-size: clamp(44px, 6vw, 84px); line-height: .95; letter-spacing: .01em; margin-bottom: 12px; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.detail-hero.sb .title-logo-wrap { margin-bottom: 12px; }
.detail-hero.sb .detail-alt { margin: 0 0 16px; }
.sb-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sb-chip { height: 28px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 6px; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); font-size: 13px; font-weight: 700; color: var(--text); transition: background var(--fast), transform var(--med) var(--ease-out); }
.sb-chip:hover { background: var(--accent); color: #000; transform: translateY(-2px); }
.sb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin-bottom: 16px; color: var(--text-2); font-size: 15px; }
.sb-meta > span:not(.lang) { display: inline-flex; align-items: center; }
.sb-meta > span:not(.lang):not(:last-of-type)::after, .sb-meta > .sb-score::after { content: ""; width: 1px; height: 14px; margin: 0 14px; background: rgba(255,255,255,.25); }
.sb-meta .lang { margin-left: 4px; }
.sb-score { gap: 6px; color: var(--text); font-size: 16px; }
.sb-score .ic { width: 17px; height: 17px; color: var(--star); }
.sb-age { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; margin-bottom: 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.35); backdrop-filter: blur(8px); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.sb-age .ic { width: 15px; height: 15px; }
.detail-hero.sb .synopsis { font-size: 16px; line-height: 1.7; color: #e4e4e4; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.btn-glass { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: var(--text); backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255,255,255,.18); }
.sb-stats { padding-top: 8px; }
.sb-stats .ratings { margin: 0; }
.sb-stats .rating-box .value small { margin-left: 4px; }
@media (max-width: 760px) {
  .detail-hero.sb { min-height: 0; padding-bottom: 32px; }
  .detail-hero.sb::after { background: linear-gradient(0deg, #000 10%, rgba(0,0,0,.75) 55%, rgba(0,0,0,.35)); }
  .detail-hero.sb .detail-poster { width: 150px; }
  .sb-kicker { letter-spacing: .3em; }
}

/* ===== v5: Streambert banner treatment + always-visible cards ===== */
/* Streambert: TMDB backdrop at full size, a 45% dark layer, then a fade into the page at the bottom. */
.detail-hero.sb.has-art .detail-bg { background-position: center 20%; }
.detail-hero.sb::after {
  background:
    linear-gradient(to top, #000 0%, #000 5%, rgba(0,0,0,.85) 20%, rgba(0,0,0,.6) 35%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.1) 65%, transparent 80%),
    linear-gradient(90deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 55%),
    rgba(0,0,0,.45);
}

/* Cards are visible by default and only animate *in* from hidden, so a card can
   never get stuck invisible (background tab, slow device, interrupted animation). */
.card { opacity: 1; animation: cardIn 560ms var(--ease-out) backwards; animation-delay: calc(min(var(--i, 0), 12) * 45ms); }
.card-poster { background: var(--surface-2) linear-gradient(110deg, var(--surface-2) 30%, #2c2e35 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: posterShimmer 1.4s linear infinite; }
.card-poster:has(img.loaded), .card-poster.no-img { animation: none; }
@keyframes posterShimmer { to { background-position: -150% 0; } }
.slot { opacity: 1; }

/* Faster card entrance so content feels instant */
.card { animation-duration: 320ms; animation-delay: calc(min(var(--i, 0), 8) * 22ms); }
.card-poster img { transition: transform 600ms var(--ease-out), opacity 180ms; }

/* Available languages (detail page) */
.av-langs { display: flex; flex-wrap: wrap; gap: 18px 56px; padding: 22px 26px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.av-group h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.av-list { display: flex; flex-wrap: wrap; gap: 10px; }
.av-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 12px; border-radius: 19px; background: var(--surface-2); font-size: 14.5px; font-weight: 700; color: var(--text); }
.av-chip .ic { width: 17px; height: 17px; color: var(--dub); }
.av-chip small { margin-left: 2px; font-size: 12px; font-weight: 700; color: var(--star); }
.reveal.in .av-chip { animation: popIn 360ms var(--ease-out) both; }
