/* ════════════════════════════════════════════════════════════════════════
   MEDIA TRACKER — Cinematic dark dashboard
   Style: Vibrant & block-based · Font: Inter · Deep navy + violet/green accents
   ════════════════════════════════════════════════════════════════════════ */

:root {
    /* Surfaces */
    --bg:          #070A12;
    --surface:     #0F1421;
    --surface-2:   #161D2E;
    --surface-3:   #1E2638;
    --border:      #252E42;
    --border-soft: #1C2333;

    /* Text */
    --text:        #F1F4FB;
    --muted:       #8A93AB;
    --faint:       #5C6580;

    /* Brand + semantic */
    --accent:      #7C5CFC;   /* violet — primary brand */
    --accent-2:    #A78BFA;
    --accent-glow: rgba(124, 92, 252, .35);
    --green:       #22C55E;   /* watched */
    --amber:       #F5A524;   /* ratings */
    --blue:        #3B82F6;   /* watching */
    --red:         #EF4444;   /* destructive */

    --radius:    14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow:    0 8px 30px rgba(0,0,0,.45);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.55);
    --ease:      cubic-bezier(.22,.61,.36,1);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

@view-transition { navigation: auto; }

/* GPU-layer hints: tell the browser to prepare compositing layers ahead of time */
::view-transition-old(root),
::view-transition-new(root),
::view-transition-old(active-poster),
::view-transition-new(active-poster) { will-change: opacity, transform; }

/* Default (no direction): vertical fade */
::view-transition-old(root) { animation: 180ms ease-in  both vt-fade-out; }
::view-transition-new(root) { animation: 220ms ease-out both vt-fade-in;  }
@keyframes vt-fade-out { to   { opacity: 0; transform: translateY(6px);  } }
@keyframes vt-fade-in  { from { opacity: 0; transform: translateY(6px);  } }

/* Forward: content pushes left (sidebar nav deeper) */
[data-nav-dir="forward"]::view-transition-old(root) { animation: 200ms ease-in  both vt-push-left-out; }
[data-nav-dir="forward"]::view-transition-new(root) { animation: 280ms ease-out both vt-push-left-in;  }

/* Back: content pulls right */
[data-nav-dir="back"]::view-transition-old(root) { animation: 200ms ease-in  both vt-push-right-out; }
[data-nav-dir="back"]::view-transition-new(root) { animation: 280ms ease-out both vt-push-right-in;  }

/* Morph (card → detail): root fades normally; poster does the hero work */
/* No override — default fade runs, poster morphs independently            */

@keyframes vt-push-left-out  { to   { opacity: 0; transform: translateX(-28px); } }
@keyframes vt-push-left-in   { from { opacity: 0; transform: translateX( 28px); } }
@keyframes vt-push-right-out { to   { opacity: 0; transform: translateX( 28px); } }
@keyframes vt-push-right-in  { from { opacity: 0; transform: translateX(-28px); } }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* Background image — grayscale + dimmed so purple gradient takes over */
body::after {
    content: "";
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background: url('pms.jpeg') center/cover no-repeat;
    filter: saturate(0) brightness(.45);
    will-change: transform;
}

/* Ambient cinematic glow behind everything */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 500px at 18% -8%, rgba(124,92,252,.35), transparent 60%),
        radial-gradient(800px 500px at 100% 0%, rgba(124,92,252,.15), transparent 55%),
        linear-gradient(rgba(7,10,18,.70), rgba(7,10,18,.70));
    will-change: transform;
}

a { color: inherit; text-decoration: none; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }

.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; }

.skip-link {
    position: absolute; left: -9999px; top: 4px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    background: var(--accent); color: #fff; font-weight: 600; z-index: 9999;
}
.skip-link:focus-visible { left: 16px; }

fieldset { border: none; padding: 0; margin: 0; min-width: 0; }
fieldset legend { font-size: .82rem; color: var(--muted); font-weight: 500; padding: 0; margin-bottom: 7px; }

/* ── Layout shell ───────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100dvh; }

.sidebar {
    position: sticky; top: 0; align-self: flex-start;
    width: 248px; height: 100dvh; flex-shrink: 0;
    padding: 26px 18px;
    display: flex; flex-direction: column; gap: 8px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-right: 1px solid var(--border-soft);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 22px; }
.brand-mark {
    display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 11px; color: #fff; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #5B3FD9);
    box-shadow: 0 6px 18px var(--accent-glow);
}
.brand-mark .icon { width: 21px; height: 21px; }
.brand-text { font-size: 1.06rem; font-weight: 500; letter-spacing: -.01em; }
.brand-text strong { font-weight: 800; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 500; font-size: .92rem;
    position: relative; transition: color .2s var(--ease), background .2s var(--ease);
}
.side-link .icon { width: 19px; height: 19px; }
.side-link:hover { color: var(--text); background: var(--surface-2); }
.side-link.is-active { color: var(--text); background: var(--surface-2); }
.side-link.is-active::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 3px;
    background: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
}

.side-cta {
    margin-top: auto;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), #5B3FD9); color: #fff;
    font-weight: 600; font-size: .9rem;
    box-shadow: 0 8px 22px var(--accent-glow); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.side-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--accent-glow); }
.side-cta .icon { width: 18px; height: 18px; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 34px 38px 80px; }

/* ── Topbar (mobile only) ───────────────────────────────────────────────── */
.topbar { display: none; }
.brand-mobile { padding: 0; }

