/* AftelQuiz: festive night theme, readable from the couch */
:root {
    --quiz-bg: #0b1530;
    --quiz-bg-2: #13224a;
    --quiz-surface: #172a57;
    --quiz-gold: #ffc533;
    --quiz-text: #f4f6ff;
    --quiz-muted: #9fb0d9;
    --quiz-a: #e5484d;
    --quiz-b: #3e8bff;
    --quiz-c: #f5a524;
    --quiz-d: #2fb67c;
    --quiz-radius: 18px;

    --bs-body-bg: var(--quiz-bg);
    --bs-body-color: var(--quiz-text);
    --bs-secondary-color: var(--quiz-muted);
    --bs-border-color: rgba(255, 255, 255, .12);
    --bs-card-bg: var(--quiz-surface);
    --bs-link-color-rgb: 255, 197, 51;
    --bs-link-hover-color-rgb: 255, 214, 110;
}

[data-bs-theme=dark] {
    --bs-body-bg: var(--quiz-bg);
    --bs-tertiary-bg: var(--quiz-bg-2);
    --bs-secondary-bg: var(--quiz-surface);
}

body {
    min-height: 100vh;
    min-height: var(--page-height, 100dvh); /* --page-height: set in the header when a phone is in "Desktop site" mode */
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(62, 139, 255, .18), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(255, 197, 51, .10), transparent 60%),
        var(--quiz-bg);
    background-attachment: fixed;
    color: var(--quiz-text);
    -webkit-tap-highlight-color: transparent;
}

.card, .list-group-item { background: var(--quiz-surface); border-color: rgba(255, 255, 255, .08); }
.card { border-radius: var(--quiz-radius); }
.card-accent { border: 1px solid rgba(255, 197, 51, .4); }
.btn-warning { --bs-btn-bg: var(--quiz-gold); --bs-btn-border-color: var(--quiz-gold); font-weight: 600; }

.app-navbar { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.brand-logo { display: block; height: auto; max-width: 100%; }
.brand-logo-nav { width: 132px; }
.app-icon { display: block; height: auto; max-width: 100%; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); } /* transparent artwork, so the shadow follows its shape */
.app-icon-player { width: 160px; margin: 0 auto; }
.app-icon-hero { width: min(260px, 60%); margin: 0 auto; }
.app-icon-tv { width: min(16vh, 12vw); }
.brand-year {
    font-weight: 800; color: var(--quiz-gold);
    background: rgba(255, 197, 51, .12); border-radius: 999px; padding: .1em .6em;
}

/* Cards with links */
.action-card, .category-card, .category-pick {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.1rem 1.25rem; border-radius: var(--quiz-radius);
    background: var(--quiz-surface); color: inherit; text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .15s ease, border-color .15s ease;
}
.action-card:hover, .category-card:hover { border-color: rgba(255, 197, 51, .5); color: inherit; transform: translateY(-2px); }
.action-icon, .category-icon { font-size: 2rem; line-height: 1; }
.fad { --fa-secondary-opacity: .45; }
.action-icon, .category-icon, .player-big-icon { color: var(--quiz-gold); }
.action-icon .fa-fw, .category-icon .fad { width: 1.25em; text-align: center; }
.category-pick { cursor: pointer; opacity: .55; }
.btn-check:checked + .category-pick { opacity: 1; border-color: var(--quiz-gold); box-shadow: 0 0 0 1px var(--quiz-gold) inset; }

