:root {
    font-family: system-ui, sans-serif;
    color-scheme: light;
    --background: #f6f6f4;
    --surface: #fff;
    --elevated: #e9ebed;
    --text: #1c2026;
    --muted: #555d67;
    --line: #d8dade;
    --accent: #1458bd;
    --on-accent: #fff;
    --glass: rgb(246 246 244 / 90%);
    --poster-bg: linear-gradient(145deg, #dfe7f4, #e8e4ed);
    --radius: 18px;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --background: #111315;
    --surface: #1b1e21;
    --elevated: #262a2e;
    --text: #f1f2f3;
    --muted: #b1b8c1;
    --line: #393e45;
    --accent: #aecaff;
    --on-accent: #14294c;
    --glass: rgb(17 19 21 / 90%);
    --poster-bg: linear-gradient(145deg, #26364b, #302a3b);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --background: #111315;
        --surface: #1b1e21;
        --elevated: #262a2e;
        --text: #f1f2f3;
        --muted: #b1b8c1;
        --line: #393e45;
        --accent: #aecaff;
        --on-accent: #14294c;
        --glass: rgb(17 19 21 / 90%);
        --poster-bg: linear-gradient(145deg, #26364b, #302a3b);
    }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font-family: inherit; }
a { color: var(--accent); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1; letter-spacing: -.055em; }
h2 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.025em; }
.shell { position: sticky; top: 0; z-index: 10; background: var(--glass); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.shell-inner { max-width: 1440px; min-height: 70px; margin: auto; padding: 0 clamp(18px, 5vw, 70px); display: flex; gap: 18px; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 1.3rem; font-weight: 760; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.shell nav { display: flex; gap: .25rem; }
.shell nav a { padding: .55rem .9rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; }
.shell nav a.active, .shell nav a:hover { background: var(--elevated); color: var(--text); }
.appearance { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: .45rem .65rem; }
.content { max-width: 1440px; padding: 42px clamp(18px, 5vw, 70px) 90px; margin: auto; }
.page-heading { margin-bottom: 30px; }
.page-heading p { color: var(--muted); margin-top: 10px; }
.welcome { min-height: 390px; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 36px 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; }
.welcome h2 { font-size: clamp(1.6rem, 4vw, 2rem); }
.welcome p, .muted, .metadata { color: var(--muted); }
.action { display: inline-flex; align-items: center; justify-content: center; padding: .58rem .95rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 650; cursor: pointer; }
.action:hover { background: var(--elevated); }
.action.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.action.primary:hover { filter: brightness(.91); }
.action:disabled { opacity: .55; cursor: default; }
.state { padding: 28px 0; color: var(--muted); text-align: center; }
.message { background: var(--elevated); color: var(--text); border-radius: 12px; padding: 12px 16px; margin-block: 12px; }
.media-row { margin-block: 34px; }
.media-row h2 { margin-bottom: 14px; }
.posters { display: grid; grid-auto-columns: clamp(116px, 15vw, 175px); grid-auto-flow: column; gap: 15px; padding: 4px 4px 12px; overflow: auto; scroll-snap-type: x proximity; }
.posters.grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); overflow: visible; }
.poster { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; scroll-snap-align: start; }
.poster:hover strong { color: var(--accent); }
.poster-art, .hero-art { background: var(--poster-bg); color: var(--muted); position: relative; display: grid; place-items: center; overflow: hidden; }
.poster-art { aspect-ratio: 2 / 3; border-radius: 13px; margin-bottom: 4px; }
.poster-art img, .hero-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.poster-art progress { position: absolute; left: 8px; right: 8px; bottom: 8px; width: calc(100% - 16px); height: 7px; accent-color: var(--accent); }
.poster-subtitle { font-size: .85rem; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.settings-panel { padding: 26px; }
.settings-panel p { margin-block: 8px 18px; }
.settings-panel form { display: grid; gap: 12px; }
.settings-panel form button { justify-self: start; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.plain-list { list-style: none; padding: 0 16px; }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; }
.plain-list li + li { border-top: 1px solid var(--line); }
.search-field { display: block; max-width: 650px; }
.search-field input { display: block; width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.detail { max-width: 760px; margin: 0 auto 46px; text-align: center; }
.hero-art { width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; margin-bottom: 22px; }
.hero-art span { font-size: 2.5rem; }
.detail h1 { font-size: clamp(2rem, 5vw, 3.15rem); }
.eyebrow { margin-bottom: 8px; color: var(--muted); }
.metadata { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
.genres span { border-radius: 999px; background: var(--elevated); padding: 4px 10px; font-size: .85rem; }
.actions { display: flex; justify-content: center; gap: 10px; margin: 18px 0; }
.overview { margin-top: 20px; line-height: 1.65; }
.season-picker { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 18px 0; }
.season-picker label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; }
.cast-row { display: grid; grid-auto-columns: 105px; grid-auto-flow: column; gap: 15px; overflow: auto; }
.person { display: grid; align-content: start; justify-items: center; text-align: center; gap: 5px; }
.person img { width: 90px; height: 90px; object-fit: cover; border-radius: 50%; }
.player { max-width: 1180px; margin: 0 auto; }
.player-top { display: flex; align-items: center; gap: 15px; margin-bottom: 16px; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 76vh; background: #000; border-radius: var(--radius); }
.player-actions { margin-block: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; inset-inline: 0; padding: 1rem; background: var(--elevated); z-index: 30; }
@media (max-width: 580px) {
    .shell-inner { min-height: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-block: 10px; }
    .shell nav { grid-row: 2; grid-column: 1 / -1; }
    .settings-grid { grid-template-columns: 1fr; }
    .content { padding-top: 26px; }
}
@media (prefers-reduced-transparency: reduce) {
    .shell { background: var(--background); backdrop-filter: none; }
}
