/* VidTower web: dark, cinematic. Tokens first; components below. */
:root {
  color-scheme: dark;
  --bg: #07070b;
  --surface: #12121a;
  --surface-2: #1a1a25;
  --line: #23232f;
  --text: #f0efec;
  --muted: #a5a5b4;
  --faint: #6f6f80;
  --accent: #d50027;
  --accent-hover: #f0153f;
  --accent-ink: #ff6b7d;
  --radius: 14px;
  --wrap: 1240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); }
a:hover { color: #ff8c9a; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 7, 11, 0.82); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: block; line-height: 0; }
.brand img { width: 150px; height: auto; }
.main-nav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.main-nav a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 7px 14px; border-radius: 999px; transition: color .15s, background .15s; white-space: nowrap; }
.main-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: .85; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.main-nav a.active { color: #fff; background: rgba(213, 0, 39, .16); box-shadow: inset 0 0 0 1px rgba(255, 107, 125, .35); }
.main-nav a.active svg { color: var(--accent-ink); opacity: 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font: 600 15px/1 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(213, 0, 39, 0.3); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); border-color: rgba(255, 255, 255, 0.12); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }

/* text pages (policies, contact) */
.prose-page { max-width: 820px; padding-top: 36px; padding-bottom: 72px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--faint); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.prose-page h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
.prose-page .meta { color: var(--faint); font-size: 14px; margin: 0 0 28px; }
.prose { color: #d4d4dd; font-size: 17px; line-height: 1.75; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--text); line-height: 1.3; margin: 1.8em 0 0.5em; }
.prose h2 { font-size: 24px; } .prose h3 { font-size: 20px; } .prose h4, .prose h5, .prose h6 { font-size: 18px; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.contact-card { margin-top: 24px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 17px; }

/* empty / error states */
.empty-state { text-align: center; padding: 96px 16px; }
.empty-state h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 10px; }
.empty-state p { color: var(--muted); margin: 0 0 26px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: #0a0a10; margin-top: 48px; padding-top: 44px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1.2fr; } }
.footer-brand img { width: 150px; height: auto; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 360px; margin: 12px 0 0; }
.socials { display: flex; flex-wrap: wrap; gap: 14px; }
.socials a { color: var(--muted); text-decoration: none; font-weight: 600; }
.socials a:hover { color: var(--text); }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin: 0 0 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--text); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badges img { display: block; height: 40px; width: auto; }
.copyright { color: var(--faint); font-size: 13px; padding-top: 28px; padding-bottom: 32px; margin: 32px auto 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }

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

/* ---------- shared ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.header-search { margin-left: auto; }
.header-search input { width: 180px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text); font: 14px var(--font); }
.header-search input:focus { outline: none; border-color: var(--accent-ink); background: rgba(255,255,255,.1); }
@media (max-width: 640px) {
  .header-inner { gap: 12px; }
  .brand img { width: 112px; }
  .header-search input { width: 40px; padding: 0 12px; }
  .header-search input:focus { width: 150px; }
}
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font: 700 11px/1.4 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.badge-free { background: #0f3d1f; color: #7ee2a0; }
.badge-pro { background: var(--accent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chips a { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; }
.chips a:hover { background: rgba(255,255,255,.16); }

/* ---------- hero ---------- */
.hero-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-carousel::-webkit-scrollbar { display: none; }
.hero, .detail-hero { position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: min(78vh, 720px); display: flex; align-items: flex-end; overflow: hidden; }
.detail-hero { min-height: min(70vh, 640px); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 4%, rgba(7,7,11,.75) 38%, rgba(7,7,11,.15) 75%), linear-gradient(90deg, rgba(7,7,11,.85) 0%, rgba(7,7,11,0) 65%); }
.hero-body, .detail-body { position: relative; padding-bottom: 48px; }
.eyebrow { margin: 0 0 6px; color: var(--accent-ink); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.hero-title { font-size: clamp(32px, 6vw, 64px); line-height: 1.02; letter-spacing: -.02em; margin: 0 0 12px; max-width: 14ch; }
.hero-meta { color: #cfcfd8; font-size: 15px; margin: 0; }
.hero-desc { color: #d4d4dd; max-width: 62ch; margin: 14px 0 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.detail-body { display: flex; gap: 32px; align-items: flex-end; }
.detail-poster { width: 200px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.6); flex: 0 0 auto; }
.detail-text h1 { font-size: clamp(28px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 10px; }
@media (max-width: 760px) { .detail-poster { display: none; } .hero, .detail-hero { min-height: 70vh; } }

/* ---------- rails & cards ---------- */
.rail { margin-top: 36px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 32px 0 14px; }
.rail-head h2 { font-size: 21px; margin: 0; letter-spacing: -.01em; }
.rail-head a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.rail-head a:hover { color: var(--text); }
.rail .rail-head { margin-top: 0; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 180px); gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: thin; }
.rail-track > * { scroll-snap-align: start; }
.rail-wide { grid-auto-columns: minmax(240px, 300px); }
.card { position: relative; display: block; text-decoration: none; color: var(--text); }
.poster { display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .poster img { transform: scale(1.04); }
.card-title { display: block; margin-top: 8px; font-weight: 600; font-size: 14px; line-height: 1.3; }
.card-meta { display: block; color: var(--faint); font-size: 13px; }
.poster-row { display: flex; align-items: flex-end; }
.poster-row .poster { flex: 1 1 auto; min-width: 0; }
.top-ten .rail-track { grid-auto-columns: minmax(200px, 240px); }
.rank { flex: 0 0 auto; margin-right: -10px; font: 900 104px/0.78 var(--font); color: var(--bg); -webkit-text-stroke: 2px #6b6b7c; letter-spacing: -8px; }
.top-ten .card-title, .top-ten .card-meta { padding-left: 58px; }
@media (max-width: 640px) { .top-ten .rail-track { grid-auto-columns: 170px; } .rank { font-size: 80px; } .top-ten .card-title, .top-ten .card-meta { padding-left: 44px; } }
.ep-card { display: block; text-decoration: none; color: var(--text); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .badge { position: absolute; top: 8px; left: 8px; }
.duration { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 6px; }
.ep-label { display: block; margin-top: 8px; font-weight: 700; font-size: 15px; }
.ep-sub { display: block; color: var(--muted); font-size: 13px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- listings ---------- */
.browse { padding-top: 32px; }
.browse h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 6px; letter-spacing: -.02em; }
.lede { color: var(--muted); margin: 0 0 22px; max-width: 70ch; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters select, .filters input { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 15px var(--font); }
.filters input[type=number] { width: 110px; }
.filters .grow { flex: 1 1 260px; }
.filters .grow input { width: 100%; }
.clear-filters { color: var(--muted); }
.result-count { color: var(--faint); font-size: 14px; margin: 0 0 16px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pagination span[aria-current] { background: var(--accent); border-color: var(--accent); }

/* ---------- episode & movie pages ---------- */
.watch { padding-top: 24px; }
.player-gate { position: relative; aspect-ratio: 16 / 9; max-height: 72vh; width: 100%; border-radius: 16px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; text-align: center; }
.gate-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: blur(2px); }
.gate-body { position: relative; padding: 24px; max-width: 520px; }
.gate-title { font-size: clamp(20px, 3vw, 28px); font-weight: 800; margin: 14px 0 6px; line-height: 1.2; }
.gate-text { color: #d4d4dd; margin: 0 0 18px; }
.gate-body .badges { justify-content: center; }
@media (max-width: 560px) { .player-gate { aspect-ratio: auto; min-height: 320px; } }
.watch-info h1 { font-size: clamp(24px, 3.6vw, 38px); line-height: 1.15; margin: 26px 0 8px; letter-spacing: -.01em; }
.watch-desc { color: #d4d4dd; max-width: 75ch; }
.prev-next { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cast-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.cast-name { font-weight: 600; }

/* ---------- trailer dialog ---------- */
.trailer-dialog { width: min(960px, 94vw); padding: 0; border: 0; border-radius: 14px; background: #000; color: var(--text); }
.trailer-dialog::backdrop { background: rgba(0,0,0,.8); }
.trailer-frame { aspect-ratio: 16 / 9; }
.trailer-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.dialog-close { position: absolute; top: 6px; right: 10px; z-index: 2; background: rgba(0,0,0,.6); color: #fff; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; }

/* ---------- episode list (Netflix-style rows) ---------- */
.episode-list { margin-top: 40px; }
.episode-list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.episode-list-head h2 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.episode-count { color: var(--muted); font-size: 15px; }
.season-picker select { height: 44px; padding: 0 40px 0 16px; border-radius: 8px; border: 1px solid #3a3a48; background: #1c1c26 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f0efec' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; appearance: none; color: var(--text); font: 600 16px var(--font); cursor: pointer; }
.season-title { font-size: 18px; margin: 22px 0 4px; color: var(--muted); }
.js .season-title { display: none; }
.js .season[data-hidden] { display: none; }
.episode-rows { list-style: none; margin: 0; padding: 0; }
.episode-row { border-bottom: 1px solid var(--line); }
.episode-row > a { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; padding: 22px 12px; border-radius: 10px; color: var(--text); text-decoration: none; transition: background .15s; }
.episode-row > a:hover { background: var(--surface); }
.episode-row.is-current > a { background: #191922; box-shadow: inset 3px 0 0 var(--accent); }
.ep-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .15s; }
.ep-play::after { content: ""; position: absolute; left: 16px; top: 12px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.episode-row > a:hover .ep-play, .episode-row > a:focus-visible .ep-play { opacity: 1; }
.ep-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ep-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ep-title { font-weight: 700; font-size: 17px; }
.ep-name { font-weight: 500; color: #d4d4dd; }
.ep-about { color: var(--muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-date { color: var(--faint); font-size: 13px; }
.badge-new { background: #1d3a5c; color: #9cc8ff; }
.badge-now { background: #2b2b38; color: var(--text); }
@media (max-width: 640px) {
  .episode-row > a { grid-template-columns: 132px 1fr; gap: 14px; padding: 14px 4px; }
  .ep-title { font-size: 15px; }
  .ep-play { opacity: 1; width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  .ep-play::after { left: 12px; top: 8px; border-width: 7px 0 7px 11px; }
  .ep-about { display: none; }
}

/* home */
.chip-count { color: var(--faint); font-weight: 500; margin-left: 4px; }
.genre-chips, .all-titles { margin-top: 36px; }
.genre-chips .rail-head, .all-titles .rail-head { margin-top: 0; }
.hero-shell { position: relative; }
.hero-dots { position: absolute; right: max(16px, calc((100vw - var(--wrap)) / 2 + 32px)); bottom: 28px; z-index: 2; display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; background: transparent; cursor: pointer; }
.hero-dots button[aria-current="true"] { background: #fff; border-color: #fff; }
@media (max-width: 640px) { .hero-dots { left: 0; right: 0; bottom: 14px; justify-content: center; } }
.season-label { font-weight: 700; font-size: 16px; padding: 10px 16px; border-radius: 8px; border: 1px solid #3a3a48; background: #1c1c26; }
.season-label .episode-count { font-weight: 500; font-size: 15px; }
.ep-code { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .03em; vertical-align: 2px; }

/* ---------- New episodes cards ---------- */
.rail-new { grid-auto-columns: minmax(300px, 380px); gap: 16px; }
.ne-card { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface-2); color: #fff; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: translateZ(0); }
.ne-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ne-card:hover img, .ne-card:focus-visible img { transform: scale(1.06); }
.ne-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,5,9,.92) 0%, rgba(5,5,9,.55) 38%, rgba(5,5,9,0) 70%); }
.ne-badge { position: absolute; top: 12px; left: 12px; }
.ne-text { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 2px; }
.ne-series { font-weight: 800; font-size: 18px; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ne-meta { font-size: 13px; color: #d9d9e3; }
.ne-play { position: absolute; right: 14px; bottom: 16px; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); box-shadow: 0 6px 18px rgba(213,0,39,.5); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; }
.ne-play::after { content: ""; position: absolute; left: 16px; top: 13px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.ne-card:hover .ne-play, .ne-card:focus-visible .ne-play { opacity: 1; transform: scale(1); }
.ne-card:hover .ne-text, .ne-card:focus-visible .ne-text { right: 66px; }
@media (max-width: 600px) { .rail-new { grid-auto-columns: 82vw; } .ne-play { opacity: 1; transform: none; width: 36px; height: 36px; } .ne-play::after { left: 13px; top: 10px; border-width: 8px 0 8px 12px; } .ne-text { right: 60px; } }

/* ---------- rail arrows (desktop) ---------- */
.rail-wrap { position: relative; }
.rail-arrow { position: absolute; top: 0; bottom: 8px; width: 52px; border: 0; z-index: 3; color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.rail-arrow.prev { left: -16px; background: linear-gradient(90deg, rgba(7,7,11,.95), rgba(7,7,11,0)); }
.rail-arrow.next { right: -16px; background: linear-gradient(270deg, rgba(7,7,11,.95), rgba(7,7,11,0)); }
.rail-wrap:hover .rail-arrow:not([hidden]) { opacity: 1; }
.rail-arrow:focus-visible { opacity: 1; }
@media (hover: none), (max-width: 760px) { .rail-arrow { display: none; } }

/* ---------- accounts ---------- */
.btn-small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-danger { background: #b3122f; color: #fff; }
.btn-danger:hover { background: #d0193b; color: #fff; }
.small { font-size: 13px; }
.flash { padding: 12px 16px; border-radius: 10px; background: #13301f; color: #9be7b4; margin: 0 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.field input { height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 16px var(--font); }
.field input[type=file] { padding: 10px 14px; height: auto; }
.field input:focus { outline: none; border-color: var(--accent-ink); }
.field-error { color: #ff8c9a; font-size: 14px; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.link-button { background: none; border: 0; color: var(--muted); font: 14px var(--font); cursor: pointer; padding: 6px 0; text-decoration: underline; }
.link-button:hover { color: var(--text); }

.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; display: block; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary img, .avatar-initial { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 800; }
.account-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.5); z-index: 60; }
.account-menu-panel a, .account-menu-panel button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; font: 15px var(--font); cursor: pointer; }
.account-menu-panel a:hover, .account-menu-panel button:hover { background: var(--surface-2); }
.account-menu-name { margin: 4px 12px 8px; font-weight: 700; color: var(--muted); font-size: 13px; }

.auth-page { display: flex; justify-content: center; padding-top: 48px; padding-bottom: 48px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; text-align: center; }
.auth-logo { width: 150px; height: auto; }
.auth-card h1 { font-size: 24px; margin: 18px 0 8px; }
.auth-lede, .auth-note, .auth-legal { color: var(--muted); font-size: 14px; }
.auth-legal { font-size: 12px; margin-bottom: 0; }
.auth-message { margin: 14px 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; text-align: left; background: #3a1119; color: #ffb3bf; }
.auth-message[data-kind="info"] { background: #13263a; color: #a8d2ff; }
.auth-providers { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-provider { display: flex; align-items: center; justify-content: center; gap: 12px; height: 50px; border-radius: 999px; border: 1px solid #3a3a48; background: #fff; color: #1f1f1f; font: 600 16px var(--font); cursor: pointer; }
.btn-provider:hover { background: #f1f1f1; }
.btn-provider.btn-apple { background: #000; color: #fff; border-color: #444; }
.btn-provider.btn-apple:hover { background: #151515; }
.btn-provider:disabled, .btn:disabled { opacity: .6; cursor: progress; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 22px 0 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-email { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 999px; padding: 4px; }
.auth-tabs button { border: 0; background: none; color: var(--muted); font: 600 14px var(--font); padding: 9px; border-radius: 999px; cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }

.account-page { padding-top: 32px; }
.account-page h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 20px; }
.account-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .account-grid { grid-template-columns: 1.2fr 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.panel h2 { font-size: 19px; margin: 0 0 8px; }
.panel h2 + p { margin-top: 0; }
.panel .btn { align-self: flex-start; }
.panel h2:not(:first-child) { margin-top: 26px; }
.profile-head { display: flex; gap: 18px; align-items: center; }
.profile-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; font-size: 38px; flex: 0 0 auto; }
.profile-name { font-size: 20px; font-weight: 800; margin: 0 0 2px; }
.profile-head p { margin: 0; }
.danger-panel { margin-top: 20px; border-color: #4a1a24; }
.watchlist-item { display: flex; flex-direction: column; gap: 8px; }
.watchlist-form { display: inline; }

@media (max-width: 640px) {
  .header-inner > .btn-small { padding: 0 12px; min-height: 34px; white-space: nowrap; }
}

/* ---------- player ---------- */
.play-button { display: block; margin: 14px auto 0; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); box-shadow: 0 10px 34px rgba(213,0,39,.55); cursor: pointer; position: relative; transition: transform .15s; }
.play-button:hover { transform: scale(1.06); }
.play-button span::after { content: ""; position: absolute; left: 33px; top: 25px; border-style: solid; border-width: 17px 0 17px 27px; border-color: transparent transparent transparent #fff; }
.play-button:disabled { opacity: .7; cursor: progress; }
.player-gate.is-loading .play-button { animation: vt-pulse 1s infinite; }
@keyframes vt-pulse { 50% { transform: scale(.92); } }
.player-gate.is-playing .gate-bg, .player-gate.is-playing .gate-body { display: none; }
.player-mount { position: absolute; inset: 0; background: #000; }
.player-mount iframe, .player-mount #vt-jw, .player-mount .jwplayer { width: 100% !important; height: 100% !important; border: 0; }
.player-message { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 5; padding: 12px 14px; border-radius: 10px; background: rgba(58,17,25,.95); color: #ffd0d7; font-size: 14px; text-align: left; }
.next-card { position: absolute; right: 16px; bottom: 16px; z-index: 6; width: min(320px, 90%); padding: 16px; border-radius: 14px; background: rgba(18,18,26,.96); border: 1px solid var(--line); text-align: left; }
.next-label { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.next-title { margin: 4px 0; font-weight: 800; font-size: 17px; }
.next-count { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.next-actions { display: flex; gap: 8px; }
.source-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.source-option { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px; font: 600 13px var(--font); cursor: pointer; }
.source-option[aria-pressed="true"] { border-color: var(--accent); background: #2a0b12; }
.nav-pro { color: #ffb3bf !important; }

/* ---------- continue watching ---------- */
.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); }

/* ---------- Pro page ---------- */
.pro-page { padding-top: 40px; max-width: 980px; }
.pro-page h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; letter-spacing: -.02em; margin: 6px 0 10px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 28px 0; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.plan-best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 18px 40px rgba(213,0,39,.18); }
.plan-flag { position: absolute; top: -11px; left: 22px; }
.plan h2 { margin: 0; font-size: 20px; }
.plan-price { margin: 0; font-size: 38px; font-weight: 900; letter-spacing: -.02em; }
.plan-price span { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan-points { list-style: none; padding: 0; margin: 6px 0 12px; color: #d4d4dd; display: flex; flex-direction: column; gap: 6px; }
.plan-points li::before { content: "✓"; color: #7ee2a0; margin-right: 8px; font-weight: 800; }
.plan form { margin-top: auto; }
.pro-app, .pro-active { margin-top: 18px; }
.pro-app .badges { margin-top: 12px; }
.pro-legal { margin-top: 22px; }

.coming-soon { max-width: 560px; margin: 24px auto 0; padding: 56px 24px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(120% 120% at 50% 0%, #241018 0%, var(--surface) 60%); }
.coming-soon h2 { font-size: clamp(24px, 4vw, 32px); margin: 14px 0 10px; }

/* header: quiet "Get Pro" link (right side) and Pro crown on the avatar */
.get-pro { display: inline-flex; align-items: center; gap: 6px; color: #f5c46a; font-weight: 700; font-size: 14px; text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(245, 196, 106, .35); white-space: nowrap; transition: background .15s, border-color .15s; }
.get-pro:hover { color: #ffd88a; background: rgba(245, 196, 106, .08); border-color: rgba(245, 196, 106, .6); }
.account-menu summary { position: relative; }
.account-menu.is-pro summary img, .account-menu.is-pro .avatar-initial { box-shadow: 0 0 0 2px var(--bg, #07070b), 0 0 0 4px #f5c46a; }
.avatar-pro { position: absolute; right: -5px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #f5c46a; color: #2a1a00; box-shadow: 0 0 0 2px var(--bg, #07070b); }
.avatar-pro svg { width: 11px; height: 11px; }
.account-menu-plan { display: flex; align-items: center; gap: 6px; margin: -4px 12px 8px; color: #f5c46a; font-size: 13px; font-weight: 700; }
.account-menu-panel form { margin: 0; }
@media (max-width: 640px) { .get-pro span { display: none; } .get-pro { padding: 7px 9px; } }

.panel-action { margin: 4px 0 16px; }
.account-signout { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }

/* phones: the main menu becomes an app-style tab bar at the bottom */
@media (max-width: 640px) {
  .main-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; justify-content: space-around; gap: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(10, 10, 15, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .main-nav a { flex: 1; flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11px; border-radius: 12px; }
  .main-nav svg { width: 22px; height: 22px; }
  .main-nav a.active { background: none; box-shadow: none; color: #fff; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  /* a backdrop-filter on the header would pin the fixed tab bar inside it */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7, 7, 11, .96); }
}

.header-search input { padding-left: 36px; background: rgba(255,255,255,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3b2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center / 16px 16px; }
@media (max-width: 640px) { .header-search input { padding: 0 0 0 38px; background-position: 11px center; } .header-search input:focus { padding-right: 12px; } }

.store-note { margin: 6px 0 10px; max-width: 52ch; }