.year-picker { display: flex; flex-wrap: wrap; gap: .5rem; }
.year-pill {
    padding: .45rem 1rem; border-radius: 999px; font-weight: 700; text-decoration: none;
    color: var(--quiz-text); background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .08);
}
.year-pill:hover { color: var(--quiz-text); border-color: rgba(255, 197, 51, .5); }
.year-pill.is-active { color: #1a1300; background: var(--quiz-gold); border-color: var(--quiz-gold); }
.btn-check:checked + .year-pill { color: #1a1300; background: var(--quiz-gold); border-color: var(--quiz-gold); }

/* Volwassenen / Kinderen switch on the new game page */
.audience-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; border-radius: 18px; background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .08); }
.audience-tab {
    display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: 14px;
    color: var(--quiz-muted); text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.audience-tab i { font-size: 1.6rem; color: var(--quiz-gold); }
.audience-tab span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.audience-tab strong { color: var(--quiz-text); }
.audience-tab small { font-size: .8rem; }
.audience-tab:hover { color: var(--quiz-text); }
.audience-tab.is-active { background: rgba(255, 197, 51, .14); box-shadow: 0 0 0 1px var(--quiz-gold) inset; }
@media (max-width: 400px) { .audience-tab small { display: none; } }

.game-code-display { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 2.5rem; letter-spacing: .15em; color: var(--quiz-gold); }

/* Answer tiles (shared by TV, phone and the homepage) */
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.option-tile {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem; border: 0; border-radius: 14px;
    color: #fff; font-weight: 700; text-align: left;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
    transition: transform .12s ease, opacity .2s ease, filter .2s ease;
}
.option-tile > span {
    flex: none; display: grid; place-items: center;
    width: 2em; height: 2em; border-radius: 50%;
    background: rgba(0, 0, 0, .2);
}
.option-a { background: var(--quiz-a); }
.option-b { background: var(--quiz-b); }
.option-c { background: var(--quiz-c); }
.option-d { background: var(--quiz-d); }
.option-letter { color: #fff; font-weight: 700; }
.option-tile.is-wrong, .option-tile.is-dimmed { opacity: .3; filter: grayscale(.6); }
/* Ring drawn inside the tile, so nothing is painted outside it (outlines left stale slivers on the TV when the view switched) */
.option-tile.is-correct { box-shadow: inset 0 0 0 4px #fff, 0 4px 0 rgba(0, 0, 0, .25); filter: brightness(1.08); }
.option-tile.is-picked { box-shadow: inset 0 0 0 4px #fff, 0 4px 0 rgba(0, 0, 0, .25); }
.option-count { margin-left: auto; font-size: 1.3em; }

.hero-card { background: var(--quiz-surface); border-radius: 24px; padding: 1.5rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.hero-question { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.25rem; }

/* ---------- TV ---------- */
.page-tv { overflow: hidden; background-attachment: scroll; } /* a fixed background causes repaint leftovers when views switch */
.page-tv .app-main { height: 100vh; height: 100dvh; }
.tv-screen { height: 100%; padding: 4vh 5vw; font-size: clamp(16px, 1.6vw, 34px); }
.tv-view { display: none; height: 100%; flex-direction: column; animation: tv-in .35s ease; }
.tv-view.is-active { display: flex; }
@keyframes tv-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.tv-brand { display: flex; align-items: center; gap: .6em; font-size: 1.4em; margin-bottom: 1em; }
.tv-title { font-size: 2.6em; font-weight: 800; margin-bottom: .6em; }
.tv-subtitle { font-size: 1.6em; font-weight: 700; }
.tv-lobby { display: grid; grid-template-columns: auto 1fr; gap: 6vw; height: 100%; align-items: center; }
.tv-qr { background: #fff; border-radius: 20px; padding: .5em; width: min(38vh, 30vw); }
.tv-qr svg { display: block; width: 100%; height: auto; }
.tv-join-hint { margin-top: 1em; color: var(--quiz-muted); }
.tv-join-hint .year-picker { display: flex; flex-wrap: wrap; gap: .5rem; }
.year-pill {
    padding: .45rem 1rem; border-radius: 999px; font-weight: 700; text-decoration: none;
    color: var(--quiz-text); background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .08);
}
.year-pill:hover { color: var(--quiz-text); border-color: rgba(255, 197, 51, .5); }
.year-pill.is-active { color: #1a1300; background: var(--quiz-gold); border-color: var(--quiz-gold); }

.game-code-display { font-size: 1.6em; }
.tv-player-cloud { display: flex; flex-wrap: wrap; gap: .5em; margin: 1em 0; }
.player-chip { background: var(--quiz-surface); padding: .35em .8em; border-radius: 999px; font-weight: 600; animation: tv-in .3s ease; }
.tv-waiting { color: var(--quiz-muted); }

.tv-sound-toggle {
    position: fixed; bottom: 2vh; left: 2vw; z-index: 10; /* bottom left: free on every TV view */
    display: flex; align-items: center; gap: .5em;
    border: 0; border-radius: 999px; padding: .4em .7em;
    background: rgba(255, 255, 255, .08); color: var(--quiz-muted); font-size: .8em; font-weight: 600;
    cursor: pointer; opacity: .55; transition: opacity .2s ease;
}
.tv-sound-toggle:hover, .tv-sound-toggle:focus-visible { opacity: 1; }
.tv-sound-hint { display: none; }
/* The iPhone app's AirPlay screen can't be clicked, so no sound button there */
.is-app-tv .tv-sound-toggle { display: none !important; }
/* The TV link on the host page: wraps instead of being cut off */
.tv-url-field { display: flex; align-items: center; font-size: .95em; line-height: 1.35; }
.tv-question-header { display: flex; justify-content: space-between; color: var(--quiz-muted); font-weight: 600; }
.tv-timer-row { display: flex; align-items: center; gap: .8em; margin: 1em 0 1.5em; }
.tv-timer { flex: 1; height: 10px; background: rgba(255, 255, 255, .1); border-radius: 5px; overflow: hidden; }
.tv-timer-bar { height: 100%; width: 100%; background: var(--quiz-gold); transition: width .1s linear, background-color .3s ease; }
.tv-timer-row.is-ending .tv-timer-bar { background: var(--quiz-a); }
.tv-question-text { font-size: 2.4em; font-weight: 800; line-height: 1.2; margin-bottom: auto; padding-bottom: 1em; }
.tv-options { gap: 1.2vw; }
.tv-options .option-tile { font-size: 1.4em; padding: 1em 1.2em; min-height: 13vh; }
.tv-estimate { display: flex; align-items: center; gap: 1em; font-size: 1.5em; background: var(--quiz-surface); padding: 1em 1.4em; border-radius: var(--quiz-radius); }
.tv-estimate-icon { font-size: 2em; }
.tv-footer { display: flex; justify-content: flex-end; margin-top: 1em; color: var(--quiz-muted); font-weight: 600; }
.tv-seconds { min-width: 1.6em; text-align: right; font-size: 1.6em; line-height: 1; color: var(--quiz-gold); font-weight: 800; font-variant-numeric: tabular-nums; transition: color .3s ease; }
.tv-timer-row.is-ending .tv-seconds { color: var(--quiz-a); }
.tv-explanation { margin-top: 1.2em; font-size: 1.2em; color: var(--quiz-muted); }
.tv-correct-number { font-size: 3.5em; font-weight: 800; color: var(--quiz-gold); margin-bottom: .3em; }

.tv-ranking { list-style: none; padding: 0; margin: 0; counter-reset: rank; max-width: 1100px; width: 100%; }
.tv-ranking li {
    counter-increment: rank;
    display: grid; grid-template-columns: 2.2em 1fr auto; gap: .8em; align-items: center;
    padding: .55em 1em; margin-bottom: .4em; border-radius: 14px;
    background: var(--quiz-surface); font-size: 1.4em; font-weight: 600;
    animation: tv-in .4s ease both;
}
.tv-ranking li::before { content: counter(rank); color: var(--quiz-muted); font-weight: 800; }
.tv-ranking li.is-top-1 { background: linear-gradient(90deg, rgba(255, 197, 51, .35), var(--quiz-surface)); }
.tv-ranking li.is-top-1::before { content: '🥇'; }
.tv-ranking li.is-top-2::before { content: '🥈'; }
.tv-ranking li.is-top-3::before { content: '🥉'; }
.tv-reveal-timer { height: 6px; margin-top: auto; background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden; }
.tv-reveal-timer span { display: block; height: 100%; width: 100%; background: rgba(255, 197, 51, .6); }

/* Tussenstand: explicit rank cell, points of the last question and sliding rows */
/* Live tussenstand: every row on its own absolute spot (--y), so rows can glide past each other */
.tv-ranking-live { position: relative; }
.tv-ranking-live li {
    grid-template-columns: 2.2em 1fr auto 5em;
    position: absolute; top: 0; left: 0; right: 0; margin: 0;
    animation: none; opacity: 0;
    transform: translateY(var(--y, 0)) scale(var(--lift, 1));
    will-change: transform;
}
.tv-ranking-live.is-ready li {
    opacity: 1;
    transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .4s ease, box-shadow .3s ease, background-color .3s ease;
}
.tv-ranking-live.is-moving li { transition: transform 1.3s cubic-bezier(.6, 0, .25, 1), opacity .9s ease, box-shadow .3s ease, background-color .3s ease; }
.tv-ranking-live li.is-out { opacity: 0; }
.tv-ranking-live li::before { content: none; display: none; }
.tv-ranking-live li.is-top-1::before, .tv-ranking-live li.is-top-2::before, .tv-ranking-live li.is-top-3::before { content: none; }
.tv-rank { color: var(--quiz-muted); font-weight: 800; text-align: center; }
.tv-rank-name { display: flex; align-items: center; gap: .4em; min-width: 0; }
.tv-rank-move { font-style: normal; font-size: .7em; font-weight: 800; display: inline-flex; align-items: center; gap: .1em; }
.tv-rank-move:empty { display: none; }
.tv-rank-move.is-up { color: var(--quiz-d); }
.tv-rank-move.is-down { color: var(--quiz-a); }
.tv-rank-points {
    font-weight: 800; color: var(--quiz-gold); font-size: .85em;
    opacity: 0; transform: scale(.4); transition: opacity .25s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.tv-rank-points.is-zero { color: var(--quiz-muted); }
.tv-ranking-live li.show-points .tv-rank-points { opacity: 1; transform: none; }
.tv-rank-score { text-align: right; font-variant-numeric: tabular-nums; }
.tv-ranking-live li.is-rising { --lift: 1.05; background-color: var(--quiz-surface); box-shadow: 0 0 0 3px rgba(47, 182, 124, .85), 0 18px 40px rgba(0, 0, 0, .55); }
.tv-ranking-live li.is-falling { z-index: 1; filter: brightness(.85); }
.tv-ranking-compact li { grid-template-columns: 2.2em 1fr auto auto; font-size: 1.15em; }
.tv-ranking li:nth-child(2) { animation-delay: .05s; }
.tv-ranking li:nth-child(3) { animation-delay: .1s; }
.tv-ranking li:nth-child(4) { animation-delay: .15s; }
.tv-ranking li:nth-child(5) { animation-delay: .2s; }

/* ---------- Player phone ---------- */
.quiz-timer { display: flex; align-items: center; gap: .6rem; }
.quiz-timer[hidden] { display: none; }
.quiz-timer-track { flex: 1; height: 8px; background: rgba(255, 255, 255, .1); border-radius: 4px; overflow: hidden; }
.quiz-timer-bar { height: 100%; width: 100%; background: var(--quiz-gold); border-radius: 4px; transition: width .1s linear, background-color .3s ease; }
.quiz-timer-seconds { min-width: 1.6em; text-align: right; font-weight: 800; font-size: 1.1rem; color: var(--quiz-gold); font-variant-numeric: tabular-nums; transition: color .3s ease; }
.quiz-timer.is-ending .quiz-timer-bar { background: var(--quiz-a); }
.quiz-timer.is-ending .quiz-timer-seconds { color: var(--quiz-a); }
.player-wrap .quiz-timer { margin-bottom: 1rem; }
.player-wrap { max-width: 480px; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); min-height: var(--page-height, 100dvh); display: flex; flex-direction: column; }
.player-brand { margin-bottom: 1.5rem; text-align: center; }
/* "Speel liever in de app" on the join page, in the phone's browser once the app is in the stores */
.app-hint {
    display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; border-radius: 14px; text-decoration: none;
    color: var(--quiz-text); background: rgba(255, 197, 51, .1); border: 1px solid rgba(255, 197, 51, .35);
}
.app-hint:hover { color: var(--quiz-text); border-color: var(--quiz-gold); }
.app-hint > i:first-child { font-size: 1.7rem; color: var(--quiz-gold); width: 1.7rem; text-align: center; }
.app-hint span { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.app-hint small { color: var(--quiz-muted); font-size: .82rem; }
.app-hint > i:last-child { color: var(--quiz-muted); }
.player-header { display: flex; align-items: center; gap: .5rem; padding: .5rem 0 1rem; font-size: 1.1rem; }
.player-view { display: none; flex: 1; flex-direction: column; justify-content: center; text-align: center; }
.player-view.is-active { display: flex; }
.player-big-icon { font-size: 4.5rem; margin-bottom: .5rem; }
.player-big-icon.is-gold { color: var(--quiz-gold); }
.player-big-icon.is-silver { color: #c9d3e6; }
.player-big-icon.is-bronze { color: #d4894a; }
.player-big-icon.is-other { color: var(--quiz-b); }
.player-question-year { align-self: center; margin-bottom: .75rem; }
.player-question-year:empty { display: none; }
.player-question-text { font-size: 1.15rem; font-weight: 600; margin-bottom: 1.25rem; }
.player-options { grid-template-columns: 1fr; flex: 1; max-height: 60vh; }
.player-options .option-tile { font-size: 1.1rem; min-height: 64px; touch-action: manipulation; user-select: none; }
.player-options .option-tile:active { transform: scale(.97); }
.player-estimate input { font-size: 2rem; font-weight: 700; }
.player-error { margin-top: 1rem; }
/* The right answer on the player's phone after a question */
.player-correct { margin-top: .5rem; text-align: left; }
.player-correct-label { color: var(--quiz-muted); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; text-align: center; }
.player-correct .option-tile { min-height: 60px; font-size: 1.1rem; }
.player-explanation { margin: 1rem 0 0; color: var(--quiz-muted); font-size: .95rem; }

/* Tussenstand on the player's phone */
.player-ranking { list-style: none; padding: 0; margin: 1.25rem 0 0; text-align: left; display: grid; gap: .35rem; }
.player-ranking-row {
    display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 12px;
    background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .06);
}
.player-ranking-row.is-me { border-color: var(--quiz-gold); background: rgba(255, 197, 51, .12); }
.player-ranking-rank { min-width: 1.6rem; font-weight: 800; color: var(--quiz-gold); font-variant-numeric: tabular-nums; }
.player-ranking-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.player-ranking-plus { color: var(--quiz-d, #2fb67c); font-size: .85rem; font-weight: 700; }
.player-ranking-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.player-ranking-gap { text-align: center; color: var(--quiz-muted); line-height: 1; }
input, textarea, select { font-size: 16px; } /* prevents iOS zoom on focus */

/* Avatar picker on the join screen */
.avatar-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: .4rem; }
.avatar-option {
    display: grid; place-items: center; aspect-ratio: 1; font-size: 1.6rem; line-height: 1;
    border-radius: 12px; background: var(--quiz-surface); border: 2px solid transparent;
    cursor: pointer; user-select: none; touch-action: manipulation;
    transition: transform .12s ease, border-color .12s ease;
}
.avatar-option.is-taken { opacity: .4; }
.avatar-option:active { transform: scale(.92); }
.btn-check:checked + .avatar-option { border-color: var(--quiz-gold); background: rgba(255, 197, 51, .15); opacity: 1; transform: scale(1.08); }
.btn-check:focus-visible + .avatar-option { box-shadow: 0 0 0 3px rgba(255, 197, 51, .4); }
@media (max-width: 359.98px) { .avatar-picker { grid-template-columns: repeat(4, 1fr); } }

/* The host's own answers on the control screen */
.host-play { margin-bottom: 1rem; border: 1px solid rgba(255, 197, 51, .35); border-radius: 14px; overflow: hidden; }
.host-play-header { display: flex; justify-content: space-between; padding: .5rem .85rem; background: rgba(255, 197, 51, .1); color: var(--quiz-gold); font-weight: 700; font-size: .9rem; }
.host-play-body { padding: .75rem; }
.host-play-options { grid-template-columns: 1fr; gap: .5rem; }
.host-play-options .option-tile { min-height: 52px; touch-action: manipulation; }
.host-play-status { text-align: center; font-weight: 600; }
.host-play-status:empty { display: none; }

/* Start confirmation on the host phone */
.start-confirm { background: var(--quiz-surface); border: 1px solid rgba(255, 197, 51, .35); border-radius: 24px; }
.start-confirm-icon { font-size: 2.5rem; color: var(--quiz-gold); margin-bottom: .75rem; }
.start-confirm-count { font-size: 4rem; font-weight: 800; line-height: 1; color: var(--quiz-gold); margin-top: .5rem; }
.start-confirm-names { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; max-height: 30vh; overflow-y: auto; }
.start-confirm-names .player-chip { background: rgba(255, 255, 255, .08); font-size: .9rem; }

/* ---------- Inside the iOS / Android app ---------- */
/* The app's webview runs edge to edge, so keep content clear of the status bar, notch and home indicator */
.in-app .app-navbar { padding-top: calc(.5rem + env(safe-area-inset-top)); }
.in-app .site-footer { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
.app-start {
    min-height: 100vh; min-height: var(--page-height, 100dvh); max-width: 420px; margin: 0 auto;
    display: flex; flex-direction: column; justify-content: center; text-align: center;
    padding: calc(2rem + env(safe-area-inset-top)) 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
}
.app-start-icon { width: 160px; margin: 0 auto 1.75rem; }
.app-start-title { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-bottom: .75rem; text-wrap: balance; }
.app-start-lead { color: var(--quiz-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.app-start-actions { display: grid; gap: .6rem; }
.app-start-links { margin: 2rem 0 0; font-size: .85rem; color: var(--quiz-muted); }
.app-start-links a { color: var(--quiz-muted); }

/* ---------- Admin ---------- */
.admin-nav { --bs-nav-pills-link-active-bg: var(--quiz-gold); --bs-nav-pills-link-active-color: #1a1300; --bs-nav-link-color: var(--quiz-muted); --bs-nav-link-hover-color: var(--quiz-text); gap: .25rem; }
.admin-stat { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.admin-table { --bs-table-bg: transparent; --bs-table-color: var(--quiz-text); font-size: .95rem; }
.admin-table th { color: var(--quiz-muted); font-weight: 600; white-space: nowrap; }
.admin-debug { background: #050a1a; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; padding: 1rem; font-size: .8rem; max-height: 50vh; overflow: auto; white-space: pre-wrap; }
button.action-card { font: inherit; }

/* ---------- Site footer ---------- */
.site-footer { border-top: 1px solid rgba(255, 255, 255, .06); padding: 2.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); margin-top: 2rem; }
.site-footer a { color: var(--quiz-muted); text-decoration: none; }
.site-footer a:hover { color: var(--quiz-text); }
.site-footer-links { display: flex; flex-direction: column; gap: .4rem; }
.site-footer-projects { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .8rem; color: var(--quiz-muted); }
.site-footer-projects span { opacity: .7; }
.site-footer-copy { margin: .75rem 0 0; text-align: center; font-size: .8rem; color: var(--quiz-muted); opacity: .7; }

/* ---------- Legal and info pages ---------- */
.legal-page { max-width: 760px; padding-top: 2.5rem; padding-bottom: 2rem; }
.legal-page h1 { font-weight: 800; margin-bottom: .25rem; }
.legal-page h2 { font-size: 1.3rem; font-weight: 800; margin: 2.25rem 0 .75rem; }
.legal-page h3 { font-size: 1.05rem; font-weight: 700; margin: 1.25rem 0 .5rem; color: var(--quiz-gold); }
.legal-page p, .legal-page li { color: #d6ddf2; }
.legal-page li { margin-bottom: .3rem; }
.legal-updated { color: var(--quiz-muted); font-size: .9rem; margin-bottom: 1.75rem; }
.legal-summary { background: var(--quiz-surface); border: 1px solid rgba(255, 197, 51, .35); border-radius: var(--quiz-radius); padding: 1.25rem 1.5rem .75rem; }
.legal-summary h2 { margin-top: 0; color: var(--quiz-gold); }
.legal-table { --bs-table-bg: transparent; --bs-table-color: #d6ddf2; font-size: .95rem; }
.legal-table th { color: var(--quiz-text); }
.legal-page code { color: var(--quiz-gold); }
.card-danger { border: 1px solid rgba(229, 72, 77, .45); }

/* ---------- Store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.store-badge {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .45rem 1rem .45rem .85rem; border-radius: 12px;
    background: #000; color: #fff; text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .25); line-height: 1.1;
}
.store-badge:hover { color: #fff; border-color: rgba(255, 255, 255, .6); }
.store-badge i { font-size: 1.6rem; width: 1.6rem; text-align: center; }
.store-badge span { display: flex; flex-direction: column; font-weight: 700; font-size: 1.05rem; text-align: left; }
.store-badge small { font-weight: 400; font-size: .68rem; opacity: .8; }

/* ---------- Landing page ---------- */
.page-landing .app-main { overflow-x: clip; }
.landing-hero { padding: 3.5rem 0 4rem; }
.landing-eyebrow {
    display: inline-block; margin-bottom: 1.25rem; padding: .35rem .9rem; border-radius: 999px;
    background: rgba(255, 197, 51, .12); color: var(--quiz-gold); font-weight: 700; font-size: .9rem;
}
.landing-title { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 1rem; text-wrap: balance; }
.landing-lead { font-size: 1.25rem; color: var(--quiz-muted); max-width: 32rem; margin-bottom: 1.75rem; text-wrap: balance; }
.landing-hero .landing-lead { margin-inline: auto; }
@media (min-width: 992px) { .landing-hero .landing-lead { margin-inline: 0; } }
.landing-price-note { margin: 1rem 0 0; color: var(--quiz-muted); font-size: .95rem; }

/* TV + phone mockup, built in CSS so it always shows the current look */
.device-stage { position: relative; padding: 0 0 3rem; max-width: 560px; margin: 0 auto; }
.device-tv { position: relative; width: 84%; }
.device-tv-screen {
    background: linear-gradient(160deg, var(--quiz-bg-2), var(--quiz-bg));
    border: 10px solid #05091a; border-radius: 18px; padding: 1.1rem 1.2rem 1.3rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
    font-size: .8rem;
}
.device-tv-foot { width: 30%; height: 14px; margin: 0 auto; background: #05091a; border-radius: 0 0 10px 10px; }
.device-tv-top { display: flex; justify-content: space-between; color: var(--quiz-muted); font-weight: 600; }
.device-tv-timer { height: 5px; background: rgba(255, 255, 255, .1); border-radius: 3px; margin: .6rem 0 .9rem; overflow: hidden; }
.device-tv-timer span { display: block; height: 100%; width: 40%; background: var(--quiz-gold); animation: device-timer 12s linear infinite; }
@keyframes device-timer { from { width: 100%; } to { width: 0; } }
.device-tv-question { font-size: 1.15rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.device-tv-options { gap: .5rem; }
.device-tv-options .option-tile { padding: .55rem .6rem; font-size: .85rem; gap: .5rem; border-radius: 10px; }
.device-tv-options .option-tile > span { width: 1.7em; height: 1.7em; }
.device-phone {
    position: absolute; right: 0; bottom: 0; width: 27%;
    background: #05091a; border-radius: 26px; padding: 7px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1);
    transform: rotate(6deg);
    animation: device-float 6s ease-in-out infinite;
}
@keyframes device-float { 50% { transform: rotate(6deg) translateY(-8px); } }
.device-phone-screen { background: var(--quiz-bg); border-radius: 20px; padding: .7rem .55rem; aspect-ratio: 9 / 17; display: flex; flex-direction: column; }
.device-phone-name { display: flex; align-items: center; gap: .3rem; font-size: .65rem; font-weight: 700; margin-bottom: .6rem; }
.device-phone-name b { margin-left: auto; color: var(--quiz-gold); }
.device-phone-buttons { flex: 1; display: grid; gap: .35rem; }
.device-phone-buttons .option-tile { padding: 0; justify-content: center; border-radius: 9px; }
.device-phone-buttons .option-tile > span { background: transparent; font-size: 1.1rem; }
.device-phone-buttons .option-tile.is-picked { box-shadow: inset 0 0 0 3px #fff; }

.landing-stats { padding: 1.75rem 0; border-block: 1px solid rgba(255, 255, 255, .06); background: rgba(255, 255, 255, .02); }
.landing-stats strong { display: block; font-size: 2.2rem; font-weight: 800; color: var(--quiz-gold); line-height: 1.1; }
.landing-stats span { color: var(--quiz-muted); font-size: .95rem; }

.landing-section { padding: 4.5rem 0; }
.landing-section-alt { background: rgba(255, 255, 255, .025); }
.landing-heading { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; text-align: center; margin-bottom: 2.5rem; letter-spacing: -.01em; }

.landing-step { position: relative; height: 100%; text-align: center; padding: 2rem 1.5rem 1.75rem; border-radius: var(--quiz-radius); background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .06); }
.landing-step > i { font-size: 3rem; color: var(--quiz-gold); margin-bottom: 1rem; }
.landing-step h3 { font-size: 1.25rem; font-weight: 800; }
.landing-step p { color: var(--quiz-muted); margin: 0; }
.landing-step-number {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--quiz-gold); color: #1a1300; font-weight: 800;
}

.landing-video { margin-top: 3rem; text-align: center; }
.landing-video-player {
    display: block; width: 100%; max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 9;
    border-radius: var(--quiz-radius); background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
/* Portrait version: as wide as fits, but never taller than the screen */
.landing-video-player.is-portrait { aspect-ratio: 9 / 16; width: auto; height: min(80vh, 80svh); max-width: 100%; }

.landing-demo-label { color: var(--quiz-muted); font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.js-demo .option-tile { cursor: pointer; }
.js-demo .option-tile:hover:not(:disabled) { transform: translateY(-2px); }
.js-demo .option-tile:disabled { cursor: default; }
.landing-demo-result { margin-top: 1.25rem; padding: .9rem 1.1rem; border-radius: 12px; background: rgba(255, 255, 255, .06); animation: tv-in .3s ease; }

.landing-feature { display: flex; gap: 1rem; height: 100%; padding: 1.4rem; border-radius: var(--quiz-radius); background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .06); }
.landing-feature > i { flex: none; font-size: 1.9rem; width: 2.4rem; text-align: center; color: var(--quiz-gold); }
.landing-feature h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .25rem; }
.landing-feature p { color: var(--quiz-muted); margin: 0; }
a.landing-feature { color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
a.landing-feature:hover { border-color: rgba(255, 197, 51, .5); transform: translateY(-2px); }

.landing-categories { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 2.5rem; }
.landing-categories span { padding: .45rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .06); font-weight: 600; font-size: .95rem; }
.landing-categories i { color: var(--quiz-gold); }

.landing-price { text-align: center; padding: 2.5rem 2rem; border-radius: 24px; background: var(--quiz-surface); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.landing-price-icon { font-size: 2.8rem; color: var(--quiz-gold); margin-bottom: .75rem; }
.landing-price-amount { font-size: 3.5rem; font-weight: 800; line-height: 1; }
.landing-price-sub { color: var(--quiz-muted); margin: .4rem 0 1.5rem; }
/* Kinderquiz page */
.kids-steps { counter-reset: kids-step; list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .75rem; }
.kids-steps li {
    counter-increment: kids-step; position: relative; padding: 1rem 1.1rem 1rem 3.6rem;
    border-radius: var(--quiz-radius); background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .06); color: #d6ddf2;
}
.kids-steps li::before {
    content: counter(kids-step); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%;
    background: var(--quiz-gold); color: #1a1300; font-weight: 800;
}
.kids-steps strong { color: var(--quiz-text); }
.kids-years { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.kids-year { min-width: 7rem; padding: .8rem 1rem; border-radius: 16px; background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .06); }
.kids-year strong { display: block; font-size: 1.4rem; font-weight: 800; color: var(--quiz-gold); line-height: 1.1; }
.kids-year span { color: var(--quiz-muted); font-size: .9rem; }
.landing-faq .accordion-body a { color: var(--quiz-gold); }

.landing-checklist { list-style: none; padding: 0; margin: 0 auto 1.75rem; display: inline-block; text-align: left; }
.landing-checklist li { padding: .3rem 0; font-weight: 600; }
.landing-checklist i { color: var(--quiz-gold); width: 1.5rem; }

.landing-apps { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; padding: 2.25rem; border-radius: 24px; background: linear-gradient(135deg, rgba(62, 139, 255, .16), rgba(255, 197, 51, .1)); border: 1px solid rgba(255, 255, 255, .08); }
@media (min-width: 768px) { .landing-apps { flex-direction: row; } }
.landing-apps-icon { width: 120px; flex: none; }
.landing-apps .store-badges { margin-top: 0; }

.landing-faq { --bs-accordion-bg: var(--quiz-surface); --bs-accordion-border-color: rgba(255, 255, 255, .06); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(255, 197, 51, .3); --bs-accordion-active-bg: var(--quiz-surface); --bs-accordion-active-color: var(--quiz-gold); --bs-accordion-border-radius: var(--quiz-radius); --bs-accordion-inner-border-radius: var(--quiz-radius); }
.landing-faq .accordion-button { font-weight: 700; }

/* ---------- Sample questions (/quizvragen-2026) ---------- */
.sample-questions { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.sample-question { padding: 1.4rem; border-radius: var(--quiz-radius); background: var(--quiz-surface); border: 1px solid rgba(255, 255, 255, .06); }
.sample-question-head { display: flex; gap: 1rem; align-items: flex-start; }
.sample-question-number { flex: none; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; background: var(--quiz-gold); color: #0b1530; font-weight: 800; }
.sample-question-text { font-size: 1.15rem; font-weight: 700; line-height: 1.35; margin: .3rem 0 0; }
.sample-question-options { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 576px) { .sample-question-options { grid-template-columns: 1fr 1fr; } }
.sample-question-options li { display: flex; gap: .6rem; align-items: center; padding: .55rem .8rem; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.sample-question-options li span { flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, .1); font-weight: 700; font-size: .85rem; }
.sample-question-hint { color: var(--quiz-muted); margin: .75rem 0 0; }
.sample-question-answer { margin-top: 1rem; }
.sample-question-answer summary { cursor: pointer; color: var(--quiz-gold); font-weight: 700; width: fit-content; }
.sample-question-answer[open] summary { margin-bottom: .6rem; }
.sample-question-answer p { color: var(--quiz-muted); }
.sample-question-correct { color: var(--bs-body-color) !important; font-weight: 700; margin-bottom: .35rem; }
.sample-question-correct i { color: #3ecf8e; }
.landing-faq .accordion-body { color: var(--quiz-muted); }

.landing-final-icon { font-size: 3.5rem; color: var(--quiz-gold); margin-bottom: 1rem; }

@media (max-width: 575.98px) {
    .landing-hero { padding-top: 2rem; }
    .device-tv-question { font-size: 1rem; }
    .device-tv-options .option-tile { font-size: .72rem; }
    .device-tv { width: 88%; }
    .device-phone { width: 28%; }
    .landing-section { padding: 3.25rem 0; }
}

@media (max-width: 767.98px) {
    .tv-lobby { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
