:root {
  --bg: #10285c;
  --bg-panel: #15366d;
  --bg-card: #214980;
  --text: #f5f8ff;
  --text-dim: #c0cee5;
  --accent: #20c9f4;
  --radius: 8px;
}
html { scroll-padding: 96px 24px 32px; }
body { background: radial-gradient(ellipse at top right, #204984, #10285c 75%); }
body:has(.overlay.open), body:has(.player-overlay.open:not(.mini)) { overflow: hidden; }
header.topbar { background: #112c60f5; border: 0; }
.brand { gap: 7px; margin-right: 12px; }
.brand-mark { width: 26px; height: 24px; }
.brand-name { font-size: 20px; }
.brand-name, .detail-headline { letter-spacing: 0; }
main { max-width: 1600px; padding: 28px 5% 40vh; }
h1.page-title { font-size: 36px; margin: 8px 0 28px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 16px; }
.card { min-width: 0; scroll-margin: 24px; border-radius: 8px; contain: layout paint; }
.card .poster { box-shadow: none; border-radius: 8px; }
.card .meta { min-height: 76px; }
.card .title { font-size: 18px; }
.card .subtitle { font-size: 16px; }
.card:hover .poster { transform: none; }
.recent-strip { padding: 8px 8px 18px; }
.remote-mode :is(button, a, input, select, textarea, [tabindex]):focus {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  box-shadow: 0 0 20px #20c9f470;
}
.remote-mode :is(button, .chip):focus { background: var(--accent); color: #062c42; }
.remote-mode .card:focus { outline: none; box-shadow: none; }
.remote-mode .card:focus .poster { transform: none; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--accent); }
.remote-mode .card:focus .title { color: #071b35; background: var(--accent); border-radius: 4px; padding: 3px 6px; }
button, .chip { transition: none; scroll-margin: 16px; }
.remote-mode .remote-focusable:focus-visible .poster { transform: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent); }
.remote-mode .remote-focusable:focus-visible { outline: 0; }
.player-overlay.open:not(.mini) { overflow: hidden; justify-content: center; }
.player-overlay.open:not(.mini) video { height: 100vh; max-height: 100vh; object-fit: contain; }
.player-overlay.open:not(.mini) .player-related { display: none; }
.player-overlay.open:not(.mini) :is(.player-min, .player-close) { display: none; }
.player-overlay.open:not(.mini).browse { overflow-y: auto; justify-content: flex-start; }
.player-overlay.open:not(.mini).browse video { height: 70vh; max-height: 70vh; flex: none; }
.player-overlay.open:not(.mini).browse .player-related { display: block; }
#detail-overlay { padding: 0; background: var(--bg); scroll-padding: 24px; }
#detail-modal { max-width: none; padding: 0 0 48px; border: 0; border-radius: 0; background: var(--bg); box-shadow: none; }
#detail-modal > .close-btn { position: absolute; top: 24px; left: 24px; right: auto; z-index: 3; width: 44px; height: 44px; font-size: 28px; background: #143b70; }
.detail-hero { display: flex; align-items: flex-end; min-height: 92vh; padding: 100px 9% 64px; border: 0; border-radius: 0; background: var(--bg); }
.detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.detail-hero::before { z-index: 1; background: linear-gradient(90deg, #10285cf2, #10285ca6 48%, #10285c15), linear-gradient(0deg, var(--bg), transparent 65%); }
.detail-content { width: 680px; max-width: 100%; gap: 16px; }
.detail-headline { font-size: 44px; line-height: 1.15; overflow-wrap: anywhere; }
.detail-original, .detail-meta { font-size: 18px; }
.detail-overview { font-size: 18px; line-height: 1.5; -webkit-line-clamp: 3; margin: 0; }
.detail-ratings { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-ratings span { padding: 8px 14px; border-radius: 6px; background: #28548c; font-weight: 700; }
.detail-actions { margin-top: 20px; gap: 14px; }
.detail-actions .detail-action { min-height: 52px; margin: 0; font-size: 18px; border-radius: 26px; flex: none; }
.detail-actions .detail-icon { width: 52px; padding: 0; font-size: 26px; }
#detail-modal > :is(.season-tabs, #episode-list, .torrent-list) { margin: 24px 9%; }
@media (max-width: 1000px) {
  h1.page-title { font-size: 28px; }
  .grid { gap: 24px 16px; }
  .card .title { font-size: 15px; }
  .card .subtitle { font-size: 14px; }
  .detail-headline { font-size: 34px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 180px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1.page-title { font-size: 26px; }
  .detail-hero { padding: 100px 24px 40px; min-height: 90vh; }
  .detail-headline { font-size: 30px; }
  .detail-original, .detail-meta, .detail-overview { font-size: 16px; }
  .detail-actions { width: auto; }
  #detail-modal > :is(.season-tabs, #episode-list, .torrent-list) { margin: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}