/* StreamUltras — Series. Netflix-style dark UI. */

:root {
  --bg: #0b0b0f;
  --bg-2: #131318;
  --card: #1a1a22;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f4;
  --muted: #9a9aa5;
  --accent: #e0473a;
  --accent-2: #ff7a45;
  --chip: rgba(255, 255, 255, 0.1);
  --radius: 10px;
  --topbar-h: 64px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
::selection { background: var(--accent); color: #fff; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--topbar-h);
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.92), rgba(5, 5, 8, 0.55) 70%, transparent);
  backdrop-filter: blur(8px);
  transition: background 0.25s ease;
}
.topbar.solid { background: rgba(8, 8, 12, 0.92); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1600px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 26px; padding: 0 26px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: 0 0 auto; }
.brand svg { color: var(--accent); }
.brand-name { font-weight: 800; letter-spacing: 0.06em; font-size: 1.12rem; }
.brand-name b { color: var(--accent); font-weight: 800; }
.brand-tag {
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; margin-left: 2px;
}
.mainnav { display: flex; align-items: center; gap: 4px; }
.navlink {
  color: #cfcfd6; background: none; border: 0; padding: 8px 12px; border-radius: 8px;
  font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px;
}
.navlink:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.navlink.active { color: #fff; font-weight: 600; }
.caret { font-size: 0.7rem; opacity: 0.8; }
.catmenu { position: relative; }
.catdrop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 70;
  width: 320px; max-height: 70vh; overflow: auto;
  background: rgba(16, 16, 22, 0.98); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px;
}
.catdrop button {
  display: flex; justify-content: space-between; width: 100%;
  background: none; border: 0; color: #d8d8de; padding: 9px 12px; border-radius: 8px;
  font-size: 0.9rem; text-align: left;
}
.catdrop button:hover, .catdrop button.sel { background: var(--chip); color: #fff; }
.catdrop .cnt { color: var(--muted); font-size: 0.78rem; }
.catdrop h3 { margin: 10px 12px 4px; font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }

.topactions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.searchbox {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  background: rgba(10, 10, 14, 0.7); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; min-width: 230px;
  transition: border-color 0.15s ease, min-width 0.2s ease;
}
.searchbox:focus-within { border-color: rgba(255, 255, 255, 0.45); min-width: 300px; }
.searchbox input {
  background: none; border: 0; outline: 0; color: var(--text); width: 100%;
  font-size: 0.92rem;
}
.searchbox input::placeholder { color: #7c7c88; }
.search-scope { font-size: 0.7rem; background: var(--chip); color: #cfd; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.iconbtn {
  background: none; border: 0; color: #d8d8de; padding: 8px; border-radius: 8px; display: grid; place-items: center;
}
.iconbtn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ---------- hero ---------- */
main { padding-top: 0; }
.hero { position: relative; height: min(88vh, 760px); min-height: 480px; overflow: hidden; background: #0b0b0f; }
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; }
.hero-slide.on { opacity: 1; }
/* The artwork layer. Desktop shows it full-bleed (`cover`); phones fit the
 * whole backdrop (`contain`) in a native 16:9 banner — never cropped. */
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center 22%; background-repeat: no-repeat; }
.hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 12, 0.95) 0%, rgba(8, 8, 12, 0.6) 40%, transparent 75%),
              linear-gradient(0deg, var(--bg) 2%, transparent 30%);
}
.hero-body {
  position: absolute; left: 0; right: 0; bottom: 10%;
  max-width: 1600px; margin: 0 auto; padding: 0 44px;
  display: flex; flex-direction: column; gap: 14px;
}
.hero-kicker { font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.hero-title { font-size: clamp(2rem, 4.6vw, 4rem); font-weight: 800; line-height: 1.05; margin: 0; text-shadow: 0 4px 26px rgba(0,0,0,.6); }
.hero-sub { display: flex; gap: 10px; align-items: center; color: #d5d5dc; font-size: 0.95rem; flex-wrap: wrap; }
.hero-over { max-width: 560px; color: #c9c9d2; font-size: 1rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 8px;
  padding: 12px 26px; font-size: 1.02rem; font-weight: 700; transition: transform 0.1s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-play { background: #fff; color: #101014; }
.btn-play:hover { background: #dcdce2; }
.btn-ghost { background: rgba(109, 109, 110, 0.45); color: #fff; backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(109, 109, 110, 0.65); }
.btn-accent { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; }
.hero-dots { position: absolute; bottom: 22px; right: 44px; display: flex; gap: 7px; }
.hero-dots button { width: 22px; height: 4px; border-radius: 4px; border: 0; background: rgba(255,255,255,0.28); padding: 0; }
.hero-dots button.on { background: #fff; }

/* ---------- rows ---------- */
.rows { position: relative; margin-top: -60px; padding-bottom: 40px; z-index: 5; }
.row { margin: 0 0 34px; }
.row-head { display: flex; align-items: baseline; gap: 14px; padding: 0 44px 10px; }
.row-head h2 { font-size: 1.25rem; margin: 0; font-weight: 700; }
.row-head .seeall { color: var(--muted); font-size: 0.85rem; opacity: 0; transition: opacity 0.15s; }
.row:hover .seeall { opacity: 1; }
.row-wrap { position: relative; }
.row-scroller {
  display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth;
  padding: 6px 44px 14px; scrollbar-width: none;
}
.row-scroller::-webkit-scrollbar { display: none; }
.row-arrow {
  position: absolute; top: 0; bottom: 14px; width: 46px; z-index: 6;
  background: linear-gradient(90deg, rgba(8,8,12,0.85), transparent);
  border: 0; color: #fff; font-size: 1.7rem; opacity: 0; transition: opacity 0.15s;
  display: grid; place-items: center;
}
.row-wrap:hover .row-arrow { opacity: 1; }
.row-arrow.left { left: 0; }
.row-arrow.right { right: 0; background: linear-gradient(270deg, rgba(8,8,12,0.85), transparent); }

/* ---------- continue watching ---------- */
.card.cw .cw-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 9;
  background: rgba(255, 255, 255, 0.22);
}
.card.cw .cw-bar i { display: block; height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; }
.cw-remove {
  position: absolute; top: 6px; right: 6px; z-index: 9; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(8, 8, 12, 0.78); color: #fff; border: 1px solid var(--line); font-size: .85rem;
  display: grid; place-items: center; opacity: 0; transition: opacity .15s ease;
}
.card.cw:hover .cw-remove, .card.cw:focus .cw-remove { opacity: 1; }
.cw-left { color: var(--muted); font-weight: 500; font-size: .95em; white-space: nowrap; }

/* touch devices: no hover, so keep the right arrow visible and add a
 * bouncing "›" hint until the viewer scrolls the row for the first time */
.row-hint {
  display: none; position: absolute; right: 6px; top: 18%; bottom: 30%; width: 52px; z-index: 7;
  place-items: center; pointer-events: none; color: #fff; font-size: 2rem; font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}
.row-hint::before { content: "›"; animation: hintNudge 1.6s ease-in-out infinite; display: block; }
@keyframes hintNudge {
  0%, 100% { transform: translateX(0); opacity: 1; }
  55% { transform: translateX(10px); opacity: .25; }
}
@media (hover: none) {
  .row-wrap:not(.scrolled) .row-hint { display: grid; }
  .row-wrap:not(.scrolled) .row-arrow.right { opacity: .85; }
  .row-arrow.left { display: none; }
  .card.cw .cw-remove { opacity: 1; }
}

.card {
  flex: 0 0 auto; width: 170px; border-radius: var(--radius); overflow: hidden;
  background: var(--card); cursor: pointer; position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { transform: translateY(-5px) scale(1.04); box-shadow: var(--shadow); z-index: 8; }
.card img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; background: #202028; }
.card .noimg {
  width: 100%; aspect-ratio: 2 / 3; display: grid; place-items: center;
  background: linear-gradient(160deg, #1c1c24, #121218); color: #6f6f7c; font-size: 0.8rem; padding: 8px; text-align: center;
}
.card-badges { position: absolute; top: 7px; left: 7px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; padding: 2px 7px;
  border-radius: 5px; background: rgba(8, 8, 12, 0.78); color: #eaeaf0; backdrop-filter: blur(3px);
}
.badge.q4k { background: #6d28d9; }
.badge.hd { background: #1d4ed8; }
.badge.multi { background: #0f766e; }
.badge.sub { background: #9f1239; }
.card-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 9px 8px;
  font-size: 0.8rem; font-weight: 600; line-height: 1.25;
  background: linear-gradient(0deg, rgba(6, 6, 10, 0.92), transparent);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.15s;
  background: rgba(6, 6, 10, 0.25);
}
.card:hover .card-play { opacity: 1; }
.card-play span {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #111;
  display: grid; place-items: center; font-size: 1.15rem; padding-left: 4px;
}

/* ---------- browse grid ---------- */
.browse { padding: calc(var(--topbar-h) + 20px) 44px 60px; max-width: 1600px; margin: 0 auto; }
.browse-head h1 { margin: 0 0 6px; font-size: 1.9rem; }
.grid {
  display: grid; gap: 14px; margin-top: 22px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.grid .card { width: auto; }
.grid-sentinel { height: 1px; }
.grid-empty { color: var(--muted); padding: 60px 0; text-align: center; font-size: 1.05rem; }

.status-msg { padding: calc(var(--topbar-h) + 80px) 30px 120px; text-align: center; color: var(--muted); font-size: 1.05rem; }

/* skeleton */
.skeleton { position: relative; overflow: hidden; background: #17171e; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(4, 4, 8, 0.75);
  display: grid; place-items: start center; overflow-y: auto; padding: 5vh 16px 60px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: min(860px, 100%); background: var(--bg-2); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); position: relative; animation: pop 0.2s ease;
}
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(10, 10, 14, 0.75); border: 0; color: #fff; font-size: 1rem;
}
.modal-hero { position: relative; aspect-ratio: 16 / 7; background-size: cover; background-position: center 30%; }
.modal-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg-2) 4%, transparent 60%); }
.modal-hero .m-title {
  position: absolute; left: 34px; right: 34px; bottom: 18px; z-index: 2;
  font-size: clamp(1.4rem, 3vw, 2.3rem); font-weight: 800; margin: 0; text-shadow: 0 3px 18px rgba(0,0,0,.7);
}
.modal-body { padding: 22px 34px 30px; display: flex; flex-direction: column; gap: 16px; }
.cw-resume-bar { display: flex; flex-direction: column; gap: 6px; }
.cw-resume-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.cw-resume-track i { display: block; height: 100%; background: var(--accent); }
.cw-resume-txt { font-size: .82rem; color: var(--muted); letter-spacing: .02em; }
.modal-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: #cfced6; font-size: 0.92rem; }
.modal-meta .match { color: #4ade80; font-weight: 700; }
.modal-cols { display: grid; grid-template-columns: 1fr 260px; gap: 26px; }
.modal-over { color: #d6d6de; line-height: 1.55; font-size: 0.98rem; }
.modal-facts { color: var(--muted); font-size: 0.86rem; display: flex; flex-direction: column; gap: 7px; }
.modal-facts b { color: #d9d9e2; font-weight: 600; }
.modal-streams { display: flex; flex-wrap: wrap; gap: 9px; }
.stream-chip {
  background: linear-gradient(180deg, #22222c, #191921); border: 1px solid var(--line); color: var(--text);
  padding: 10px 16px 10px 10px; border-radius: 10px; font-size: .88rem; font-weight: 700;
  display: inline-flex; gap: 11px; align-items: center; cursor: pointer;
  transition: border-color .12s ease, transform .1s ease, background .15s ease;
}
.stream-chip:hover { border-color: rgba(255, 255, 255, 0.45); transform: translateY(-1px); }
.stream-chip .schip-ico {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  background: #fff; color: #111; display: grid; place-items: center; font-size: .8rem; padding-left: 2px;
}
.stream-chip:hover .schip-ico { background: var(--accent); color: #fff; }
.stream-chip .schip-txt { display: grid; line-height: 1.2; text-align: left; }
.stream-chip .schip-txt em { font-style: normal; font-weight: 500; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.chip {
  display: inline-block; background: var(--chip); border: 1px solid var(--line);
  color: #d9d9e2; font-size: 0.75rem; padding: 3px 10px; border-radius: 99px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #232330; color: #fff; padding: 11px 22px; border-radius: 10px;
  box-shadow: var(--shadow); z-index: 120; font-size: 0.92rem; animation: pop 0.18s ease;
}

/* ---------- footer ---------- */
.sitefoot {
  border-top: 1px solid var(--line); color: #6d6d78; font-size: 0.82rem;
  display: flex; justify-content: space-between; padding: 26px 44px 40px; max-width: 1600px; margin: 0 auto;
}
.sitefoot a { color: #8b8b96; }
.sitefoot a:hover { color: #fff; }

/* ---------- community launcher (bottom-left bubble + panel) ---------- */
.cwrap {
  position: fixed; left: 16px; z-index: 90;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.cbubble {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  border: 0; border-radius: 99px; padding: 13px 19px; font-weight: 800; font-size: 0.92rem;
  box-shadow: 0 12px 32px rgba(224, 71, 58, 0.45), 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: cbubblePulse 2.8s ease-in-out infinite;
}
.cbubble:hover { filter: brightness(1.08); }
.cbubble:active { transform: scale(0.97); }
.cbubble svg { flex: 0 0 auto; }
@keyframes cbubblePulse {
  0%, 100% { box-shadow: 0 12px 32px rgba(224, 71, 58, .45), 0 0 0 0 rgba(255, 122, 69, .45); }
  55% { box-shadow: 0 12px 32px rgba(224, 71, 58, .45), 0 0 0 12px rgba(255, 122, 69, 0); }
}
.cpanel {
  position: absolute; left: 0; bottom: calc(100% + 12px);
  width: min(340px, calc(100vw - 32px));
  max-height: min(66vh, 560px); max-height: min(66dvh, 560px); overflow: auto;
  background: rgba(16, 16, 22, 0.98); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 18px 18px 16px; display: grid; gap: 12px;
  transform-origin: 10% bottom; animation: cpanelIn 0.16s ease-out; overscroll-behavior: contain;
}
@keyframes cpanelIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
.cpanel h3 { margin: 0; font-size: 1.06rem; line-height: 1.25; padding-right: 26px; }
.cpanel p { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.cpanel-x {
  position: absolute; top: 10px; right: 10px; background: none; border: 0;
  color: var(--muted); font-size: 0.95rem; padding: 4px 8px; border-radius: 6px;
}
.cpanel-x:hover { color: #fff; background: var(--chip); }
.cpanel-list { display: grid; gap: 8px; }
.ccta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.ccta:hover { border-color: rgba(255, 122, 69, 0.55); background: rgba(255, 122, 69, 0.07); transform: translateX(2px); }
.ccta-body { display: grid; gap: 2px; min-width: 0; }
.ccta-body b { font-size: 0.93rem; }
.ccta-body small { color: var(--muted); font-size: 0.77rem; line-height: 1.35; }
.ccta-arr { color: var(--accent-2); font-size: 1.05rem; flex: 0 0 auto; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .topbar-inner { gap: 12px; padding: 0 14px; }
  .mainnav { gap: 2px; }
  .mainnav .navlink { padding: 8px; font-size: 0.86rem; }
  .searchbox { min-width: 150px; }
  .searchbox:focus-within { min-width: 190px; }
  .hero-body { padding: 0 20px; }
  .hero-over { display: none; }
  .row-head, .row-scroller { padding-left: 20px; padding-right: 20px; }
  .browse { padding-left: 16px; padding-right: 16px; }
  .card { width: 128px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .modal-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* sleek, compact menu bar on phones */
  :root { --topbar-h: 54px; }
  .brand { gap: 7px; }
  .brand svg { width: 24px; height: 24px; }
  .brand-tag { display: none; }
  /* keep the top bar inside the viewport — it used to overflow and drag the
   * whole page (hero included) sideways on phones */
  .brand-name { display: none; }
  .topbar-inner { gap: 6px; padding: 0 8px; }
  .mainnav { gap: 0; }
  .mainnav .navlink { padding: 6px 7px; font-size: 0.78rem; border-radius: 7px; }
  .nav-l { display: none; }             /* "Continue Watching" → "Continue", Community → icon */
  .searchbox { min-width: 0; flex: 1 1 auto; padding: 5px 9px; gap: 6px; }
  .searchbox:focus-within { min-width: 0; }
  .searchbox input { font-size: 0.84rem; }
  .iconbtn { padding: 6px; }
  .search-scope { display: none; }

  /* community launcher: full-bleed panel, compact bubble */
  .cwrap { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .cbubble { padding: 11px 15px; font-size: 0.85rem; }
  .cpanel { width: calc(100vw - 24px); }

  /* Hero on phones: show the whole backdrop, zero crop. The image becomes a
   * native 16:9 banner and the text flows underneath it (no overlay slab,
   * no blur, nothing cut off). */
  .hero { height: auto; min-height: 0; }
  .hero-slides { position: relative; inset: auto; aspect-ratio: 16 / 9; background: #0b0b0f; }
  .hero-slide { position: absolute; inset: 0; }
  .hero-img { background-size: contain; background-position: center center; }
  .hero-fade { display: none; }
  .hero-slides::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
    background: linear-gradient(0deg, var(--bg) 6%, transparent); pointer-events: none;
  }
  .hero-body { position: relative; inset: auto; max-width: none; padding: 18px 20px 0; }
  .hero-dots { position: relative; inset: auto; justify-content: center; padding: 16px 20px 6px; }
  .rows { margin-top: 4px; }
}

/* ---------- fun & polish ---------- */
/* slow drifting aurora behind everything */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none; opacity: .55;
  background:
    radial-gradient(38vmax 38vmax at 18% 12%, rgba(224, 71, 58, .17), transparent 60%),
    radial-gradient(46vmax 46vmax at 85% 30%, rgba(255, 122, 69, .13), transparent 62%),
    radial-gradient(40vmax 40vmax at 60% 92%, rgba(96, 66, 245, .12), transparent 60%);
  filter: blur(30px) saturate(1.25);
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, -3vh, 0) scale(1.12); }
  100% { transform: translate3d(-3vw, 4vh, 0) scale(1.05); }
}

/* hero slides: plain cross-fade — the old ken-burns zoom/drift was distracting */
.hero-slide { transform: none; }

/* cards: 3D tilt (JS feeds the vars), shine sweep, lift */
.card { overflow: hidden; transform: perspective(700px) rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg)); transition: transform .18s ease, box-shadow .2s ease; }
.card::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none; z-index: 3;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .16) 49%, transparent 57%);
  transform: translateX(-130%); transition: transform .65s ease;
}
.card:hover { transform: perspective(700px) translateY(-5px) scale(1.04) rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg));
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 122, 69, .38), 0 18px 48px rgba(224, 71, 58, .28); z-index: 8; }
.card:hover::after { transform: translateX(130%); }
.card.pop { animation: cardPop .5s cubic-bezier(.2, .8, .25, 1) backwards; }
@keyframes cardPop { from { opacity: 0; transform: translateY(22px) scale(.93); } to { opacity: 1; } }

/* brand mark breathes */
.brand svg { animation: brandGlow 5.5s ease-in-out infinite; }
@keyframes brandGlow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(224, 71, 58, 0)); } 50% { filter: drop-shadow(0 0 10px rgba(224, 71, 58, .6)); } }

/* nav links slide an accent underline */
.navlink { position: relative; }
.navlink::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.navlink:hover::after, .navlink.active::after { transform: scaleX(1); }

/* search glows while typing */
.searchbox { transition: box-shadow .25s ease, min-width .25s ease; }
.searchbox:focus-within { box-shadow: 0 0 0 2px rgba(255, 122, 69, .4), 0 8px 30px rgba(224, 71, 58, .22); }

/* primary buttons get a soft pulse ring */
.btn-play { position: relative; }
.btn-play:hover { box-shadow: 0 0 0 4px rgba(255, 122, 69, .18), 0 10px 34px rgba(224, 71, 58, .35); }

@media (prefers-reduced-motion: reduce) {
  body::before, .card.pop, .brand svg, .row-hint::before, .cbubble { animation: none; }
  .card::after { display: none; }
}

/* ==================== SERIES: badges, episodes, season picker ==================== */
.badge.tv { background: rgba(224, 71, 58, .92); }
.card.cw .cw-ep {
  position: absolute; top: 6px; left: 6px; z-index: 9; font-size: .6rem; font-weight: 800;
  letter-spacing: .05em; padding: 2px 7px; border-radius: 5px; color: #fff;
  background: rgba(8, 8, 12, .82); backdrop-filter: blur(3px);
}

/* modal hero now carries a full text block (kicker/title/meta/actions) */
.modal-hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, var(--bg-2) 3%, rgba(19,19,24,.55) 45%, rgba(19,19,24,.15) 100%),
              linear-gradient(90deg, rgba(10,10,14,.75), transparent 70%);
}
.modal-hero-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 24px 34px 20px; display: flex; flex-direction: column; gap: 10px;
}
.modal-hero-body .m-kicker {
  font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-2);
}
.modal-hero-body .m-title {
  position: static; left: auto; right: auto; bottom: auto;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 800; margin: 0; line-height: 1.05;
  text-shadow: 0 3px 18px rgba(0,0,0,.75);
}
.m-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: #d2d2da; font-size: .9rem; }
.m-meta .match { color: #4ade80; font-weight: 700; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.modal-actions .btn-play:disabled { opacity: .45; cursor: not-allowed; }
.modal-main { min-width: 0; }
.modal-cols { grid-template-columns: 1fr 280px; }

/* episodes block */
.episodes { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 18px; }
.modal-copies { margin-top: 4px; }
.modal-copies:empty { display: none; }
.copies-h { margin: 0 0 10px; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stream-chip.sel { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(224,71,58,.5) inset; }
.stream-chip.sel .schip-ico { background: var(--accent); color: #fff; }
.ep-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.ep-head h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.season-picker { position: relative; }
.season-btn {
  background: #22222c; border: 1px solid var(--line); color: var(--text); font-weight: 700;
  border-radius: 9px; padding: 9px 16px; font-size: .92rem; display: inline-flex; align-items: center; gap: 9px;
}
.season-btn:hover { border-color: rgba(255,255,255,.4); }
.season-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 12; width: 250px; max-height: 320px; overflow: auto;
  background: rgba(18,18,24,.99); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
}
.season-menu button {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; color: #d8d8de; padding: 10px 12px; border-radius: 8px; font-size: .9rem; text-align: left;
}
.season-menu button:hover, .season-menu button.sel { background: var(--chip); color: #fff; }
.season-menu button.sel { box-shadow: inset 3px 0 0 var(--accent); }
.season-menu .ep-cnt { color: var(--muted); font-size: .76rem; }

.ep-list { display: flex; flex-direction: column; gap: 8px; }
.ep-row {
  display: grid; grid-template-columns: 34px 168px 1fr; align-items: center; gap: 16px; width: 100%;
  background: rgba(255,255,255,.025); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px;
  text-align: left; color: var(--text); transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.ep-row:hover { background: rgba(255,255,255,.07); border-color: var(--line); }
.ep-row.current { background: rgba(224,71,58,.1); border-color: rgba(224,71,58,.45); }
.ep-num { font-size: 1.15rem; font-weight: 700; color: var(--muted); text-align: center; }
.ep-row.current .ep-num { color: var(--accent-2); }
.ep-thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #202028;
  display: grid; place-items: center;
}
.ep-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ep-thumb .ep-play {
  position: relative; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: #111; padding-left: 3px; opacity: 0; transition: opacity .15s ease;
}
.ep-row:hover .ep-thumb .ep-play { opacity: 1; }
.ep-tag {
  position: absolute; z-index: 3; left: 6px; top: 6px; font-size: .58rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--accent); color: #fff;
}
.ep-tag.next { background: #1d4ed8; }
.ep-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ep-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ep-top b { font-size: .96rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-dur { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.ep-plot {
  color: #b7b7c2; font-size: .84rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

@media (max-width: 900px) {
  .modal-hero-body { padding: 18px 20px 16px; }
  .modal-cols { grid-template-columns: 1fr; }
  .ep-row { grid-template-columns: 26px 120px 1fr; gap: 12px; padding: 8px; }
  .ep-num { font-size: 1rem; }
}
@media (max-width: 560px) {
  .ep-row { grid-template-columns: 22px 1fr; grid-template-areas: "num thumb" "info info"; row-gap: 8px; }
  .ep-num { grid-area: num; }
  .ep-thumb { grid-area: thumb; }
  .ep-info { grid-area: info; }
  .ep-plot { -webkit-line-clamp: 3; }
}