/* ── Flash ──────────────────────────────────────────────────────────────── */
.flash {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 20px;
    font-size: .9rem; font-weight: 500; animation: slideIn .35s var(--ease);
}
.flash .icon { width: 18px; height: 18px; }
.flash-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); color: #4ade80; }
.flash-error   { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #f87171; }
.flash a { color: inherit; text-decoration: underline; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Page header ────────────────────────────────────────────────────────── */
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ── Stats cards ────────────────────────────────────────────────────────── */
.stats-bar {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px; margin-bottom: 30px;
}
.stat-card {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    padding: 18px 20px; transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--border); }
.stat-card .stat-icon {
    display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 10px; margin-bottom: 14px;
}
.stat-card .stat-icon .icon { width: 19px; height: 19px; }
.stat-num { font-size: 1.85rem; font-weight: 800; line-height: 1; letter-spacing: -.02em;
            font-variant-numeric: tabular-nums; }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: 5px; font-weight: 500; }

.ic-total    { background: rgba(124,92,252,.15); color: var(--accent-2); }
.ic-watched  { background: rgba(34,197,94,.15);  color: var(--green); }
.ic-watching { background: rgba(59,130,246,.15); color: var(--blue); }
.ic-towatch  { background: rgba(245,165,36,.15); color: var(--amber); }
.ic-rating   { background: rgba(245,165,36,.15); color: var(--amber); }

/* ── Toolbar / filters ──────────────────────────────────────────────────── */
.toolbar {
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
    margin-bottom: 26px;
}
.search-field {
    position: relative; flex: 1; min-width: 220px;
}
.search-field .icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--faint); pointer-events: none;
}
.search-field input {
    width: 100%; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 11px 14px 11px 42px; font-size: .92rem; outline: none;
    font-family: inherit; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search-field input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.seg {
    display: inline-flex; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 3px; gap: 2px;
}
.seg a {
    padding: 8px 14px; border-radius: 8px; font-size: .85rem; font-weight: 500;
    color: var(--muted); transition: color .18s, background .18s; white-space: nowrap;
}
.seg a:hover { color: var(--text); }
.seg a.is-active { background: var(--surface-3); color: var(--text); }

.sort-field {
    position: relative; display: inline-flex; align-items: center;
}
.sort-field > .icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; color: var(--faint); pointer-events: none;
}
.sort-field select {
    appearance: none; -webkit-appearance: none;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 34px 10px 34px; font-size: .85rem; font-weight: 500;
    font-family: inherit; cursor: pointer; outline: none; white-space: nowrap;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.sort-field select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ── Poster grid ────────────────────────────────────────────────────────── */
.grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 22px;
}
.card {
    display: block; border-radius: var(--radius); overflow: hidden;
    background: var(--surface); border: 1px solid var(--border-soft);
    transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--border); box-shadow: var(--shadow-lg); }

.poster-wrap { position: relative; aspect-ratio: 2/3; overflow: hidden; background: var(--surface-3); }
.poster-wrap img { width: 100%; height: 100%; object-fit: cover; display: block;
                   transition: transform .4s var(--ease); }
.card:hover .poster-wrap img { transform: scale(1.06); }
.poster-ph { width: 100%; height: 100%; display: grid; place-items: center;
             color: var(--faint); background:
             linear-gradient(160deg, var(--surface-3), var(--surface)); }
.poster-ph .icon { width: 46px; height: 46px; }

/* gradient scrim + overlay info on poster */
.poster-wrap::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(7,10,18,.92) 0%, rgba(7,10,18,0) 42%);
    opacity: .9;
}
.poster-overlay {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.rating-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(7,10,18,.7); backdrop-filter: blur(6px);
    border: 1px solid rgba(245,165,36,.35); color: var(--amber);
    padding: 3px 8px; border-radius: 99px; font-size: .76rem; font-weight: 700;
}
.rating-chip .icon { width: 12px; height: 12px; }

.status-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(7,10,18,.6);
}
.dot-watched  { background: var(--green); }
.dot-watching { background: var(--blue); }
.dot-to_watch { background: var(--amber); }

/* ── Binnenkort-sectie (nog niet uitgekomen films) ──────────────────────── */
.section-head {
    display: flex; align-items: center; gap: 9px; margin: 0 0 16px;
    font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 700;
}
.section-head .icon { width: 16px; height: 16px; color: var(--accent-2); }
.section-count {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px;
    padding: 0 6px; border-radius: 99px; font-size: .72rem; font-weight: 700;
    background: rgba(124,92,252,.18); color: var(--accent-2);
    text-transform: none; letter-spacing: 0;
}
.upcoming-section { margin-bottom: 34px; }
.card-upcoming { border-color: rgba(124,92,252,.35); }
.upcoming-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(124,92,252,.92); backdrop-filter: blur(6px);
    border: 1px solid rgba(124,92,252,.5); color: #fff;
    padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700;
}
.upcoming-badge .icon { width: 12px; height: 12px; }

.card-airing { border-color: rgba(59,130,246,.35); }
.airing-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(59,130,246,.92); backdrop-filter: blur(6px);
    border: 1px solid rgba(59,130,246,.5); color: #fff;
    padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700;
}
.airing-badge .icon { width: 12px; height: 12px; }

