
/* Keep the HTML hidden attribute authoritative across responsive component styles. */
[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #181818;
  --panel-soft: #232323;
  --text: #fff;
  --muted: #b3b3b3;
  --accent: #e50914;
  --header-height: 68px;
  --page-pad: clamp(18px, 4vw, 64px);
  --bottom-nav-height: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid white; outline-offset: 2px; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.topbar {
  position: fixed;
  z-index: 60;
  inset: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 46px);
  padding: 0 var(--page-pad);
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, rgba(0,0,0,.96), rgba(0,0,0,.52) 58%, transparent);
  transition: background .25s ease, box-shadow .25s ease;
}
.topbar.solid, body.search-open .topbar {
  background: rgba(5,5,5,.96);
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.brand-mark {
  color: var(--accent);
  font-size: 36px;
  line-height: 1;
  font-weight: 1000;
  font-family: Arial Black, Impact, sans-serif;
  letter-spacing: -5px;
  transform: skew(-3deg);
}
.brand-word {
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -1px;
}
.brand.large { margin-bottom: 18px; }
.brand.large .brand-word { font-size: 25px; }
.desktop-nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); }
.nav-link {
  border: 0;
  padding: 12px 0;
  background: transparent;
  color: #d8d8d8;
  cursor: pointer;
  font-size: 14px;
  transition: color .18s ease, font-weight .18s ease;
}
.nav-link:hover, .nav-link.active { color: white; }
.nav-link.active { font-weight: 750; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: rgba(255,255,255,.1); }

