:root { color-scheme: dark; --background: #101114; --panel: #1a1c22; --border: #30333d; --text: #f1f2f6; --muted: #a1a6b4; --accent: #b5a2ff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.5 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, input, select { color: inherit; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 11px 15px; }
button:hover, select:hover { border-color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }
.site-header { max-width: 1160px; margin: 0 auto; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.brand { font-weight: 750; font-size: 21px; letter-spacing: -.5px; }
.brand span { color: var(--accent); margin-right: 8px; }
.nav-link { color: var(--muted); font-size: 14px; }
.nav-link:hover { color: var(--text); }
main { width: min(1160px, 100%); margin: 0 auto; padding: 40px 24px 64px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.2; letter-spacing: -1.2px; margin-bottom: 18px; }
h2 { font-size: 23px; letter-spacing: -.5px; margin-bottom: 0; }
.hero { padding: 20px 0 16px; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px; }
.hero > p:not(.eyebrow) { color: var(--muted); margin-bottom: 26px; }
.search { display: flex; gap: 10px; max-width: 800px; }
.search input { flex: 1; min-width: 0; padding: 15px 18px; }
.search button { background: var(--accent); border-color: var(--accent); color: #181324; font-weight: 650; min-width: 104px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin: 24px 0 20px; }
.count { min-width: 26px; text-align: center; border-radius: 20px; color: var(--muted); background: var(--panel); font-size: 13px; padding: 3px 9px; }
.status { color: var(--muted); font-size: 14px; min-height: 21px; margin: 12px 0; }
.empty-state { border: 1px dashed var(--border); border-radius: 16px; padding: 36px 24px; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); margin-bottom: 6px; font-weight: 550; }
.empty-state p { margin-bottom: 0; max-width: 580px; font-size: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 24px 18px; }
.film-card { min-width: 0; display: block; }
.poster { aspect-ratio: 2 / 3; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 11px; display: grid; place-items: center; color: var(--muted); font-size: 32px; transition: border-color .15s, transform .15s; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.film-card:hover .poster { border-color: var(--accent); transform: translateY(-3px); }
.film-card h3 { font-size: 15px; line-height: 1.4; font-weight: 600; margin: 0 0 5px; }
.card-detail { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.film-card progress { display: block; width: 100%; height: 3px; border: 0; border-radius: 2px; background: var(--border); accent-color: var(--accent); }
.film-card progress::-webkit-progress-bar { background: var(--border); border-radius: 2px; }
.film-card progress::-webkit-progress-value { background: var(--accent); border-radius: 2px; }
#search-section { padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.watch-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 16px; }
.watch-heading h1 { font-size: clamp(25px, 3.5vw, 36px); max-width: 800px; margin-bottom: 8px; }
.watch-toggle { white-space: nowrap; margin-top: 2px; }
.watch-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: #252033; }
.watch-toggle[aria-pressed="true"]::before { content: '✓ '; }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 24px; background: #000; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
video { display: block; width: 100%; height: 100%; }
.console-controls { position: absolute; left: 0; right: 0; bottom: 48px; display: flex; align-items: center; gap: 14px; padding: 20px 16px 8px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility .2s; }
.console-controls.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.player-time { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-timeline { display: block; flex: 1; min-width: 0; width: 100%; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 0; cursor: pointer; background: transparent; -webkit-appearance: none; appearance: none; }
.player-timeline::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--played, 0%), #64646e var(--played, 0%)); }
.player-timeline::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border: 0; border-radius: 50%; background: #fff; }
.player-timeline::-moz-range-track { height: 6px; border-radius: 3px; background: #64646e; }
.player-timeline::-moz-range-progress { height: 6px; background: var(--accent); }
.player-timeline::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; }
.player-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 12px; }
.control { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.control label { color: var(--muted); font-size: 12px; }
.control select { max-width: 320px; }
.save-status { color: var(--muted); font-size: 12px; min-height: 18px; }
.diagnostics { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 24px; }
.diagnostics summary { cursor: pointer; color: var(--muted); }
@media (max-width: 600px) {
  .site-header { padding: 18px; }
  main { padding: 28px 18px 48px; }
  .hero { padding-top: 12px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .watch-heading { flex-direction: column; gap: 4px; }
  .control { min-width: 120px; flex: 1; }
  .control select { width: 100%; min-width: 0; }
  .search button { min-width: 80px; padding: 11px; }
  .console-controls { padding: 14px 10px 6px; gap: 8px; }
  .player-time { font-size: 12px; }
}