.card-body { padding: 13px 14px 15px; }
.card-meta { font-size: .72rem; color: var(--faint); text-transform: uppercase;
             letter-spacing: .04em; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-meta .icon { width: 13px; height: 13px; }
.card-body h3 { font-size: .94rem; font-weight: 600; margin: 6px 0 7px; line-height: 1.3;
                display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-genres { font-size: .76rem; color: var(--muted);
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
         border-radius: 99px; font-size: .82rem; font-weight: 600; border: 1px solid transparent; }
.badge .icon { width: 14px; height: 14px; }
.badge-watched  { background: rgba(34,197,94,.14); color: #4ade80; border-color: rgba(34,197,94,.3); }
.badge-watching { background: rgba(59,130,246,.14); color: #60a5fa; border-color: rgba(59,130,246,.3); }
.badge-to_watch { background: rgba(245,165,36,.14); color: #fbbf24; border-color: rgba(245,165,36,.3); }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty {
    text-align: center; padding: 90px 20px;
    border: 1px dashed var(--border); border-radius: var(--radius-lg);
    background: var(--surface);
}
.empty .empty-icon { display: grid; place-items: center; width: 64px; height: 64px;
    margin: 0 auto 18px; border-radius: 18px; background: var(--surface-2); color: var(--accent-2); }
.empty .empty-icon .icon { width: 30px; height: 30px; }
.empty h2 { font-size: 1.15rem; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 22px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    padding: 11px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer;
    font-family: inherit; font-size: .9rem; font-weight: 600;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn-primary .icon, .btn-secondary .icon, .btn-danger .icon { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5B3FD9); color: #fff;
               box-shadow: 0 8px 22px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--accent-glow); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-danger { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.4); }
.btn-danger:hover { background: rgba(239,68,68,.2); }

/* ── Detail page ────────────────────────────────────────────────────────── */
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
             font-size: .88rem; font-weight: 500; margin-bottom: 22px; transition: color .2s; }
.back-link:hover { color: var(--text); }
.back-link .icon { width: 16px; height: 16px; }

.detail-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden;
               border: 1px solid var(--border-soft); margin-bottom: 28px; }
.detail-backdrop { position: absolute; inset: 0; z-index: 0; }
.detail-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(1.2);
                       transform: scale(1.15); opacity: .35; }
/* Echte TMDB-achtergrond: minder doorzichtig zodat hij duidelijk zichtbaar is */
.detail-backdrop--wide img { filter: blur(11px) saturate(1.15); transform: scale(1.08); opacity: .62; }
.detail-hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(7,10,18,.55), rgba(7,10,18,.92)); }

.detail-inner { position: relative; z-index: 2; display: flex; gap: 34px; padding: 36px; flex-wrap: wrap; }
.detail-poster { width: 230px; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius);
                 box-shadow: var(--shadow-lg); flex-shrink: 0; }
.detail-poster-ph { width: 230px; aspect-ratio: 2/3; border-radius: var(--radius); flex-shrink: 0;
    display: grid; place-items: center; background: var(--surface-3); color: var(--faint);
    box-shadow: var(--shadow-lg); }
.detail-poster-ph .icon { width: 60px; height: 60px; }

.detail-info { flex: 1; min-width: 260px; }
.detail-kicker { display: flex; align-items: center; gap: 10px; color: var(--muted);
                 font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
                 margin-bottom: 10px; flex-wrap: wrap; }
.detail-kicker .icon { width: 15px; height: 15px; }
.detail-kicker .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.detail-info h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.detail-director { color: var(--muted); margin-top: 8px; }
.detail-director strong { color: var(--text); font-weight: 600; }

.genre-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.genre-tag { background: var(--surface-2); border: 1px solid var(--border);
             padding: 5px 13px; border-radius: 99px; font-size: .8rem; font-weight: 500; }

.detail-stats { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 20px 0 24px; }
.rating-big { display: inline-flex; align-items: center; gap: 6px; color: var(--amber);
              font-size: 1.05rem; font-weight: 700; }
