/* Flixwave */
:root {
  --bg: #0B0F17;          /* page */
  --surface: #141A24;     /* cards, panels */
  --surface-2: #1C2431;   /* inputs, hover */
  --line: #283243;        /* borders */
  --text: #EAF0F8;
  --text-2: #98A3B5;
  --accent: #2CE0B4;      /* primary action */
  --accent-2: #17B8FF;
  --grad: linear-gradient(90deg, #17B8FF 0%, #2CF29A 100%);
  --accent-glow: rgba(44, 224, 180, .28);
  --danger: #F05260;
  --ok: #2CE0B4;

  --head: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1480px;
  --gutter: clamp(14px, 3vw, 36px);
  --side-w: 224px;
  --top-h: 64px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h2 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1 1 auto; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .85rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.inline { display: inline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- Buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 .95rem/1 var(--body); padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #04201A; }
.btn-primary:hover { box-shadow: 0 0 0 6px var(--accent-glow); }
.btn-ghost { background: rgba(234, 240, 248, .06); color: var(--text); border-color: rgba(234, 240, 248, .22); }
.btn-ghost:hover { background: rgba(234, 240, 248, .14); }
.btn-ghost[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: transparent; color: #FF9CA4; border-color: rgba(240, 82, 96, .5); }
.btn-danger:hover { background: rgba(240, 82, 96, .18); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.play-glyph { width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(234, 240, 248, .25); color: var(--text); }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.score { color: var(--accent); font-weight: 700; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill-ok { background: rgba(127, 200, 160, .15); color: var(--ok); }
.pill-warn { background: rgba(44, 224, 180, .14); color: var(--accent); }

/* ---------- Browse ---------- */
.page-head { padding-top: 40px; }
.page-head h1 { margin-bottom: 4px; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block: 20px 28px; }
.filters.tight { margin: 0 0 8px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg label { padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--text-2); cursor: pointer; }
.seg a[aria-current], .seg label:has(input:checked) { background: var(--text); color: var(--bg); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.select select, .field input, .field textarea {
  width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; font: inherit; font-size: .95rem;
}
.select select { border-radius: 999px; padding: 9px 36px 9px 16px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23F6EDE3' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.field input:focus, .field textarea:focus, .select select:focus { border-color: var(--accent); outline: none; }
.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--text-2); }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 40px; }

/* ---------- Detail ---------- */
.detail { position: relative; isolation: isolate; min-height: 560px; display: flex; align-items: flex-end; }
.detail-inner { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: end; padding-top: 140px; padding-bottom: 40px; }
.detail-poster { aspect-ratio: 2 / 3; border-radius: var(--r-md); overflow: hidden; position: relative; background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: clamp(2.8rem, 6vw, 5.2rem); font-weight: 900; line-height: .92; text-wrap: balance; }
.detail-overview { max-width: 62ch; color: rgba(234, 240, 248, .9); margin-top: 14px; }
@media (max-width: 720px) {
  .detail-inner { grid-template-columns: 1fr; gap: 20px; padding-top: 100px; }
  .detail-poster { width: 150px; }
}

.player-section { margin-top: 20px; }
.player-heading { font-size: 1.6rem; }
.player {
  position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.player-start {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: transparent; border: 0; color: var(--text); font: 700 1.05rem var(--body); cursor: pointer;
}
.play-disc { width: 84px; height: 84px; border-radius: 50%; background: var(--accent); position: relative; transition: box-shadow .2s, transform .2s; }
.play-disc::after { content: ""; position: absolute; left: 34px; top: 26px; border-left: 24px solid #04201A; border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.player-start:hover .play-disc, .player-start:focus-visible .play-disc { box-shadow: 0 0 0 12px var(--accent-glow); transform: scale(1.04); }
.player-empty { display: grid; place-content: center; text-align: center; color: var(--text-2); padding: 20px; gap: 8px; justify-items: center; }
.player.preview { margin-top: 14px; box-shadow: none; }

.episodes { margin-top: 26px; }
.seasons { margin-bottom: 14px; }
.ep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ep { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid transparent; }
.ep:hover { border-color: var(--line); }
.ep.is-on { border-color: var(--accent); }
.ep-num { font: 800 1.6rem/1 var(--head); color: var(--accent); min-width: 30px; text-align: center; }
.ep-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ep-name { font-weight: 700; }
.ep-over { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Reviews ---------- */
.reviews { margin-top: 56px; max-width: 900px; }
.card-surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 14px; align-content: start; }
.review-form { margin-bottom: 24px; }
.stars { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars legend { font-weight: 600; margin-bottom: 8px; float: left; width: 100%; }
.stars input { position: absolute; opacity: 0; }
.stars label { width: 24px; height: 24px; cursor: pointer; background: var(--line);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 7 7 .6-5.3 4.7 1.6 7.2L12 17.8 5.7 21.5l1.6-7.2L2 9.6 9 9z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 7 7 .6-5.3 4.7 1.6 7.2L12 17.8 5.7 21.5l1.6-7.2L2 9.6 9 9z'/%3E%3C/svg%3E") center / contain no-repeat; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { background: var(--accent); }
.stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.review-list li { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.review-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }

/* ---------- Forms, auth ---------- */
.field { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.field > span { color: var(--text-2); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.auth { display: grid; place-items: center; padding-block: 60px 80px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 2.6rem; }

.flashes { max-width: var(--wrap); margin: 16px auto 0; padding-inline: var(--gutter); }
.flash { padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; font-size: .92rem; margin: 0 0 10px; border: 1px solid; }
.flash-ok { background: rgba(127, 200, 160, .1); border-color: rgba(127, 200, 160, .4); color: var(--ok); }
.flash-info { background: rgba(44, 224, 180, .08); border-color: rgba(44, 224, 180, .35); color: var(--accent); }
.flash-error { background: rgba(240, 82, 96, .12); border-color: rgba(240, 82, 96, .5); color: #FFB0B6; }

/* ---------- Admin ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th { text-align: left; color: var(--text-2); font-weight: 600; font-size: .82rem; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid rgba(42, 52, 68, .5); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .actions { white-space: nowrap; text-align: right; }
.admin-table .actions > * { margin-left: 4px; }
.t-cell { display: flex; gap: 12px; align-items: center; }
.t-thumb { width: 38px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); flex: none; }
.t-thumb img { width: 100%; height: 100%; object-fit: cover; }
.edit-form { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.edit-main { display: grid; gap: 22px; }
.edit-side { position: sticky; top: 90px; }
.poster-preview { aspect-ratio: 2 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); max-width: 180px; }
.poster-preview img { width: 100%; height: 100%; object-fit: cover; }
.embed-box { border-color: rgba(44, 224, 180, .45); }
.tmdb-results { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tmdb-results a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-md); border: 1px solid transparent; }
.tmdb-results a:hover { border-color: var(--accent); background: var(--surface-2); }
.ep-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ep-admin li { display: flex; align-items: center; gap: 10px; }
.ep-admin .ep-num { font-size: 1.3rem; }
.ep-admin-season { font-family: var(--head); font-weight: 800; font-size: 1.2rem; margin-top: 10px; color: var(--text-2); }
@media (max-width: 900px) {
  .edit-form { grid-template-columns: 1fr; }
  .edit-side { position: static; }
}

.trailer { width: min(1000px, 94vw); padding: 0; border: 0; background: transparent; color: var(--text); }
.trailer::backdrop { background: rgba(4, 6, 10, .86); backdrop-filter: blur(4px); }
.trailer-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden; }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer form { display: flex; justify-content: center; margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- v2: seasons, episodes, TMDB import ---------- */
.field select { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: .95rem; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 8px 0; width: 100%; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .88em; }

.episodes-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.episodes-head h2 { margin: 0; }
.seasons { margin: 0; }
.ep-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.ep { align-items: flex-start; padding: 10px; }
.ep-still { position: relative; flex: none; width: 150px; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.14) 0 10px, transparent 10px 20px), linear-gradient(160deg, #1C2940, #141A24); }
.ep-still img { width: 100%; height: 100%; object-fit: cover; }
.ep-badge { position: absolute; left: 6px; bottom: 6px; font: 800 1.15rem/1 var(--head); background: rgba(11, 15, 23, .85); color: var(--accent); padding: 3px 7px; border-radius: 4px; }
.ep-now { position: absolute; right: 6px; top: 6px; font-size: .7rem; font-weight: 700; background: var(--accent); color: #04201A; padding: 2px 7px; border-radius: 4px; }
.ep-sub { font-size: .8rem; }
.ep-over { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 2px; }
@media (max-width: 480px) { .ep-list { grid-template-columns: 1fr; } .ep-still { width: 120px; } }

.import-sources { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin-bottom: 28px; }
@media (max-width: 900px) { .import-sources { grid-template-columns: 1fr; } }
.import-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; position: sticky; top: 72px; z-index: 5; margin-bottom: 20px; }
.import-bar h2 { margin: 0; }
.import-bar p { margin: 0; }
.import-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 16px; }
.import-item { position: relative; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.import-item > input { position: absolute; top: 10px; left: 10px; z-index: 2; width: 22px; height: 22px; accent-color: var(--accent); }
.import-item:has(> input:checked) .card-poster { outline-color: var(--accent); }
.import-item.in-lib .card-poster img { opacity: .55; }
.import-status { position: absolute; left: 8px; right: 8px; bottom: 8px; text-align: center; font-size: .78rem; font-weight: 700; padding: 4px; border-radius: var(--r-sm); }
.import-status:empty { display: none; }
.import-status.is-busy { background: rgba(11, 15, 23, .9); color: var(--text); }
.import-status.is-ok { background: var(--ok); color: #0E2A22; }
.import-status.is-fail { background: var(--danger); color: #fff; }
.import-log { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(380px, calc(100vw - 32px)); max-height: 60vh;
  display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-lg); padding: 16px; z-index: 60; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.import-log-head { display: flex; justify-content: space-between; gap: 10px; }
.import-progress { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.import-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.import-log ol { list-style: none; margin: 0; padding: 0; overflow-y: auto; font-size: .85rem; display: grid; gap: 4px; }
.import-log li.is-fail { color: #FFB0B6; }
.ep-admin-box { max-height: calc(100vh - 120px); overflow-y: auto; }
.ep-admin-season { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.ep-admin-season:first-child { border-top: 0; }

/* ---------- Home intro (visible h1 for search engines and people) ---------- */
.home-intro { padding-top: 34px; }
.home-intro h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: .25em; }
.home-intro p { color: var(--text-2); max-width: 70ch; margin: 0; }
.breadcrumbs { font-size: .88rem; color: var(--text-2); margin-bottom: 10px; }
.breadcrumbs a:hover { color: var(--text); }
.genre-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- Streaming providers (home page row, provider pages) ---------- */
.row-track.provider-track { grid-auto-columns: 88px; gap: 16px; }
.provider-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; scroll-snap-align: start; min-width: 0; }
.provider-logo {
  width: 88px; height: 88px; border-radius: 22px; overflow: hidden; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.provider-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.provider-initials { font-weight: 800; font-size: 1.5rem; color: var(--accent); letter-spacing: .02em; }
.provider-tile:hover .provider-logo, .provider-tile:focus-visible .provider-logo { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow), 0 10px 26px rgba(0, 0, 0, .4); }
.provider-name { font-weight: 700; font-size: .88rem; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-tile:hover .provider-name { color: var(--accent); }
.provider-count { font-size: .78rem; color: var(--text-2); }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, 88px); gap: 20px; }
.provider-hero { display: flex; align-items: center; gap: 20px; }
.provider-hero h1 { margin-bottom: 4px; }
.provider-logo-lg { width: 112px; height: 112px; border-radius: 28px; }
@media (max-width: 600px) {
  .row-track.provider-track { grid-auto-columns: 72px; gap: 12px; }
  .provider-grid { grid-template-columns: repeat(auto-fill, 72px); gap: 16px; }
  .provider-logo { width: 72px; height: 72px; border-radius: 18px; }
  .provider-logo-lg { width: 84px; height: 84px; border-radius: 22px; }
  .provider-hero { gap: 14px; }
}

/* ---------- Movie requests ---------- */
.request-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 32px; align-items: start; }
.request-form .seg { justify-self: start; }
.request-found { border: 1px solid var(--accent); border-radius: var(--r-md); padding: 14px; display: grid; gap: 10px; background: rgba(44, 224, 180, .06); }
.request-found p { margin: 0; }
.request-hit { display: flex; align-items: center; gap: 12px; }
.request-hit img { border-radius: 4px; object-fit: cover; flex: none; }
.request-hit > span:nth-child(2), .request-hit > span:first-child:not(.btn) { flex: 1; min-width: 0; }
.request-mine h2 { margin-bottom: 12px; }
.request-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.request-item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.request-item .grow { flex: 1 1 200px; min-width: 0; }
.request-item.is-added { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.req-status { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.req-open { background: rgba(234, 240, 248, .08); color: var(--text-2); }
.req-added { background: rgba(127, 200, 160, .15); color: #2CE0B4; }
.req-no { background: rgba(229, 72, 77, .14); color: #ff9b9e; }
.req-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; width: min(360px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-md); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  padding: 12px 38px 12px 12px; display: grid; gap: 10px; animation: req-in .25s ease-out;
}
.req-toast-item { display: flex; gap: 12px; align-items: center; font-size: .9rem; line-height: 1.35; }
.req-toast-item img { border-radius: 4px; object-fit: cover; flex: none; }
.req-toast-item strong { color: var(--accent); }
.req-toast-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--text-2); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px; }
@keyframes req-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 820px) { .request-layout { grid-template-columns: minmax(0, 1fr); } }
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: #04201A; font-size: .75rem; font-weight: 800; vertical-align: 1px; }
.request-signin { max-width: 560px; }
.request-signin h2 { margin-bottom: 4px; }
.request-signin-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Continue watching ---------- */
.row-track.cw-track { grid-auto-columns: minmax(230px, 280px); }
.cw-card { position: relative; min-width: 0; scroll-snap-align: start; }
.cw-link { display: grid; gap: 4px; }
.cw-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.cw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.cw-thumb img.cw-poster { object-fit: cover; object-position: center 20%; }
.cw-link:hover .cw-thumb img { transform: scale(1.04); }
.cw-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(15, 8, 20, .7); border: 2px solid rgba(255, 255, 255, .85); opacity: .9; transition: transform .2s ease, background .2s ease; }
.cw-play::after { content: ""; position: absolute; left: 17px; top: 13px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.cw-link:hover .cw-play { transform: scale(1.1); background: var(--accent); border-color: var(--accent); }
.cw-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .25); }
.cw-bar span { display: block; height: 100%; background: var(--accent); }
.cw-title { font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-meta { font-size: .8rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(15, 8, 20, .75); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.cw-card:hover .cw-remove, .cw-remove:focus-visible { opacity: 1; }
@media (hover: none) { .cw-remove { opacity: .85; } }
.resume-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--accent); border-radius: var(--r-md); background: rgba(44, 224, 180, .07); }
.resume-text { flex: 1 1 240px; }
@media (max-width: 600px) { .row-track.cw-track { grid-auto-columns: 72vw; } }

/* ---------- Share ---------- */
.share { position: relative; display: inline-block; }
.share-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; min-width: 190px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.share-menu a, .share-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.share-menu a:hover, .share-menu button:hover, .share-menu a:focus-visible, .share-menu button:focus-visible { background: rgba(44, 224, 180, .12); color: var(--accent); }

/* ---------- Categories, cast, home text ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chips .chip .muted { margin-left: 4px; font-weight: 600; }
.cat-intro { max-width: 760px; color: var(--text-2); margin-top: 6px; }
.cat-index h2 { margin: 26px 0 12px; }
.cat-more { margin-top: 36px; }
.cat-more h2 { margin-bottom: 12px; }
.home-cats { margin-top: 36px; }
.home-cats h2 { margin-bottom: 12px; }
.home-about { margin-top: 36px; max-width: 860px; color: var(--text-2); }
.home-about h2 { color: var(--cream, inherit); margin-bottom: 10px; }
.home-about p { margin: 0 0 10px; line-height: 1.6; }
.footer-cats { grid-column: 1 / -1; }
.ep-count { font-size: .8em; font-weight: 600; }
.cast { margin-top: 36px; }
.cast h2 { margin-bottom: 6px; }
.cast-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
.cast-list li { display: grid; gap: 3px; scroll-snap-align: start; min-width: 0; }
.cast-photo { display: grid; place-items: center; aspect-ratio: 2 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid var(--line); font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.cast-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-name { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.cast-role { font-size: .78rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-cats { justify-content: flex-start; font-size: .85rem; gap: 8px 18px; }
.home-about > summary { cursor: pointer; list-style: none; display: inline-block; font-size: .85rem; font-weight: 600; color: var(--text-2); padding: 4px 0; }
.home-about > summary::-webkit-details-marker { display: none; }
.home-about > summary::after { content: " +"; }
.home-about[open] > summary::after { content: " −"; }
.home-about > summary:hover { color: var(--accent); }
.home-about[open] > h2 { margin-top: 10px; }

/* ---------- Genres row (home page) ---------- */
.row-track.genre-track { grid-auto-columns: 168px; gap: 12px; }
.genre-tile { position: relative; display: flex; align-items: flex-end; height: 84px; padding: 12px 14px; border-radius: var(--r-md); overflow: hidden; scroll-snap-align: start;
  background: linear-gradient(135deg, #1C2940, #0F1520); border: 1px solid var(--line); font-weight: 800; font-size: 1rem; line-height: 1.2; transition: transform .18s ease, border-color .18s ease; }
.genre-tile::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.genre-tile span { position: relative; z-index: 1; }
.genre-tile:hover, .genre-tile:focus-visible { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }
.genre-track .genre-tile:nth-child(6n+1) { background: linear-gradient(135deg, #1A5F8A, #0F1B2A); }
.genre-track .genre-tile:nth-child(6n+2) { background: linear-gradient(135deg, #136E6A, #0E1C22); }
.genre-track .genre-tile:nth-child(6n+3) { background: linear-gradient(135deg, #3B4BA8, #121631); }
.genre-track .genre-tile:nth-child(6n+4) { background: linear-gradient(135deg, #1F7A52, #0E1F18); }
.genre-track .genre-tile:nth-child(6n+5) { background: linear-gradient(135deg, #8A3E6B, #22121D); }
.genre-track .genre-tile:nth-child(6n+6) { background: linear-gradient(135deg, #7A5A1F, #231B10); }
@media (max-width: 600px) { .row-track.genre-track { grid-auto-columns: 136px; } .genre-tile { height: 72px; font-size: .92rem; } }

/* ==========================================================================
   Layout: top bar, side navigation, page
   ========================================================================== */
html { scroll-padding-top: calc(var(--top-h) + 16px + env(safe-area-inset-top, 0px)); }
body { background: var(--bg); }
.page { padding-left: var(--side-w); min-height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }
.ico { flex: none; display: block; }

.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--top-h);
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter) 0 20px;
  background: rgba(11, 15, 23, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(40, 50, 67, .7);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.45rem/1 var(--head); letter-spacing: -.02em; color: var(--text); flex: none; }
.brand-mark { display: block; flex: none; }
.brand-accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .brand { width: calc(var(--side-w) - 38px); }

.search { position: relative; flex: 1 1 auto; max-width: 620px; display: flex; align-items: center; }
.search-ico { position: absolute; left: 16px; color: var(--text-2); pointer-events: none; }
.search input {
  width: 100%; height: 42px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 0 96px 0 44px; font: inherit; font-size: .93rem; -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input::placeholder { color: var(--text-2); opacity: 1; }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }
.search-go {
  position: absolute; right: 4px; top: 4px; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--grad); color: #04201A; font: 600 .85rem/1 var(--body);
}
.search-go:hover { filter: brightness(1.08); }
.search.is-loading .search-ico { animation: search-pulse .8s ease-in-out infinite alternate; }
@keyframes search-pulse { to { opacity: .35; } }
.search-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); padding: 6px; z-index: 70;
}
.search-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; }
.search-item[aria-selected="true"], .search-item:hover { background: var(--surface-2); }
.search-item img, .search-noimg { width: 40px; height: 60px; border-radius: 5px; object-fit: cover; background: var(--surface-2); flex: none; }
.search-text { display: flex; flex-direction: column; min-width: 0; }
.search-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item[aria-selected="true"] .search-title { color: var(--accent); }
.search-meta { font-size: .8rem; color: var(--text-2); }
.search-score { color: var(--accent); font-weight: 700; }
.search-soon { color: var(--accent-2); font-weight: 600; }
.search-all { display: block; padding: 10px; text-align: center; font-weight: 600; color: var(--accent); border-radius: 8px; }
.search-all:hover, .search-all[aria-selected="true"] { background: var(--surface-2); }
.search-empty { padding: 14px; color: var(--text-2); margin: 0; }

.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.top-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: .9rem; padding: 8px 10px; border-radius: 8px; }
.top-link:hover { color: var(--text); background: var(--surface); }
.avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #04201A; font-size: .75rem; font-weight: 700; }

.nav-toggle { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; place-items: center; flex: none; }
.nav-toggle:hover { background: var(--surface); }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

.sidebar {
  position: fixed; z-index: 55; left: 0; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); bottom: 0; width: var(--side-w);
  display: flex; flex-direction: column; gap: 18px; padding: 16px 12px 24px; overflow-y: auto; scrollbar-width: thin;
  background: var(--bg); border-right: 1px solid rgba(40, 50, 67, .7);
}
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .93rem; position: relative; }
.side-nav a:hover { color: var(--text); background: var(--surface); }
.side-nav a[aria-current] { color: var(--text); background: linear-gradient(90deg, rgba(23, 184, 255, .16), rgba(44, 242, 154, .08)); font-weight: 600; }
.side-nav a[aria-current]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.side-nav a[aria-current] .ico { color: var(--accent); }
.side-nav .nav-admin { color: var(--accent); }
.side-rule { height: 1px; background: var(--line); margin: 8px 12px; }
.side-card { margin-top: auto; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 100% 0%, rgba(23, 184, 255, .18), transparent 60%), var(--surface); }
.side-card-title { font: 600 .95rem/1.3 var(--head); margin-bottom: 4px; }
.side-card .btn { margin-top: 6px; }
.nav-scrim { position: fixed; inset: 0; z-index: 54; background: rgba(4, 6, 10, .6); }

@media (max-width: 1024px) {
  .page { padding-left: 0; }
  .nav-toggle { display: grid; }
  .topbar { padding-left: 10px; gap: 10px; }
  .topbar .brand { width: auto; }
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .5); }
  .sidebar.is-open { transform: none; }
  html.nav-open { overflow: hidden; }
}
@media (max-width: 760px) {
  .top-link span { display: none; }
  .top-actions .btn-ghost { padding: 8px 10px; font-size: 0; gap: 0; }
  .top-actions .btn-ghost .avatar { font-size: .75rem; }
  .brand-word { display: none; }
  .search-go { display: none; }
  .search input { padding-right: 16px; height: 40px; }
}
@media (max-width: 420px) { .top-actions .top-link:first-child { display: none; } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn { font: 600 .92rem/1 var(--body); border-radius: 10px; gap: 8px; }
.btn-primary { background: var(--grad); color: #04201A; border: 0; }
.btn-primary:hover { box-shadow: 0 0 0 5px var(--accent-glow); filter: brightness(1.05); }
.btn-ghost { background: rgba(234, 240, 248, .07); color: var(--text); border-color: rgba(234, 240, 248, .16); }
.btn-ghost:hover { background: rgba(234, 240, 248, .13); }
.btn-ghost[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: rgba(44, 224, 180, .1); }
.btn-lg { padding: 14px 24px; }
.play-glyph { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }

/* ==========================================================================
   Hero carousel
   ========================================================================== */
.hero { position: relative; margin: 20px var(--gutter) 0; border-radius: 18px; overflow: hidden; min-height: min(62vh, 560px); display: grid; isolation: isolate; background: var(--surface); }
.hero-slide { grid-area: 1 / 1; display: grid; align-items: end; }
.hero-slide[hidden] { display: grid !important; visibility: hidden; pointer-events: none; }
.hero-slide.is-active .hero-panel { animation: hero-in .6s ease both; }
@keyframes hero-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-bg img:not([src]) { visibility: hidden; }
.hero-bg, .detail-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg picture, .detail-bg picture { display: contents; }
.hero-bg img, .detail-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero-bg::after, .detail-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(11, 15, 23, .7) 35%, rgba(11, 15, 23, .1) 75%),
              linear-gradient(to right, rgba(11, 15, 23, .95) 0%, rgba(11, 15, 23, .4) 50%, transparent 78%);
}
.hero-bg::after { background: linear-gradient(to top, rgba(11, 15, 23, .95) 0%, rgba(11, 15, 23, .55) 40%, rgba(11, 15, 23, .05) 80%),
                              linear-gradient(to right, rgba(11, 15, 23, .92) 0%, rgba(11, 15, 23, .3) 55%, transparent 80%); }
.hero-bg:not(:has(img)) { background: radial-gradient(ellipse at 70% 30%, #123049, var(--bg) 70%); }
.hero-inner { padding: 60px clamp(20px, 4vw, 48px) 56px; }
.hero-panel { max-width: 620px; }
.now-showing { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.now-showing::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--grad); }
.hero-title { font: 700 clamp(2rem, 4.6vw, 3.6rem)/1.05 var(--head); letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; text-shadow: 0 4px 30px rgba(0, 0, 0, .45); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-2); font-weight: 500; font-size: .9rem; margin-bottom: 14px; }
.hero-meta .score { color: var(--accent); }
.hero-overview { color: rgba(234, 240, 248, .86); max-width: 58ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hero-dots { position: absolute; bottom: 22px; right: clamp(20px, 4vw, 48px); display: flex; gap: 6px; }
.hero-dots button { width: 22px; height: 4px; border: 0; border-radius: 4px; background: rgba(234, 240, 248, .3); cursor: pointer; padding: 0; transition: width .2s; }
.hero-dots button[aria-selected="true"] { background: var(--grad); width: 36px; }
.empty-hero { padding-block: 80px 40px; max-width: 760px; }
@media (max-width: 600px) { .hero { margin: 12px 10px 0; min-height: 440px; } .hero-inner { padding: 40px 18px 48px; } .hero-dots { left: 18px; right: auto; } }

/* ==========================================================================
   Rows and cards
   ========================================================================== */
.rows { padding-bottom: 20px; }
.row { margin-top: 34px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.row-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.row-tools { display: flex; align-items: center; gap: 6px; }
.row-tools .link { margin-right: 6px; font-size: .88rem; color: var(--text-2); font-weight: 500; }
.row-tools .link:hover { color: var(--accent); text-decoration: none; }
.row-tools .link::after { content: " ›"; }
.arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; color: var(--text); }
.arrow::before { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(2px) rotate(45deg); }
.arrow-next::before { transform: translateX(-2px) rotate(-135deg); }
.arrow:hover { border-color: var(--accent); color: var(--accent); }
.arrow:disabled { opacity: .3; cursor: default; }
.row-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(132px, 12.5vw, 180px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 14px var(--gutter) 6px; scroll-padding-inline: var(--gutter);
}
.page .wrap { max-width: none; }
.row-track::-webkit-scrollbar { display: none; }
.row-track .card { scroll-snap-align: start; }

.card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: var(--r-md); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(44, 224, 180, .45); }
.card:focus-visible { outline: none; }
.card-poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--surface-2); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-poster img { transform: scale(1.04); }
.card-title { font-weight: 600; font-size: .88rem; line-height: 1.3; padding: 10px 10px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { font-size: .75rem; color: var(--text-2); padding: 0 10px 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sep { opacity: .55; }
.card-rating {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; background: rgba(11, 15, 23, .82); color: #FFD166;
  font: 700 .78rem/1 var(--body); padding: 5px 7px; border-radius: 6px; backdrop-filter: blur(4px);
}
.card-rating::before { content: "★"; font-size: .72rem; }
.card-flag { position: absolute; left: 8px; bottom: 8px; background: rgba(11, 15, 23, .86); color: var(--text); font-size: .7rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.card-flag.static { position: static; }

/* Coming soon: date ribbon in the corner, people waiting along the bottom */
.card-date {
  position: absolute; top: 0; left: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; min-width: 50px;
  padding: 6px 8px 7px; border-radius: 0 0 12px 0; background: var(--grad); color: #04201A;
  font: 700 .95rem/1.02 var(--head); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); text-align: center;
}
.card-date span:first-child { font-size: .78rem; letter-spacing: .02em; }
.card-date span:last-child { font-size: 1.25rem; }
.card-fans {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 26px 8px 9px; font-size: .8rem; font-weight: 600; color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent);
}
.card-fans svg { color: #FF5A7A; }

.poster-fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(23, 184, 255, .35), transparent 60%), linear-gradient(160deg, #1B3A5A, #0B0F17); }
.poster-fallback span { font: 700 clamp(1.1rem, 1.6vw, 1.4rem)/1.1 var(--head); color: var(--text); overflow-wrap: anywhere; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 22px 16px; }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); } }
@media (max-width: 600px) { .row-track { grid-auto-columns: 38vw; gap: 10px; } .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 16px 10px; } }

/* Home: coming soon row gets a little extra presence */
.row-soon .row-head h2::before { content: ""; width: 4px; height: 20px; border-radius: 4px; background: var(--grad); }
.home-intro { margin-top: 24px; }
.home-intro h1 { font-size: clamp(1.25rem, 2vw, 1.6rem); margin-bottom: 4px; }
.home-intro p { color: var(--text-2); max-width: 80ch; margin: 0; }

/* ==========================================================================
   Coming soon page
   ========================================================================== */
.soon-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.soon-tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: .88rem; }
.soon-tabs a:hover { color: var(--text); border-color: var(--text-2); }
.soon-tabs a[aria-current] { background: var(--grad); color: #04201A; border-color: transparent; }
.soon-day { margin-bottom: 30px; }
.soon-day-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.soon-day-head h2 { margin: 0; font-size: 1.15rem; }
.soon-day-head .when { color: var(--accent); font-weight: 600; font-size: .88rem; }

/* Title page: release notice */
.release-box { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 16px 0 6px; padding: 14px 18px; border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(23, 184, 255, .14), rgba(44, 242, 154, .08)); border: 1px solid rgba(44, 224, 180, .35); max-width: 640px; }
.release-date { display: flex; flex-direction: column; }
.release-date b { font: 700 1.1rem/1.2 var(--head); }
.release-date span { color: var(--text-2); font-size: .85rem; }
.countdown { display: flex; gap: 8px; margin-left: auto; }
.countdown span { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px 4px; border-radius: 8px; background: rgba(11, 15, 23, .6); font: 700 1.2rem/1.1 var(--head); }
.countdown small { font: 500 .66rem/1.2 var(--body); color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }

/* Detail page */
.detail { margin: 0; }
.detail-title { font: 700 clamp(2rem, 4.4vw, 3.4rem)/1.05 var(--head); letter-spacing: -.02em; }
.detail-overview { color: rgba(234, 240, 248, .88); }

/* Collections */
.collection-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 32px; }

/* Static pages */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose a { color: var(--accent); }

/* ==========================================================================
   Footer, trailer
   ========================================================================== */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); padding-block: 40px 24px; background: #080B11; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-brand p { margin-top: 12px; max-width: 34ch; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-h { font: 600 .82rem/1 var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin: 0 0 6px; }
.footer-links a { color: var(--text-2); font-size: .9rem; }
.footer-links a:hover { color: var(--accent); }
.fine { font-size: .78rem; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.fine p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
