/* OrbitPlay: rich gold on black */
:root {
  --bg: #050505;
  --bg-2: #100d07;
  --card: #15110a;
  --card-2: #1d1810;
  --fg: #f7f0df;
  --muted: #a89c80;
  --gold: #d4af37;
  --gold-2: #f6d470;
  --gold-3: #8c6d1f;
  --gold-dim: rgba(212, 175, 55, 0.18);
  --gold-grad: linear-gradient(135deg, #8c6d1f 0%, #d4af37 35%, #f6d470 55%, #d4af37 75%, #8c6d1f 100%);
  --radius: 12px;
  --max: 1320px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Cinzel", Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body { background-image: radial-gradient(1200px 600px at 50% -200px, rgba(212,175,55,.10), transparent 60%); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.12; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.4rem); }
h2 { font-size: 1.3rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
code { background: var(--bg-2); border: 1px solid var(--gold-dim); padding: .15em .4em; border-radius: 4px; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: var(--gold); color: #000; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 12px 20px; background: linear-gradient(180deg, rgba(5,5,5,.97), rgba(5,5,5,.82)); backdrop-filter: blur(12px); border-bottom: 1px solid var(--gold-dim); }
.brand img { height: 40px; width: auto; }
.top nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.top nav a { padding: 7px 14px; border-radius: 999px; color: var(--muted); font-size: .95rem; white-space: nowrap; border: 1px solid transparent; transition: all .15s; }
.top nav a:hover { color: var(--gold-2); }
.top nav a.active { color: var(--gold-2); border-color: var(--gold-dim); background: rgba(212,175,55,.08); }
.top nav a.settings-link { font-size: 1.1rem; padding: 5px 10px; }

main { min-height: 70vh; }

/* hero */
.hero { position: relative; min-height: 66vh; display: flex; align-items: flex-end; background: var(--bg-2) var(--bg) center/cover no-repeat; background-image: linear-gradient(180deg, rgba(5,5,5,.15) 0%, rgba(5,5,5,.6) 60%, var(--bg) 100%), linear-gradient(90deg, rgba(5,5,5,.9) 0%, rgba(5,5,5,.25) 60%), var(--poster); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5; }
.hero-inner { position: relative; max-width: var(--max); width: 100%; margin: 0 auto; padding: 56px 20px 44px; }
.hero-inner p { max-width: 62ch; font-size: 1.08rem; color: #e4dcc8; }
.kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; color: var(--gold); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 8px; background: transparent; color: var(--gold-2); font-weight: 600; border: 1px solid var(--gold-3); font: inherit; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn:hover { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.btn.primary { background: var(--gold-grad); color: #120d02; border: 0; box-shadow: 0 6px 24px rgba(212,175,55,.25); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 30px rgba(212,175,55,.4); }

/* rating badge */
.rating { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--gold); border-radius: 4px; font-family: var(--font); font-weight: 700; font-size: .72rem; letter-spacing: .04em; color: var(--gold-2); line-height: 1.5; }
.rating.big { font-size: .85rem; padding: 2px 10px; }
.descriptors { font-size: .78rem; color: var(--muted); letter-spacing: .02em; }

/* rows */
.row { max-width: var(--max); margin: 32px auto; padding: 0 20px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.row-head h2 { position: relative; padding-left: 14px; }
.row-head h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 3px; border-radius: 2px; background: var(--gold-grad); }
.more { color: var(--gold); font-size: .9rem; }
.more:hover { color: var(--gold-2); }
.scroller-wrap { position: relative; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 6px 0 10px; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; outline: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller .card { scroll-snap-align: start; }
@media (min-width: 900px) { .scroller { grid-auto-columns: calc((100% - 16px * 4) / 5); } }
@media (min-width: 1500px) { .scroller { grid-auto-columns: calc((100% - 16px * 5) / 6); } }
@media (max-width: 600px) { .scroller { grid-auto-columns: 62vw; } }
.row-nav { position: absolute; top: 6px; bottom: 10px; width: 56px; border: 0; padding: 0; cursor: pointer; z-index: 3; display: flex; align-items: center; justify-content: center; background: linear-gradient(90deg, var(--bg) 10%, rgba(5,5,5,.6) 60%, transparent); opacity: 0; transition: opacity .18s; }
.row-nav.prev { left: -12px; }
.row-nav.next { right: -12px; background: linear-gradient(270deg, var(--bg) 10%, rgba(5,5,5,.6) 60%, transparent); }
.row-nav svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--gold-grad); color: #120d02; box-shadow: 0 6px 20px rgba(0,0,0,.6); transition: transform .15s; }
.row-nav:hover svg { transform: scale(1.08); }
.row-nav[hidden] { display: none; }
.scroller-wrap:hover .row-nav, .scroller-wrap:focus-within .row-nav { opacity: 1; }
.row-nav:focus-visible { opacity: 1; outline: none; }
.row-nav:focus-visible svg { outline: 3px solid var(--gold-2); outline-offset: 2px; }
@media (hover: none) and (pointer: coarse) { .row-nav { display: none !important; } }

/* cards */
.card { display: block; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid rgba(212,175,55,.12); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 36px rgba(0,0,0,.6), 0 0 0 1px var(--gold-dim); outline: none; }
.thumb { position: relative; aspect-ratio: 16/9; background: #0b0905; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.dur { position: absolute; right: 8px; bottom: 8px; font-size: .72rem; padding: 2px 7px; border-radius: 4px; background: rgba(0,0,0,.75); border: 1px solid rgba(212,175,55,.3); color: var(--gold-2); }
.thumb .rating { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.7); }
.progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold-grad); width: 0; }
.meta { padding: 10px 12px 12px; }
.meta .t { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .s { font-size: .8rem; color: var(--muted); }

/* browse */
.page-head { max-width: var(--max); margin: 0 auto; padding: 40px 20px 8px; }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.grid { max-width: var(--max); margin: 0 auto 56px; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.empty { max-width: var(--max); margin: 80px auto; padding: 0 20px; text-align: center; }

/* player */
.player-wrap { background: #000; position: relative; }
.player-wrap video { display: block; width: 100%; max-height: 82vh; aspect-ratio: 16/9; margin: 0 auto; background: #000; }
.player-bar { max-width: var(--max); margin: 0 auto; padding: 8px 20px; display: flex; justify-content: flex-end; gap: 18px; align-items: center; font-size: .85rem; color: var(--muted); }
.player-bar select { background: var(--bg-2); color: var(--gold-2); border: 1px solid var(--gold-3); border-radius: 6px; padding: 4px 8px; font: inherit; }
.next-up a { color: var(--gold-2); text-decoration: underline; }
.audio-stage { position: relative; display: grid; place-items: center; gap: 22px; padding: 44px 20px; background: var(--bg-2) var(--bg) center/cover; background-image: linear-gradient(rgba(5,5,5,.82), rgba(5,5,5,.96)), var(--poster); }
.audio-stage img { width: min(320px, 60vw); aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.7), 0 0 0 1px var(--gold-dim); }
.audio-stage audio { width: min(720px, 100%); }
video::cue { background: rgba(0,0,0,.72); color: #fff; font-family: var(--font); font-size: 1.05em; line-height: 1.35; }

.watch { max-width: var(--max); margin: 0 auto; padding: 26px 20px; display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .watch:has(.ep-nav) { grid-template-columns: 2fr 1fr; } }
.watch h1 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
.desc { max-width: 70ch; font-size: 1.02rem; color: #e4dcc8; }
.tags span { display: inline-block; margin: 4px 6px 0 0; padding: 2px 11px; border-radius: 999px; border: 1px solid var(--gold-dim); font-size: .8rem; color: var(--muted); }
.ep-nav { background: var(--bg-2); border: 1px solid var(--gold-dim); border-radius: var(--radius); padding: 16px; align-self: start; }
.ep-nav h3 a { color: var(--gold-2); }
.ep-nav ol { list-style: none; margin: 0; padding: 0; }
.ep-nav li a { display: block; padding: 8px 10px; border-radius: 6px; font-size: .92rem; }
.ep-nav li a:hover { background: var(--card-2); }
.ep-nav li.current a { background: var(--card-2); border-left: 3px solid var(--gold); }
.ep-nav .n { color: var(--gold); font-size: .78rem; margin-right: 6px; }

/* series page */
.episodes { max-width: var(--max); margin: 24px auto; padding: 0 20px; }
.ep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ep-list a { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; padding: 10px; border-radius: var(--radius); background: var(--card); border: 1px solid rgba(212,175,55,.1); }
.ep-list a:hover { border-color: var(--gold); }
.ep-list img { aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; width: 100%; }
.ep-list .t { font-weight: 600; }
.ep-list p { margin: 6px 0 0; font-size: .9rem; color: #cfc6b0; }
@media (max-width: 600px) { .ep-list a { grid-template-columns: 1fr; } }

/* text pages */
.prose { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }
.prose h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.prose h2 { margin-top: 1.6em; color: var(--gold-2); font-size: 1.15rem; }
.prose p, .prose li { color: #dcd3bf; }
.prose .placeholder { color: var(--gold); border-bottom: 1px dashed var(--gold-3); }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.prose td, .prose th { border: 1px solid var(--gold-dim); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { color: var(--gold-2); }
.prose form { display: grid; gap: 12px; max-width: 420px; }
.prose input, .prose select { background: var(--bg-2); color: var(--fg); border: 1px solid var(--gold-3); border-radius: 6px; padding: 9px 11px; font: inherit; }
.prose label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.switch { display: flex; align-items: center; gap: 10px; }

/* overlays: age gate, parental lock, install */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5,5,5,.92); backdrop-filter: blur(8px); padding: 20px; }
.gate-box { max-width: 460px; width: 100%; background: var(--bg-2); border: 1px solid var(--gold-3); border-radius: 16px; padding: 28px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.8); }
.gate-box .rating.big { margin-bottom: 12px; }
.gate-box h2 { color: var(--gold-2); }
.gate-box p { color: #dcd3bf; }
.gate-box input { width: 100%; text-align: center; letter-spacing: .5em; font-size: 1.4rem; background: var(--bg); color: var(--gold-2); border: 1px solid var(--gold-3); border-radius: 8px; padding: 10px; margin: 10px 0; font: inherit; }
.gate-box .actions { justify-content: center; }
.install-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px; background: var(--bg-2); border: 1px solid var(--gold-3); border-radius: 999px; padding: 8px 10px 8px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.7); font-size: .9rem; }
.install-bar button.x { background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; }

/* app-style bottom tab bar (phones and tablets) */
.tabbar { display: none; }
@media (max-width: 900px) {
  .top nav { display: none; }
  .top { justify-content: center; padding: 10px 16px; }
  .brand img { height: 34px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(8,7,4,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--gold-dim); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; color: var(--muted); font-size: .66rem; letter-spacing: .02em; -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 22px; height: 22px; fill: currentColor; }
  .tabbar a.active { color: var(--gold-2); }
  .tabbar a.active svg { filter: drop-shadow(0 0 6px rgba(246,212,112,.6)); }
  main { padding-bottom: 76px; }
  footer { margin-bottom: 90px; }
  .hero { min-height: 58vh; }
  .hero-inner { padding: 40px 16px 28px; }
  .watch, .row, .page-head, .grid, .episodes { padding-left: 16px; padding-right: 16px; }
}
html { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.card, .btn, .tabbar a, .top nav a { user-select: none; -webkit-user-select: none; }
.card img { -webkit-user-drag: none; }
@media (display-mode: standalone) { .top { position: sticky; } }

footer { max-width: var(--max); margin: 70px auto 30px; padding: 28px 20px 0; border-top: 1px solid var(--gold-dim); display: grid; gap: 16px; font-size: .9rem; }
footer .foot-brand img { height: 34px; width: auto; }
footer .tagline { font-family: var(--font-display); letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; color: var(--gold); margin-top: 8px; }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); }
footer .links a:hover { color: var(--gold-2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--gold); color: #120d02; padding: 8px 16px; border-radius: 6px; font-size: .9rem; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; }

/* TV / large screens and D-pad focus */
@media (min-width: 1800px) { html { font-size: 20px; } .brand img { height: 52px; } }
.card:focus-visible, .btn:focus-visible, .top nav a:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }

/* standalone (installed app) tweaks */
@media (display-mode: standalone) { .top { padding-top: max(12px, env(safe-area-inset-top)); } }