.rating-big .icon { width: 18px; height: 18px; }
.watched-date { color: var(--muted); font-size: .85rem; }
.airing-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 99px; font-size: .82rem; font-weight: 600;
    background: rgba(59,130,246,.15); color: #60a5fa; border: 1px solid rgba(59,130,246,.35);
}
.airing-chip .icon { width: 14px; height: 14px; }
.airing-chip--muted  { background: var(--surface-2); color: var(--muted); border-color: var(--border); font-weight: 500; }
.airing-chip--ended  { background: rgba(239,68,68,.1); color: #f87171; border-color: rgba(239,68,68,.3); font-weight: 500; }

.omdb-awards, .omdb-boxoffice {
    display: flex; align-items: center; gap: 8px;
    color: #d4dae8; line-height: 1.75;
}
.omdb-awards .icon, .omdb-boxoffice .icon {
    width: 15px; height: 15px; color: var(--accent-2); flex-shrink: 0;
}
.omdb-awards-link {
    text-decoration: none; flex-wrap: wrap;
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1px solid var(--border);
    transition: border-color .18s var(--ease), background .18s var(--ease);
}
.omdb-awards-link:hover { border-color: var(--accent); background: var(--surface-3); }
.omdb-awards-go {
    display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
    color: var(--accent-2); font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.omdb-awards-go .icon { width: 13px; height: 13px; color: var(--accent-2); }

.imdb-rating { display: inline-flex; }
.imdb-link {
    display: inline-flex; align-items: center; gap: 6px;
    background: #F5C518; border-radius: 6px;
    padding: 3px 8px; text-decoration: none;
    transition: opacity .18s;
}
.imdb-link:hover { opacity: .85; }
.imdb-logo { font-size: .72rem; font-weight: 800; color: #000; letter-spacing: -.01em; }
.imdb-score { font-size: .85rem; font-weight: 700; color: #000; }

.detail-actions { display: flex; gap: 11px; flex-wrap: wrap; }
.detail-actions form { display: inline; }

.detail-section { margin-bottom: 26px; max-width: 760px; }
.detail-section h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
                     color: var(--muted); font-weight: 700; margin-bottom: 11px; }
.detail-section p { line-height: 1.75; color: #d4dae8; }

.finance-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.finance-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 22px;
}
.finance-label {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 600; margin-bottom: 8px;
}
.finance-sub { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .78rem; }
.finance-value {
    font-size: 1.35rem; font-weight: 700; color: var(--text);
    font-variant-numeric: tabular-nums;
}

.cast-list { display: flex; flex-wrap: wrap; gap: 9px; }
.cast-tag { background: var(--surface-2); border: 1px solid var(--border-soft);
            padding: 7px 14px; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-container { max-width: 760px; }
.form-card { background: var(--surface); border: 1px solid var(--border-soft);
             border-radius: var(--radius-lg); padding: 28px; }
.form-card h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
                color: var(--muted); font-weight: 700; margin: 6px 0 18px; }
hr { border: none; border-top: 1px solid var(--border-soft); margin: 28px 0; }

.form-row { display: flex; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; margin-bottom: 18px; }
.form-row .form-group { margin-bottom: 0; }
.form-group-sm { flex: 0 0 150px; }

/* Type toggle (Film / Serie) */
.type-toggle { display: flex; }
.type-toggle input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.type-toggle label {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    min-width: 90px; height: 44px;
    cursor: pointer; font-size: .92rem; font-weight: 500;
    background: var(--surface-2); color: var(--muted);
    border: 1px solid var(--border);
    transition: color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.type-toggle label:first-of-type { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.type-toggle label:last-of-type  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.type-toggle label .icon { width: 15px; height: 15px; }
.type-toggle input[value="movie"]:checked + label {
    background: rgba(124,92,252,.18); color: var(--accent-2);
    box-shadow: inset 0 0 0 2px var(--accent); position: relative; z-index: 1;
}
.type-toggle input[value="series"]:checked + label {
    background: rgba(59,130,246,.18); color: #60a5fa;
    box-shadow: inset 0 0 0 2px var(--blue); position: relative; z-index: 1;
}

/* Status toggle (Wil zien / Bezig / Gezien) */
.status-toggle { display: flex; }
.status-toggle input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.status-toggle label {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    height: 44px; cursor: pointer; font-size: .92rem; font-weight: 500;
    background: var(--surface-2); color: var(--muted);
    border: 1px solid var(--border);
    transition: color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.status-toggle label:first-of-type  { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.status-toggle label:nth-of-type(2) { margin-left: -1px; }
.status-toggle label:last-of-type   { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.status-toggle label .icon { width: 15px; height: 15px; }
.status-toggle label.is-locked { opacity: .38; cursor: not-allowed; }

.status-toggle input[value="to_watch"]:checked + label {
    background: rgba(245,165,36,.15); color: var(--amber);
    box-shadow: inset 0 0 0 2px var(--amber); position: relative; z-index: 1;
}
.status-toggle input[value="watching"]:checked + label {
    background: rgba(59,130,246,.15); color: var(--blue);
    box-shadow: inset 0 0 0 2px var(--blue); position: relative; z-index: 1;
}
.status-toggle input[value="watched"]:checked + label {
    background: rgba(34,197,94,.15); color: var(--green);
    box-shadow: inset 0 0 0 2px var(--green); position: relative; z-index: 1;
}

label { font-size: .82rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
    width: 100%; background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 11px 13px; font-size: .92rem; outline: none; font-family: inherit;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { resize: vertical; }
select { cursor: pointer; }

.genre-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.checkbox-label {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 7px 13px; border-radius: 99px; font-size: .84rem; user-select: none;
    transition: border-color .18s, color .18s, background .18s;
}
.checkbox-label input { width: auto; }
.checkbox-label:has(input:checked) {
    border-color: var(--accent); color: var(--accent-2); background: rgba(124,92,252,.12);
}

.poster-row { display: flex; gap: 13px; align-items: flex-start; }
.poster-row input { flex: 1; }
#poster-preview { width: 58px; height: 87px; object-fit: cover; border-radius: 8px;
                  border: 1px solid var(--border); flex-shrink: 0; }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; }

/* ── TMDB search box ────────────────────────────────────────────────────── */
.tmdb-box {
    background: linear-gradient(160deg, rgba(124,92,252,.1), var(--surface));
    border: 1px solid var(--accent); border-radius: var(--radius-lg);
    padding: 20px; margin-bottom: 26px; box-shadow: 0 0 0 1px rgba(124,92,252,.1);
}
.tmdb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.tmdb-head .tmdb-title { display: flex; align-items: center; gap: 8px; font-weight: 600;
                         font-size: .92rem; color: var(--accent-2); }
.tmdb-head .tmdb-title .icon { width: 17px; height: 17px; }
.tmdb-head select { width: auto; padding: 7px 11px; font-size: .82rem; background: var(--surface);
                    margin-left: auto; }
#tmdb-search { background: var(--surface); }

#search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
                  gap: 11px; margin-top: 14px; }
.sr-loading { color: var(--muted); font-size: .86rem; padding: 6px 2px; grid-column: 1/-1; }
.sr-card { display: flex; align-items: center; gap: 11px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 9px; transition: border-color .18s var(--ease), transform .18s var(--ease);
    font-family: inherit; font-size: inherit; text-align: left; }
.sr-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.sr-card img { width: 44px; height: 66px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.sr-no-poster { width: 44px; height: 66px; display: grid; place-items: center;
    background: var(--surface-3); border-radius: 6px; color: var(--faint); flex-shrink: 0; }
.sr-no-poster .icon { width: 20px; height: 20px; }
.sr-info { min-width: 0; }
.sr-info strong { display: block; font-size: .85rem; font-weight: 600; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-info span { font-size: .76rem; color: var(--muted); }

.tmdb-refetch { margin: -6px 0 18px; }

.sr-duplicate {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: var(--radius-sm); margin-top: 10px;
    background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35);
    color: #f87171; font-size: .85rem;
}
.sr-duplicate a { color: var(--accent-2); margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.sr-duplicate a:hover { text-decoration: underline; }
.sr-duplicate-close {
    background: none; border: none; cursor: pointer; padding: 2px;
    color: #f87171; display: grid; place-items: center; flex-shrink: 0;
    opacity: .7; transition: opacity .15s;
}
.sr-duplicate-close:hover { opacity: 1; }
.sr-duplicate-close .icon { width: 14px; height: 14px; }

.sr-suggest {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 4px;
    background: rgba(124,92,252,.1); border: 1px solid rgba(124,92,252,.35);
    color: var(--text); font-size: .85rem; font-family: inherit; text-align: left;
    cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease);
}
.sr-suggest:hover { background: rgba(124,92,252,.18); border-color: var(--accent); }
.sr-suggest .icon { width: 16px; height: 16px; color: var(--accent-2); flex-shrink: 0; }
.sr-suggest strong { font-weight: 700; }
.sr-suggest-go { margin-left: auto; color: var(--accent-2); white-space: nowrap; font-weight: 600; flex-shrink: 0; }

/* ── Stats page ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
@media (max-width: 980px) {
    .stats-grid-3, .stats-grid-2 { grid-template-columns: 1fr; }
}
.panel { background: var(--surface); border: 1px solid var(--border-soft);
         border-radius: var(--radius); padding: 22px; }
.panel-head { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.panel-head .icon { width: 17px; height: 17px; color: var(--accent-2); }
.panel-head h2 { font-size: .95rem; font-weight: 600; }

.bar-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
           padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.bar-row:last-child { border-bottom: none; }
.bar-label { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { grid-column: 1/-1; height: 7px; background: var(--surface-3); border-radius: 99px;
             overflow: hidden; margin-top: -4px; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
            transition: width .6s var(--ease); }
.bar-val { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.rank-row { display: flex; align-items: center; gap: 13px; padding: 10px 0;
            border-bottom: 1px solid var(--border-soft); }
.rank-row:last-child { border-bottom: none; }
.rank-num { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center;
            border-radius: 8px; background: var(--surface-2); font-size: .8rem; font-weight: 700;
            color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-row:nth-child(1) .rank-num { background: rgba(245,165,36,.18); color: var(--amber); }
.rank-title { flex: 1; min-width: 0; font-size: .9rem; font-weight: 500;
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-type { font-size: .76rem; color: var(--faint); }
.rank-score { display: inline-flex; align-items: center; gap: 4px; color: var(--amber);
              font-weight: 700; font-size: .88rem; }
.rank-score .icon { width: 14px; height: 14px; }

.panel-empty { color: var(--faint); font-size: .88rem; text-align: center; padding: 24px 0; }

/* Lijst-panels: begrensde hoogte met interne scroll */
.scroll-list {
    max-height: 340px; overflow-y: auto;
    margin-right: -8px; padding-right: 8px;
    scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
.scroll-list::-webkit-scrollbar { width: 8px; }
.scroll-list::-webkit-scrollbar-track { background: transparent; }
.scroll-list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
.scroll-list::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* ── Watch-time heroes ──────────────────────────────────────────────────── */
.watch-heroes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px; margin-bottom: 30px;
}
.watch-hero {
    display: flex; align-items: center; gap: 22px;
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, rgba(124,92,252,.22), var(--surface-2) 60%);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 26px 30px;
}
.watch-hero--series {
    background: linear-gradient(135deg, rgba(59,130,246,.18), var(--surface-2) 60%);
}
.watch-hero--series::after {
    background: radial-gradient(circle, rgba(59,130,246,.25), transparent 70%);
}
.watch-hero::after {
    content: ""; position: absolute; right: -60px; top: -60px;
    width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
}
.watch-hero-icon {
    display: grid; place-items: center; width: 58px; height: 58px; flex-shrink: 0;
    border-radius: var(--radius); background: rgba(124,92,252,.18); color: var(--accent-2);
    box-shadow: inset 0 0 0 1px rgba(124,92,252,.3);
}
.watch-hero--series .watch-hero-icon {
    background: rgba(59,130,246,.18); color: #60a5fa;
    box-shadow: inset 0 0 0 1px rgba(59,130,246,.3);
}
.watch-hero-icon .icon { width: 28px; height: 28px; }
.watch-hero-body { position: relative; z-index: 1; }
.watch-hero-num { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em;
                  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 2px; }
.watch-hero-num .wt-unit { font-size: 1.2rem; font-weight: 600; color: var(--muted); margin-right: 8px; }
.watch-hero-label { color: var(--muted); margin-top: 7px; font-size: .92rem; }

/* ── Clickable rank rows (acteurs / regisseurs) ─────────────────────────── */
.rank-link {
    text-decoration: none; color: inherit; cursor: pointer;
    margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: var(--radius-sm);
    transition: background .18s var(--ease);
}
.rank-link:hover { background: var(--surface-2); }
.rank-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-glow); }
.rank-link .rank-title { transition: color .18s var(--ease); }
.rank-link:hover .rank-title { color: var(--accent-2); }
.rank-count { font-size: .82rem; font-weight: 700; color: var(--muted);
              font-variant-numeric: tabular-nums; }
.rank-chevron { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0;
                opacity: 0; transform: translateX(-4px); transition: opacity .18s var(--ease), transform .18s var(--ease); }
.rank-link:hover .rank-chevron { opacity: 1; transform: none; color: var(--accent-2); }

/* ── Person page ────────────────────────────────────────────────────────── */
.person-head { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.person-head-info { flex: 1; min-width: 0; padding-top: 4px; }
.person-avatar {
    display: grid; place-items: center; width: 120px; height: 120px; flex-shrink: 0;
    border-radius: 50%; background: linear-gradient(135deg, var(--accent), #5B3FD9); color: #fff;
    box-shadow: 0 8px 22px var(--accent-glow);
}
.person-avatar .icon { width: 44px; height: 44px; }
.person-photo {
    width: 120px; height: 165px; object-fit: cover; flex-shrink: 0;
    border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.55);
    border: 1px solid var(--border);
}
.person-head h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.person-head > .person-head-info > p { color: var(--muted); margin-top: 5px; font-size: .92rem; }
.person-meta-list { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.person-meta-item {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; font-size: .82rem; font-weight: 500;
    color: var(--text); background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 99px;
}
.person-meta-item .icon { width: 14px; height: 14px; color: var(--accent-2); flex-shrink: 0; }
.person-meta-sub { color: var(--muted); font-weight: 400; }
.person-meta-link {
    text-decoration: none; transition: border-color .18s var(--ease), background .18s var(--ease);
}
.person-meta-link:hover { background: var(--surface-3); border-color: var(--accent); }
.person-meta-link .icon { color: #f5c518; }
.person-bio { color: var(--muted); line-height: 1.75; max-width: 720px; font-size: .93rem; margin-bottom: 8px; }
.person-bio-toggle {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--accent-2); font-size: .86rem; font-weight: 600; font-family: inherit;
    margin-bottom: 28px; transition: color .18s var(--ease);
}
.person-bio-toggle:hover { color: var(--accent); text-decoration: underline; }
.person-section { margin-bottom: 36px; }
.person-section-head {
    display: flex; align-items: center; gap: 9px; margin-bottom: 16px;
    font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 700;
}
.person-section-head .icon { width: 16px; height: 16px; color: var(--accent-2); }

/* Clickable cast tags on detail page */
a.cast-tag { transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease); }
a.cast-tag:hover { border-color: var(--accent); color: var(--accent-2); background: rgba(124,92,252,.12); }
.detail-director a:hover strong { color: var(--accent-2); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .sidebar { display: none; }
    .topbar {
        display: flex; align-items: center; justify-content: space-between;
        position: sticky; top: 0; z-index: 50;
        padding: 14px 20px; background: rgba(15,20,33,.85); backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border-soft);
    }
    .top-nav { display: flex; gap: 4px; }
    .top-nav a { display: grid; place-items: center; width: 42px; height: 42px;
                 border-radius: 10px; color: var(--muted); transition: color .2s, background .2s; }
    .top-nav a.is-active { color: var(--text); background: var(--surface-2); }
    main { padding: 24px 20px 70px; }
    .page-head h1 { font-size: 1.55rem; }
    .detail-inner { padding: 22px; gap: 22px; }
    .detail-poster, .detail-poster-ph { width: 150px; margin: 0 auto; }
    .detail-info h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
    main { padding: 20px 16px 70px; }
    .form-card { padding: 20px 16px; }
    .form-group-sm { flex: 1 1 100%; }
}

/* ── Sidebar gebruiker / uitloggen ──────────────────────────────────────── */
.side-user {
    display: flex; align-items: center; gap: 11px;
    margin-top: 14px; padding: 11px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1px solid var(--border-soft);
}
.side-user-avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 10px;
    font-weight: 700; font-size: .95rem; color: #fff;
    background: linear-gradient(135deg, var(--accent), #5B3FD9);
}
.side-user-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.side-user-info strong { font-size: .85rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-info span { font-size: .72rem; color: var(--faint);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-logout {
    display: grid; place-items: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 9px;
    color: var(--muted); background: transparent; border: 1px solid var(--border);
    cursor: pointer; transition: color .18s, background .18s, border-color .18s;
}
.side-logout:hover { color: var(--red); border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.1); }
.side-logout .icon { width: 17px; height: 17px; }

.top-logout { display: inline-flex; }
.top-logout button {
    display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: var(--radius-sm); color: var(--muted);
    background: transparent; border: none; cursor: pointer; transition: color .18s, background .18s;
}
.top-logout button:hover { color: var(--red); background: rgba(239,68,68,.1); }

/* ── Auth pagina's (login / registreren) ────────────────────────────────── */
.auth-body { min-height: 100dvh; }
.auth-stage {
    position: relative; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px; overflow: hidden;
}
.auth-video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
}
.auth-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        radial-gradient(120% 90% at 80% 10%, rgba(124,92,252,.28), transparent 55%),
        linear-gradient(180deg, rgba(7,10,18,.72) 0%, rgba(7,10,18,.82) 60%, rgba(7,10,18,.94) 100%);
    backdrop-filter: saturate(1.1);
}
.auth-card {
    position: relative; z-index: 2; width: 100%; max-width: 420px;
    padding: 38px 34px 32px;
    background: rgba(15,20,33,.72);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(22px) saturate(1.2);
    animation: auth-in .5s var(--ease) both;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(14px) scale(.99); } }

.auth-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.auth-brand .brand-text { font-size: 1.1rem; }

.auth-head { margin-bottom: 24px; }
.auth-head h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 5px; }
.auth-head p { color: var(--muted); font-size: .92rem; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field label { font-size: .82rem; font-weight: 600; color: #c7cee0; }
.auth-optional { font-weight: 400; color: var(--faint); }

.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > .icon {
    position: absolute; left: 14px; width: 18px; height: 18px;
    color: var(--faint); pointer-events: none;
}
.auth-input input {
    width: 100%; height: 48px;
    padding: 0 14px 0 42px; font-size: 16px;
    color: var(--text); background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color .18s, box-shadow .18s;
}
.auth-input input::placeholder { color: var(--faint); }
.auth-input input:focus-visible {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.pw-toggle {
    position: absolute; right: 6px; display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 9px;
    color: var(--faint); background: transparent; border: none; cursor: pointer;
    transition: color .18s, background .18s;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-3); }
.pw-toggle .icon { width: 18px; height: 18px; }

.auth-helper { font-size: .76rem; color: var(--faint); margin-top: 1px; }

.auth-submit {
    width: 100%; height: 48px; justify-content: center;
    margin-top: 6px; font-size: .95rem;
}
.auth-submit .icon { width: 18px; height: 18px; }

.auth-forgot { margin-top: 4px; text-align: right; font-size: .82rem; }
.auth-forgot a { color: var(--muted); }
.auth-forgot a:hover { color: var(--accent-2); }
.auth-switch { margin-top: 22px; text-align: center; font-size: .88rem; color: var(--muted); }
.auth-switch a { color: var(--accent-2); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .auth-card { padding: 30px 22px 26px; }
}

/* ── Poster shared-element: grid thumbnail → detail hero morph ─────────── *
 * view-transition-name is set via JS (transitions.js), not here, so it     *
 * only activates for intentional forward/back navigations.                 */
::view-transition-group(active-poster) {
    animation-duration: 420ms;
    animation-timing-function: cubic-bezier(.22, .61, .36, 1);
}
/* Crossfade while the group morphs size + position */
::view-transition-old(active-poster) { animation: 200ms ease-in  both vt-fade-out; }
::view-transition-new(active-poster) { animation: 280ms ease-out both vt-fade-in;  }

/* ── Navigation progress bar ────────────────────────────────────────────── */
#nav-bar {
    position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
    height: 2px; width: 0; opacity: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), rgba(255,255,255,.5));
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 650ms cubic-bezier(.08, .82, .17, 1), opacity 200ms ease;
}
#nav-bar.run { width: 78%; opacity: 1; }