/* Search */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-form {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  width: 0;
  height: 40px;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(0,0,0,.88);
  transition: width .22s ease, opacity .16s ease, padding .22s ease;
}
.search-wrap.open .search-form {
  width: min(340px, 42vw);
  padding: 0 10px;
  opacity: 1;
  pointer-events: auto;
}
.search-wrap.open .search-toggle { opacity: 0; pointer-events: none; }
.search-form > svg { flex: none; color: white; }
.search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 10px;
  background: transparent;
  color: white;
  font-size: 14px;
}
.search-form input::-webkit-search-cancel-button { display: none; }
.search-form input::placeholder { color: #a9a9a9; }
.search-clear {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: transparent;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.search-clear.visible { opacity: 1; pointer-events: auto; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(82vh, 850px);
  display: flex;
  align-items: flex-end;
  padding: 0 var(--page-pad) clamp(112px, 12vw, 170px);
  overflow: hidden;
  background: #101010;
}
.hero[hidden] { display: none; }
.hero-media, .hero-backdrop, .hero-trailer { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -3; overflow: hidden; background: #111; }
.hero-backdrop {
  background: #111 center 20% / cover no-repeat;
  transform: scale(1.005);
  transition: opacity .7s ease, transform 8s ease;
}
.hero-trailer {
  border: 0;
  pointer-events: none;
  transform: scale(1.22);
  opacity: 0;
  transition: opacity 1s ease;
}
.hero.trailer-active .hero-trailer { opacity: 1; }
.hero.trailer-active .hero-backdrop { opacity: 0; transform: scale(1.04); }
.hero-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.72) 30%, rgba(0,0,0,.17) 67%, rgba(0,0,0,.06) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(5,5,5,.78) 10%, transparent 42%),
    linear-gradient(180deg, rgba(0,0,0,.35), transparent 25%);
}
.hero-content { width: min(650px, 58vw); position: relative; z-index: 1; }
.eyebrow { margin: 0; color: #f5f5f5; text-transform: uppercase; letter-spacing: 3px; font-size: 12px; font-weight: 850; }
.hero h1 {
  margin: 10px 0 15px;
  max-width: 900px;
  font-size: clamp(42px, 6vw, 84px);
  line-height: .94;
  letter-spacing: clamp(-4px, -.28vw, -1.5px);
  text-wrap: balance;
  text-shadow: 0 4px 26px rgba(0,0,0,.62);
}
.hero-overview {
  max-width: 620px;
  margin: 14px 0 0;
  color: #f1f1f1;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.48;
  font-weight: 520;
  text-shadow: 0 2px 12px black;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta { color: #dedede; font-weight: 650; line-height: 1.5; }
.hero-buttons, .detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 0;
  border-radius: 5px;
  padding: 11px 24px;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: white; color: black; }
.button.primary:hover { background: #d9d9d9; }
.button.secondary { background: rgba(109,109,110,.72); color: white; backdrop-filter: blur(8px); }
.button.secondary:hover { background: rgba(109,109,110,.48); }
.button svg { width: 22px; height: 22px; }

/* Rows and cards */
.content {
  position: relative;
  z-index: 4;
  min-height: 38vh;
  margin-top: -88px;
  padding-bottom: calc(80px + var(--bottom-nav-height));
}
.row-section { margin: 0 0 clamp(24px, 3vw, 42px); }
.row-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 var(--page-pad); }
.row-title { margin: 0 0 8px; font-size: clamp(19px, 1.8vw, 27px); line-height: 1.2; letter-spacing: -.5px; }
.rail-shell { position: relative; }
.rail {
  display: flex;
  gap: clamp(6px, .65vw, 11px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px var(--page-pad) 28px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--page-pad);
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}
.rail::-webkit-scrollbar { display: none; }
.card {
  position: relative;
  flex: 0 0 clamp(185px, 17vw, 285px);
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
  transform-origin: center;
}
.card-artwork {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px;
  background: #242424;
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card picture, .card img { display: block; width: 100%; height: 100%; }
.card img { object-fit: cover; }
.card:hover .card-artwork, .card:focus-visible .card-artwork {
  z-index: 5;
  transform: scale(1.055);
  box-shadow: 0 17px 45px rgba(0,0,0,.72);
}
.card:focus-visible { outline: none; }
.card:focus-visible .card-artwork { outline: 2px solid white; }
.card-info {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 38px 10px 9px;
  background: linear-gradient(transparent, rgba(0,0,0,.94));
  opacity: .94;
}
.card-title { display: block; overflow: hidden; font-size: 13px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.card-meta { display: none; color: #c8c8c8; font-size: 11px; }
.card:hover .card-meta, .card:focus-visible .card-meta { display: block; }
.card-badges { position: absolute; z-index: 2; inset: 8px 8px auto auto; display: flex; align-items: center; gap: 5px; }
.play-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: black;
  font-size: 10px;
  box-shadow: 0 3px 16px rgba(0,0,0,.5);
}
.trailer-badge { display: none; padding: 4px 6px; border-radius: 3px; background: rgba(229,9,20,.95); font-size: 10px; font-weight: 800; }
.card:hover .trailer-badge { display: inline-flex; }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); font-size: 28px; font-weight: 950; }
.rail-arrow {
  position: absolute;
  z-index: 8;
  top: 8px;
  bottom: 28px;
  width: clamp(42px, 4vw, 68px);
  border: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 50px;
  background: rgba(0,0,0,.58);
  transition: opacity .15s ease, background .15s ease;
}
.rail-shell:hover .rail-arrow:not(:disabled), .rail-arrow:focus-visible:not(:disabled) { opacity: 1; }
.rail-arrow:hover { background: rgba(0,0,0,.78); }
.rail-arrow:disabled { opacity: 0; pointer-events: none; }
.rail-arrow.left { left: 0; border-radius: 0 5px 5px 0; }
.rail-arrow.right { right: 0; border-radius: 5px 0 0 5px; }

.ranked-row .rail { gap: clamp(12px, 1.4vw, 24px); }
.ranked-card {
  display: flex;
  align-items: flex-end;
  flex-basis: clamp(230px, 20vw, 340px);
}
.rank-number {
  position: relative;
  z-index: 0;
  width: 43%;
  margin-right: -5%;
  color: #050505;
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(130px, 14vw, 220px);
  line-height: .74;
  letter-spacing: -12px;
  text-align: right;
  -webkit-text-stroke: 2px #bcbcbc;
  text-shadow: 4px 4px 0 #050505;
  user-select: none;
}
.ranked-card .card-artwork {
  z-index: 1;
  width: 62%;
  aspect-ratio: 2 / 3;
  flex: none;
}
.ranked-card:hover .card-artwork { transform: scale(1.04); }

.loading-state, .empty-state {
  min-height: 240px;
  padding: 80px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  color: var(--muted);
}
.loading-state span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.18);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Search results */
body.searching { background: #111; }
.search-content { margin-top: 0; padding: calc(var(--header-height) + 42px) var(--page-pad) calc(70px + var(--bottom-nav-height)); }
.search-results-heading p { margin: 0 0 3px; color: var(--muted); }
.search-results-heading h1 { margin: 0 0 24px; font-size: clamp(25px, 3.4vw, 48px); }
.search-grid, .recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(8px, 1.4vw, 18px);
}
.search-grid .card, .recommendations-grid .card { width: 100%; max-width: none; }
.compact-card .card-artwork { aspect-ratio: 2 / 3; }
.compact-card .card-info { padding-top: 50px; }
.search-empty { grid-column: 1 / -1; }

/* Details modal */
.modal[hidden], .trailer-modal[hidden], .toast[hidden] { display: none; }
.modal, .trailer-modal { position: fixed; z-index: 100; inset: 0; overflow-y: auto; padding: clamp(24px, 5vw, 64px) 16px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(7px); }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: auto;
  overflow: hidden;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 30px 100px black;
}
.modal-close {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(24,24,24,.92);
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}
.detail-image { min-height: 500px; background: #111 center 20% / cover no-repeat; position: relative; }
.detail-image::after {
  content: "";
  position: absolute;
  inset: 24% 0 0;
  background: linear-gradient(transparent, rgba(24,24,24,.82) 56%, var(--panel) 88%);
}
.detail-body { position: relative; z-index: 2; margin-top: -150px; padding: 0 clamp(24px, 5vw, 58px) 55px; }
.detail-body h2 { max-width: 800px; margin: 0 0 8px; font-size: clamp(34px, 5.4vw, 66px); line-height: 1; letter-spacing: -2px; text-wrap: balance; }
.detail-actions { margin-top: 18px; }
.circle-action { width: 46px; min-width: 46px; padding: 0; border: 2px solid #a7a7a7; border-radius: 50%; background: #242424; font-size: 27px; }
.circle-action.saved { border-color: white; background: white; color: black; }
.detail-copy { max-width: 850px; margin-top: 26px; }
.detail-copy > p { margin: 0; line-height: 1.55; }
.detail-inline-fact { margin-top: 7px !important; color: #ddd; font-size: 14px; }
.detail-inline-fact > span:first-child { color: #8b8b8b; }
.detail-body h3 { margin: 38px 0 15px; font-size: 23px; }
.recommendations-grid { grid-template-columns: repeat(3, 1fr); }

.detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 34px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.detail-tab {
  position: relative;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: #cfcfcf;
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
}
.detail-tab::before {
  content: "";
  position: absolute;
  inset: -2px 18% auto;
  height: 3px;
  border-radius: 99px;
  background: transparent;
}
.detail-tab.active { color: #fff; }
.detail-tab.active::before { background: var(--accent); }
.episodes-section { margin-top: 22px; }
.season-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.season-select {
  min-width: 190px;
  max-width: 100%;
  padding: 11px 38px 11px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px;
  background: #242424;
  color: #fff;
  font: inherit;
  font-weight: 750;
}
.season-count { color: var(--muted); font-size: 14px; }
.episodes-status { margin: 18px 0; color: var(--muted); }
.episodes-list { display: grid; }
.episode-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 230px) 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 150px;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.14);
}
.episode-artwork {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  background: #111;
}
.episode-artwork img { width: 100%; height: 100%; object-fit: cover; }
.episode-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #777; font-weight: 900; }
.episode-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
  min-width: 0;
}
.episode-number { padding-top: 2px; color: #ddd; font-size: 20px; }
.episode-title-wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; min-width: 0; }
.episode-title-wrap h4 { margin: 0; font-size: 17px; line-height: 1.25; }
.episode-meta { flex: none; color: var(--muted); font-size: 14px; }
.episode-copy p { grid-column: 2; margin: 9px 0 0; color: #c6c6c6; line-height: 1.45; }
.episode-play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: rgba(0,0,0,.54);
  color: white;
  font-size: 17px;
  cursor: pointer;
}
.episode-play:hover { background: #fff; color: #000; }
.episode-row.clickable {
  cursor: pointer;
  border-radius: 8px;
  transition: background-color .18s ease, transform .18s ease;
}
.episode-row.clickable:hover { background: rgba(255,255,255,.075); }
.episode-row.clickable:focus-visible {
  outline: 2px solid rgba(255,255,255,.9);
  outline-offset: 2px;
  background: rgba(255,255,255,.08);
}

.next-server-button {
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 999px;
  background: rgba(20,20,20,.88);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  pointer-events: auto;
}
.player-message { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.muted-copy { color: var(--muted); }

/* Trailer dialog */
.trailer-modal { z-index: 130; display: grid; place-items: center; overflow: auto; }
.trailer-shell { position: relative; z-index: 1; width: min(1100px, 100%); margin: auto; }
.trailer-ratio { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 8px; background: black; box-shadow: 0 30px 100px black; }
.trailer-ratio iframe { width: 100%; height: 100%; border: 0; }
.trailer-shell h2 { margin: 16px 4px 0; font-size: clamp(18px, 2.5vw, 30px); }
.trailer-close { position: absolute; top: -17px; right: -10px; }

.toast { position: fixed; z-index: 300; right: 20px; bottom: calc(20px + var(--bottom-nav-height)); max-width: min(360px, calc(100vw - 40px)); padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 5px; background: #252525; box-shadow: 0 12px 40px black; }

/* Player */
.player-page { min-height: 100vh; overflow: hidden; background: #000; }
.player-header { position: fixed; z-index: 10; inset: 0 0 auto; height: 62px; display: flex; align-items: center; padding: 0 18px; padding-top: env(safe-area-inset-top); background: linear-gradient(rgba(0,0,0,.82), transparent); }
.back-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); cursor: pointer; font-size: 22px; }
.video-wrap { height: 100svh; display: grid; place-items: center; }
.video-wrap video { width: 100%; height: 100%; background: black; }
.player-message { position: fixed; inset: 0; display: grid; place-items: center; padding: 30px; text-align: center; pointer-events: none; }

.mobile-nav { display: none; }

/* Tablet and mobile */
@media (max-width: 899px) {
  :root {
    --header-height: calc(58px + env(safe-area-inset-top));
    --page-pad: clamp(14px, 3vw, 26px);
    --bottom-nav-height: calc(64px + env(safe-area-inset-bottom));
  }
  body { padding-bottom: var(--bottom-nav-height); }
  .topbar { height: var(--header-height); padding-top: env(safe-area-inset-top); gap: 12px; }
  .brand-word { display: inline-block; font-size: 16px; letter-spacing: -.7px; white-space: nowrap; }
  .desktop-nav { display: none; }
  .top-actions { gap: 0; }
  .search-form {
    position: fixed;
    z-index: 80;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    height: 54px;
    padding: 0 var(--page-pad);
    border-width: 1px 0;
    transform: translateY(-14px);
    transition: opacity .18s ease, transform .18s ease;
  }
  .search-wrap.open .search-form { width: 100%; padding: 0 var(--page-pad); transform: translateY(0); }
  .search-wrap.open .search-toggle { opacity: 1; pointer-events: auto; }
  body.search-open main { padding-top: 54px; }
  .hero { min-height: min(70svh, 660px); padding-bottom: 88px; }
  .hero-content { width: min(640px, 88vw); }
  .hero h1 { font-size: clamp(36px, 8vw, 68px); letter-spacing: -2px; }
  .hero-overview { max-width: 560px; -webkit-line-clamp: 3; }
  .hero-trailer { display: none; }
  .hero-shade {
    background:
      linear-gradient(90deg, rgba(0,0,0,.82), rgba(0,0,0,.25) 70%),
      linear-gradient(0deg, var(--bg) 0%, rgba(5,5,5,.8) 13%, transparent 52%);
  }
  .content { margin-top: -54px; padding-bottom: calc(30px + var(--bottom-nav-height)); }
  .row-section { margin-bottom: 22px; }
  .row-title { font-size: clamp(19px, 3vw, 26px); }
  .rail { gap: 7px; padding-bottom: 18px; }
  .card { flex-basis: clamp(132px, 31vw, 190px); }
  .card-artwork { aspect-ratio: 2 / 3; }
  .card:hover .card-artwork, .card:focus-visible .card-artwork { transform: none; }
  .card-info { padding-top: 46px; }
  .card-title { font-size: 12px; }
  .card-meta { display: none !important; }
  .card-badges { top: 7px; right: 7px; }
  .play-badge { width: 25px; height: 25px; }
  .rail-arrow { display: none; }
  .ranked-card { flex-basis: clamp(205px, 48vw, 290px); }
  .rank-number { font-size: clamp(128px, 30vw, 190px); }
  .ranked-card .card-artwork { width: 62%; }
  .mobile-nav {
    position: fixed;
    z-index: 70;
    inset: auto 0 0;
    height: var(--bottom-nav-height);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
    background: rgba(18,18,18,.98);
    border-top: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(14px);
  }
  .mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 10px;
    cursor: pointer;
  }
  .mobile-nav-link svg { width: 23px; height: 23px; }
  .mobile-nav-link.active { color: white; }
  .search-content { padding-top: calc(var(--header-height) + 24px); }
  body.search-open .search-content { padding-top: calc(var(--header-height) + 78px); }
  .search-grid { grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 8px; }
  .modal { padding: 0; }
  .modal-card { min-height: 100svh; border-radius: 0; }
  .detail-image { min-height: min(48svh, 440px); }
  .detail-body { margin-top: -100px; padding: 0 var(--page-pad) calc(36px + env(safe-area-inset-bottom)); }
  .detail-body h2 { font-size: clamp(34px, 7vw, 56px); }
  .recommendations-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .trailer-modal { padding: 0; }
  .trailer-shell { width: 100%; }
  .trailer-ratio { border-radius: 0; }
  .trailer-shell h2 { padding: 0 14px; }
  .trailer-close { top: 10px; right: 10px; }
}

@media (max-width: 560px) {
  .hero { min-height: 64svh; padding-bottom: 70px; }
  .hero-content { width: 94vw; }
  .eyebrow { font-size: 10px; letter-spacing: 2px; }
  .hero h1 { margin-bottom: 10px; font-size: clamp(32px, 11vw, 52px); }
  .hero-overview { font-size: 14px; line-height: 1.42; -webkit-line-clamp: 3; }
  .meta { font-size: 13px; }
  .hero-buttons { margin-top: 16px; gap: 8px; }
  .button { min-height: 42px; padding: 9px 15px; font-size: 14px; }
  .button svg { width: 19px; height: 19px; }
  #heroInfo { padding-inline: 13px; }
  .content { margin-top: -38px; }
  .row-heading { padding-inline: 13px; }
  .rail { padding-inline: 13px; scroll-padding-inline: 13px; }
  .card { flex-basis: clamp(118px, 35vw, 155px); }
  .ranked-card { flex-basis: clamp(188px, 57vw, 235px); }
  .rank-number { font-size: clamp(115px, 36vw, 160px); -webkit-text-stroke-width: 1.5px; }
  .search-content { padding-inline: 13px; }
  .search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .search-grid .card-title { font-size: 10px; }
  .detail-image { min-height: 38svh; }
  .detail-body { margin-top: -68px; }
  .detail-actions { gap: 8px; }
  .detail-actions .button:not(.circle-action) { flex: 1; }
  .detail-body h3 { margin-top: 30px; }
  .recommendations-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1600px) {
  :root { --page-pad: clamp(64px, 4vw, 96px); }
  .card { flex-basis: clamp(250px, 15vw, 330px); }
  .hero-content { width: min(760px, 48vw); }
}

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


@media (max-width: 760px) {
  .detail-tabs { margin-top: 28px; }
  .detail-tab { min-height: 48px; font-size: 14px; }
  .season-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .season-select { width: 100%; }
  .episode-row {
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 112px;
    padding: 14px 0;
  }
  .episode-copy { grid-template-columns: auto 1fr; column-gap: 9px; }
  .episode-number { font-size: 16px; }
  .episode-title-wrap { display: block; }
  .episode-title-wrap h4 { font-size: 15px; }
  .episode-meta { display: block; margin-top: 3px; font-size: 12px; }
  .episode-copy p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .episode-play { width: 38px; height: 38px; font-size: 14px; }
}

@media (max-width: 480px) {
  .episode-row { grid-template-columns: 112px minmax(0, 1fr); }
  .episode-play {
    position: absolute;
    left: 38px;
    top: 43px;
    width: 36px;
    height: 36px;
  }
  .episode-copy p { grid-column: 1 / -1; margin-left: 0; }
}

/* Integrated multi-server player */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.player-page select:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.player-controls-container {
  position: fixed;
  z-index: 30;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%;
  width: min(78vw, 360px);
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.server-select {
  pointer-events: auto;
  width: 100%;
  min-width: 190px;
  max-width: 360px;
  padding: 10px 38px 10px 22px;
  border: 1px solid rgba(73, 154, 19, .58);
  border-radius: 999px;
  background-color: rgba(15, 15, 15, .58);
  background-image:
    linear-gradient(45deg, transparent 50%, #499a13 50%),
    linear-gradient(135deg, #499a13 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: #67c52a;
  box-shadow: 0 10px 34px rgba(0,0,0,.68), inset 0 0 10px rgba(255,255,255,.04);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  text-align-last: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .25px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.server-select:hover {
  color: #fff;
  border-color: #499a13;
  background-color: rgba(73,154,19,.22);
  transform: translateY(-1px);
}
.server-select option {
  color: #fff;
  background: #0a0a0a;
  text-align: center;
}
.embed-wrapper,
.embed-player-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.embed-wrapper { position: absolute; inset: 0; }
.embed-player-frame { display: block; }
.video-wrap { position: relative; overflow: hidden; background: #000; }
.video-wrap video { object-fit: contain; }
.player-message {
  z-index: 40;
  background: radial-gradient(circle at center, rgba(0,0,0,.45), rgba(0,0,0,.86));
  font-weight: 650;
}
.player-message[hidden] { display: none; }

@media (max-width: 640px) {
  .player-header {
    height: calc(58px + env(safe-area-inset-top));
    padding-inline: 10px;
  }
  .back-button { width: 40px; height: 40px; }
  .player-controls-container {
    top: calc(14px + env(safe-area-inset-top));
    width: min(68vw, 280px);
  }
  .server-select {
    min-width: 0;
    padding-block: 9px;
    font-size: 13px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .player-controls-container { top: calc(8px + env(safe-area-inset-top)); }
  .server-select { padding-block: 7px; }
  .player-header { height: calc(50px + env(safe-area-inset-top)); }
  .back-button { width: 36px; height: 36px; }
}

/* v1.4.1: auto-hide provider selector while playback is active */
.player-controls-container {
  opacity: 1;
  visibility: visible;
  transition: opacity .24s ease, visibility .24s ease, transform .24s ease;
}
.player-controls-container.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -10px);
  pointer-events: none;
}
.player-tap-layer {
  position: absolute;
  z-index: 25;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.player-tap-layer[hidden] { display: none; }
.player-header { z-index: 35; }
.player-controls-container { z-index: 36; }
.player-message { z-index: 40; }

/* v1.5.0 browse categories + Continue Watching */
.category-wrap { flex: none; }
.category-select {
  max-width: 190px;
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 4px;
  background: rgba(0,0,0,.54);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.category-select:hover, .category-select:focus-visible { border-color: rgba(255,255,255,.8); background: rgba(20,20,20,.92); }

.continue-card { flex-basis: clamp(230px, 22vw, 350px); }
.continue-card .card-artwork { aspect-ratio: 16 / 9; }
.continue-card .card-info { padding-bottom: 24px; }
.watch-progress {
  position: absolute;
  z-index: 4;
  left: 10px;
  right: 10px;
  bottom: 7px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.34);
}
.watch-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.continue-label {
  position: absolute;
  z-index: 4;
  left: 10px;
  right: 10px;
  bottom: 14px;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px #000;
}
.continue-card .watch-progress { bottom: 6px; }
.resume-episode { box-shadow: inset 3px 0 0 var(--accent); background: rgba(229,9,20,.045); }
.resume-episode .episode-meta { color: #fff; font-weight: 700; }

@media (max-width: 899px) {
  .category-wrap { margin-left: 2px; }
  .category-select { width: clamp(112px, 28vw, 170px); max-width: 30vw; height: 34px; font-size: 12px; }
  .continue-card { flex-basis: clamp(210px, 54vw, 320px); }
  .continue-card .card-artwork { aspect-ratio: 16 / 9; }
  .continue-card .card-info { padding-top: 34px; padding-bottom: 24px; }
  .continue-label { font-size: 10px; }
}

@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .category-select { width: 108px; max-width: 108px; padding-left: 9px; padding-right: 22px; font-size: 11px; }
  .continue-card { flex-basis: min(78vw, 292px); }
}


/* v1.6.0 independent genre browsing */
body.genre-browse .nav-link.active,
body.genre-browse .mobile-nav-link.active {
  color: inherit;
  font-weight: inherit;
}
@media (max-width: 420px) {
  .brand-word { font-size: 13px; letter-spacing: -.55px; }
}