/* ── Seizoenen / afleveringen accordion ─────────────────────────────────── */
.season-card {
    background: var(--surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}

.season-header {
    width: 100%; display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; cursor: pointer; border: none; background: none;
    font-family: inherit; font-size: inherit; color: var(--text); text-align: left;
    transition: background .18s var(--ease);
}
.season-header:hover { background: var(--surface-2); }
.season-header:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-glow); }

.season-poster { width: 42px; height: 62px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.season-poster-ph {
    width: 42px; height: 62px; border-radius: 6px; flex-shrink: 0;
    display: grid; place-items: center; background: var(--surface-3); color: var(--faint);
}
.season-poster-ph .icon { width: 20px; height: 20px; }

.season-info { flex: 1; min-width: 0; }
.season-info strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.season-year { font-weight: 400; color: var(--muted); }
.season-meta { font-size: .78rem; color: var(--muted); margin-top: 4px; display: block; }

.season-progress { height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 7px; }
.season-bar {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width .4s var(--ease);
}

.season-chev {
    width: 18px; height: 18px; color: var(--faint); flex-shrink: 0;
    transition: transform .2s var(--ease);
}

.season-episodes { border-top: 1px solid var(--border-soft); }

.ep-actions {
    display: flex; gap: 8px; padding: 12px 18px;
    border-bottom: 1px solid var(--border-soft); flex-wrap: wrap;
}
.ep-act-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--muted); font-size: .8rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: background .15s, color .15s, border-color .15s;
}
.ep-act-btn .icon { width: 14px; height: 14px; }
.ep-act-btn:hover { background: rgba(34,197,94,.12); color: var(--green); border-color: rgba(34,197,94,.3); }
.ep-act-btn--clear:hover { background: rgba(239,68,68,.1); color: #f87171; border-color: rgba(239,68,68,.3); }

.ep-list { display: flex; flex-direction: column; }

.ep-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 18px; cursor: pointer;
    border-bottom: 1px solid var(--border-soft);
    transition: background .12s var(--ease);
    user-select: none;
}
.ep-row:last-child { border-bottom: none; }
.ep-row:hover { background: var(--surface-2); }

.ep-check {
    width: 17px !important; height: 17px; flex-shrink: 0; accent-color: var(--accent);
    cursor: pointer; background: none !important; border: none !important;
    padding: 0 !important; margin: 0;
}
.ep-num {
    font-size: .74rem; font-weight: 700; color: var(--faint); flex-shrink: 0;
    min-width: 72px; font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.ep-name {
    flex: 1; font-size: .88rem; font-weight: 500; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .15s;
}
.ep-meta { font-size: .75rem; color: var(--faint); flex-shrink: 0; text-align: right; }

.ep-watched .ep-name { color: var(--muted); }
.ep-watched .ep-num  { color: var(--green); }

.ep-loading, .ep-error {
    padding: 18px; color: var(--muted); font-size: .86rem; text-align: center;
}

/* ── Nav badge (pending friend requests) ───────────────────────────────── */
.nav-badge {
    margin-left: auto;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 99px; flex-shrink: 0;
    background: var(--accent); color: #fff;
    font-size: .68rem; font-weight: 700;
    display: grid; place-items: center;
    box-shadow: 0 0 8px var(--accent-glow);
    line-height: 1; font-variant-numeric: tabular-nums;
}
.nav-badge-mobile {
    position: absolute; top: 4px; right: 4px;
    min-width: 16px; height: 16px; margin: 0; font-size: .6rem;
}

/* ── Friends page ───────────────────────────────────────────────────────── */
.friends-section-head {
    display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
    font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 700;
}
.friends-section-head .icon { width: 16px; height: 16px; color: var(--accent-2); }

.friends-list { display: flex; flex-direction: column; gap: 10px; }

.friend-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 14px 18px;
    transition: border-color .2s var(--ease);
}
.friend-card:hover { border-color: var(--border); }

.friend-avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 42px; height: 42px; border-radius: 12px;
    font-weight: 700; font-size: 1rem; color: #fff;
    background: linear-gradient(135deg, var(--accent), #5B3FD9);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.friend-info { flex: 1; min-width: 0; }
.friend-info strong { display: block; font-size: .92rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-info span { font-size: .78rem; color: var(--muted); }

.friend-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.friend-actions form { display: inline; }

.friend-btn {
    display: inline-flex; align-items: center; gap: 6px; justify-content: center;
    padding: 7px 14px; border-radius: var(--radius-sm); border: none; cursor: pointer;
    font-family: inherit; font-size: .82rem; font-weight: 600;
    transition: transform .15s var(--ease), background .15s var(--ease);
    white-space: nowrap;
}
.friend-btn .icon { width: 15px; height: 15px; }
.friend-btn-primary {
    background: linear-gradient(135deg, var(--accent), #5B3FD9); color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.friend-btn-primary:hover { transform: translateY(-1px); }
.friend-btn-secondary {
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
}
.friend-btn-secondary:hover { background: var(--surface-3); }
.friend-btn-danger {
    background: rgba(239,68,68,.1); color: #f87171; border: 1px solid rgba(239,68,68,.3);
}
.friend-btn-danger:hover { background: rgba(239,68,68,.2); }

.add-friend-panel {
    background: linear-gradient(160deg, rgba(124,92,252,.08), var(--surface));
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    padding: 20px; margin-bottom: 30px; max-width: 580px;
}
.add-friend-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
    font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 700; }
.add-friend-head .icon { width: 16px; height: 16px; color: var(--accent-2); }
.add-friend-form { display: flex; gap: 10px; }
.add-friend-form input { flex: 1; }

.friends-section { margin-bottom: 32px; }

/* ── Friend collection (read-only view) ─────────────────────────────────── */
.friend-collection-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.friend-collection-avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 52px; height: 52px; border-radius: 14px;
    font-weight: 700; font-size: 1.2rem; color: #fff;
    background: linear-gradient(135deg, var(--accent), #5B3FD9);
    box-shadow: 0 6px 18px var(--accent-glow);
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .card:hover { transform: none; }
    .card:hover .poster-wrap img { transform: none; }
}

/* ── Admin panel ────────────────────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%; border-collapse: collapse; font-size: .9rem;
}
.admin-table th {
    text-align: left; padding: 10px 14px; font-size: .78rem; font-weight: 600;
    color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.admin-row--self td { background: rgba(124,92,252,.04); }
.admin-user-cell { display: flex; align-items: center; gap: 12px; }
.admin-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #5B3FD9);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .88rem; color: #fff;
}
.admin-name { font-weight: 600; font-size: .88rem; }
.admin-email { color: var(--muted); font-size: .8rem; margin-top: 1px; }
.admin-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .74rem; font-weight: 600; }
.badge-verified   { background: rgba(34,197,94,.12);  color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.badge-unverified { background: rgba(239,68,68,.10);  color: #f87171; border: 1px solid rgba(239,68,68,.22); }
.badge-admin      { background: rgba(124,92,252,.15); color: var(--accent-2); border: 1px solid rgba(124,92,252,.3); }
.admin-count { color: var(--muted); text-align: center; }
.admin-date  { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
    border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); font-size: .78rem; font-weight: 600; cursor: pointer;
    transition: background .15s, border-color .15s;
}
.admin-btn .icon { width: 13px; height: 13px; }
.admin-btn--verify { border-color: rgba(34,197,94,.3); color: #4ade80; }
.admin-btn--verify:hover { background: rgba(34,197,94,.12); }
.admin-btn--admin:hover { background: rgba(124,92,252,.12); }
.admin-btn--delete { border-color: rgba(239,68,68,.3); color: #f87171; }
.admin-btn--delete:hover { background: rgba(239,68,68,.12); }
