/* ═══════════════════════════════════════════════
   QuizUp! · Light & Dark Theme
   ═══════════════════════════════════════════════ */

:root {
    --gold: #c9a84c;
    --gold-light: #e0c86e;
    --blue: #4a90d9;
    --orange: #d97b4a;
    --purple: #7b4ad9;
    --green: #4caf50;
    --red: #e74c3c;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ─── Dark theme (default) ────────────────────── */
:root, [data-theme="dark"] {
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --bg-card-hover: #1b2a4a;
    --cream: #e0d5c1;
    --cream-dim: #a89e8c;
    --white: #ffffff;
    --text-primary: #e0d5c1;
    --text-heading: #ffffff;
    --border-subtle: rgba(201, 168, 76, 0.2);
    --border-medium: rgba(201, 168, 76, 0.3);
    --bg-input: rgba(255, 255, 255, 0.05);
    --bg-overlay: rgba(0, 0, 0, 0.15);
    --bg-hover: rgba(201, 168, 76, 0.1);
    --bg-answer: rgba(255, 255, 255, 0.04);
    --bg-answer-border: rgba(255, 255, 255, 0.1);
    --shadow-glow: rgba(201, 168, 76, 0.15);
    --qr-bg: #e0d5c1;
    --bar-bg: rgba(255, 255, 255, 0.08);
}

/* ─── Custom modal (alert / confirm) ──────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
    justify-content: center; align-items: center;
    animation: modalFadeIn 0.18s ease-out;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--bg-card, #16213e); border: 1px solid var(--border-medium, rgba(201,168,76,0.3));
    border-radius: 16px; padding: 28px 28px 22px; max-width: 420px; width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35); animation: modalSlideUp 0.2s ease-out;
    text-align: center;
}
.modal-icon { font-size: 2rem; margin-bottom: 8px; }
.modal-icon.warn { color: #e0a800; }
.modal-icon.error { color: #e74c3c; }
.modal-icon.info { color: var(--gold, #c9a84c); }
.modal-msg {
    color: var(--cream, #e0d5c1); font-size: 0.95rem; line-height: 1.6;
    margin-bottom: 22px; white-space: pre-line; word-break: break-word;
}
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-btn {
    padding: 10px 28px; border-radius: 10px; font-size: 0.9rem; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s;
}
.modal-btn-primary {
    background: var(--gold, #c9a84c); color: var(--bg-dark, #1a1a2e);
}
.modal-btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.modal-btn-cancel {
    background: transparent; color: var(--cream-dim, #999); border: 1px solid var(--border-subtle, rgba(201,168,76,0.2));
}
.modal-btn-cancel:hover { background: var(--bg-hover, rgba(201,168,76,0.08)); }
.modal-btn-danger {
    background: #e74c3c; color: #fff;
}
.modal-btn-danger:hover { filter: brightness(1.12); transform: translateY(-1px); }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Fullscreen loader overlay ───────────────── */
.loader-overlay {
    display: none; position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
    justify-content: center; align-items: center; flex-direction: column; gap: 18px;
}
.loader-overlay.active { display: flex; }
.loader-spinner {
    width: 48px; height: 48px; border: 4px solid rgba(201,168,76,0.2);
    border-top-color: var(--gold, #c9a84c); border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
}
.loader-text { color: var(--cream, #e0d5c1); font-size: 0.95rem; font-family: var(--font-sans); }
@keyframes loader-spin { to { transform: rotate(360deg); } }

/* ─── Typography: prevent orphan words ────────── */
h1, h2, h3, h4, h5, h6, .lp-hero-sub, .lp-step-title, .lp-cta h2 {
    text-wrap: balance;
}
p, li, td, .lp-step-desc, .lp-feat-desc {
    text-wrap: pretty;
}

/* ─── Light theme ─────────────────────────────── */
[data-theme="light"] {
    --bg-dark: #f4f1ec;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f7f3;
    --cream: #3a3226;
    --cream-dim: #7a7062;
    --white: #1a1a2e;
    --text-primary: #3a3226;
    --text-heading: #1a1a2e;
    --border-subtle: rgba(201, 168, 76, 0.25);
    --border-medium: rgba(201, 168, 76, 0.4);
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-overlay: rgba(0, 0, 0, 0.04);
    --bg-hover: rgba(201, 168, 76, 0.08);
    --bg-answer: rgba(0, 0, 0, 0.03);
    --bg-answer-border: rgba(0, 0, 0, 0.12);
    --shadow-glow: rgba(201, 168, 76, 0.2);
    --qr-bg: #ffffff;
    --bar-bg: rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--cream);
    min-height: 100vh;
}

/* ─── Scherm toggle ───────────────────────────── */
.screen, .presenter-view { display: none; }
.screen.active, .presenter-view.active { display: flex; }

/* ═══════════════════════════════════════════════
   DEELNEMERSPAGINA (telefoon)
   ═══════════════════════════════════════════════ */

.participant-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 16px;
}

.participant-page .screen {
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius);
    padding: 32px 24px;
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.logo {
    font-size: 48px;
    color: var(--gold);
    margin-bottom: 12px;
}

h1 {
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--cream-dim);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Formulier */
#join-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

input[type="text"] {
    padding: 14px 16px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--cream);
    font-size: 1.1rem;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--gold);
}

input[type="text"]::placeholder {
    color: var(--cream-dim);
}

/* Knoppen */
.btn {
    padding: 12px 24px;
    border: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--gold);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--gold);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--gold-light);
}

.btn-gold {
    background: var(--gold);
    color: var(--bg-dark);
}

.btn-gold:hover {
    background: var(--gold-light);
}

.btn-outline {
    background: transparent;
    border-color: var(--cream-dim);
    color: var(--cream-dim);
}

.btn-outline:hover {
    border-color: var(--cream);
    color: var(--cream);
}

.btn-active {
    background: rgba(76, 175, 80, 0.2);
    border-color: var(--green);
    color: var(--green);
}

.btn-active:hover {
    background: rgba(76, 175, 80, 0.3);
}

.btn-danger {
    border-color: var(--red);
    color: var(--red);
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.15);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.error-msg {
    color: var(--red);
    font-size: 0.9rem;
    margin-top: 8px;
}

.status-msg {
    color: var(--gold);
    font-size: 0.9rem;
    margin-top: 12px;
}

/* Wachtscherm */
.pulse-icon {
    font-size: 40px;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 20px auto 0;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Vraagkaart */
.question-card {
    text-align: left;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.part-label {
    font-size: 0.8rem;
    color: var(--cream-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.q-number {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
}

.question-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: var(--white);
}

/* Antwoordknoppen (telefoon) */
.answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-answer);
    border: 2px solid var(--bg-answer-border);
    border-radius: var(--radius-sm);
    color: var(--cream);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
}

.answer-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-medium);
}

.answer-btn .letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-subtle);
    color: var(--gold);
    font-weight: 700;
    flex-shrink: 0;
}

.answer-btn .answer-text {
    flex: 1;
    line-height: 1.3;
}

.answer-btn.selected {
    background: var(--border-subtle);
    border-color: var(--gold);
}

.answer-btn.selected .letter {
    background: var(--gold);
    color: var(--bg-dark);
}

.answer-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

/* Antwoord bevestiging */
.check-icon {
    font-size: 48px;
    color: var(--gold);
    margin-bottom: 12px;
}

.check-icon.correct {
    color: var(--green);
}

.check-icon.wrong {
    color: var(--red);
}

.answer-result {
    margin-top: 16px;
    font-size: 0.95rem;
}

.correct-answer {
    color: var(--green);
}


/* ═══════════════════════════════════════════════
   PRESENTATORSCHERM (beamer)
   Alles gefixeerd op viewport — geen scroll mogelijk
   ═══════════════════════════════════════════════ */

.presenter-page {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.presenter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    z-index: 10;
    flex-wrap: wrap;
    gap: 8px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left h1 {
    font-size: 1.1rem;
    margin: 0;
}

.logo-small {
    color: var(--gold);
    font-size: 24px;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--border-subtle);
    color: var(--gold);
}

.participant-count {
    font-size: 0.9rem;
    color: var(--cream-dim);
}

.header-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.part-nav {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-overlay);
    border-radius: 6px;
    padding: 2px;
}

.btn-part {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--cream-dim);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-part:hover {
    background: var(--border-subtle);
    color: var(--cream);
}

.btn-part.active {
    background: var(--gold);
    color: var(--bg-dark);
}

/* Views: vullen de ruimte onder de header */
.presenter-view {
    flex: 1 1 0;
    flex-direction: column;
    overflow: hidden;
}

/* Mindmap SVG transitions */
.mm-node { transition: transform 0.8s cubic-bezier(.4,0,.2,1), opacity 0.6s ease; }
.mm-line { transition: d 0.8s cubic-bezier(.4,0,.2,1); }

#conclusion-view {
    overflow-y: auto;
}

.welcome-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    overflow-y: auto;
}

.logo-large {
    font-size: 80px;
    color: var(--gold);
    margin-bottom: 16px;
}

.welcome-center h1 {
    font-size: 3rem;
    margin-bottom: 8px;
}

.welcome-center .subtitle {
    font-size: 1.3rem;
}

.join-info {
    margin-top: 32px;
    padding: 20px 32px;
    background: var(--bg-hover);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius);
    text-align: center;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 12px;
    background: var(--qr-bg);
    border-radius: 12px;
    margin-bottom: 12px;
    line-height: 0;
}

.qr-code-wrapper canvas {
    border-radius: 4px;
}

.join-info p {
    margin: 4px 0;
}

.join-url {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    color: var(--gold-light);
    font-weight: 600;
    word-break: break-all;
}

.participant-list-container {
    margin-top: 32px;
    width: 100%;
    max-width: 600px;
}

.participant-list-container h3 {
    color: var(--cream-dim);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.participant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.participant-tag {
    padding: 6px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border-medium);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--cream);
}

/* ─── Vraag view: links vraag, rechts chart ───── */
#question-view {
    flex-direction: row;
    overflow: hidden;
    height: 100%;
}

.question-display {
    flex: 1 1 0;
    min-width: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.question-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.part-badge {
    padding: 4px 14px;
    background: var(--border-subtle);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gold);
}

.q-counter {
    color: var(--cream-dim);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.question-text-large {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--white);
    margin-bottom: 28px;
}

.answers-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-display-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-answer);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    transition: all 0.4s;
}

.answer-display-item.correct {
    background: rgba(76, 175, 80, 0.2);
    border-left: 4px solid var(--green);
}

.answer-display-item.dimmed {
    opacity: 0.35;
}

.letter-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ─── Chart area: vaste breedte, canvas pixelsized ── */
.chart-area {
    width: 420px;
    flex-shrink: 0;
    align-self: stretch;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: var(--bg-overlay);
    border-left: 1px solid var(--bg-answer-border);
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--cream-dim);
    flex-shrink: 0;
}

.chart-wrapper {
    flex: 1 1 0;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

/* Canvas vult wrapper volledig via Chart.js responsive mode */
#live-chart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}


/* ─── Samenvatting View ───────────────────────── */

.summary-container {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
}

.summary-container h2 {
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 4px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    margin-top: 24px;
}

.summary-main-chart {
    background: var(--bg-overlay);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 300px;
    position: relative;
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--gold);
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--cream-dim);
    margin-top: 4px;
}

/* Inzichten */
.insights-container {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.insight-question {
    font-size: 0.85rem;
    color: var(--cream-dim);
    margin-bottom: 10px;
}

.insight-bar {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-overlay);
}

.insight-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    transition: width 0.6s ease;
    min-width: 0;
}

.insight-fill.conscious {
    background: var(--gold);
    color: var(--bg-dark);
}

.insight-fill.struggling {
    background: rgba(231, 76, 60, 0.6);
}

/* Conclusie blokken */
.insight-heading {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 16px;
}

.conclusion-block {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin-bottom: 14px;
    border-left: 4px solid transparent;
}

.conclusion-block h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--white);
}

.conclusion-block.good {
    border-left-color: var(--green);
    background: rgba(76, 175, 80, 0.08);
}

.conclusion-block.warn {
    border-left-color: #e67e22;
    background: rgba(230, 126, 34, 0.08);
}

.conclusion-block.neutral {
    border-left-color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

.conclusion-item {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--cream);
    margin-bottom: 8px;
}

.conclusion-item:last-child {
    margin-bottom: 0;
}

.conclusion-detail {
    font-size: 0.8rem;
    color: var(--cream-dim);
}

.verdict-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.verdict-card.good .stat-label { color: var(--green); }
.verdict-card.warn .stat-label { color: #e67e22; }
.verdict-card.neutral .stat-label { color: var(--gold); }


/* ═══════════════════════════════════════════════
   EINDCONCLUSIE SCHERM
   ═══════════════════════════════════════════════ */

.conclusion-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    overflow-y: auto;
    max-height: 100%;
}

.conclusion-header-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-large {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.conclusion-header-section h1 {
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 2.5rem;
    margin: 0 0 0.3rem;
}

.conclusion-header-section .subtitle {
    color: var(--cream-dim);
    font-size: 1.1rem;
}

/* Score ringen */
.conclusion-scores {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.score-ring-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    min-width: 160px;
    flex: 1;
    max-width: 220px;
}

.score-ring-card.overall {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--shadow-glow);
}

.score-ring-card h3 {
    color: var(--cream);
    font-family: var(--font-serif);
    margin: 0.8rem 0 0.3rem;
    font-size: 1.1rem;
}

.score-ring-card .score-detail {
    color: var(--cream-dim);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
}

.score-ring {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto;
}

.score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--bar-bg);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease;
}

.knowledge-ring { stroke: var(--blue); }
.personal-ring  { stroke: var(--gold); }
.overall-ring   { stroke: var(--green); }

.ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    font-family: var(--font-serif);
}

/* Conclusie secties */
.conclusion-section {
    margin-bottom: 1.5rem;
}

.conclusion-section h3 {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.conclusion-item {
    margin: 0.4rem 0;
    color: var(--cream);
    font-size: 0.95rem;
    line-height: 1.5;
}

.conclusion-detail {
    color: var(--cream-dim);
    font-size: 0.85rem;
    font-style: italic;
}

/* Slotwoord */
.closing-message {
    text-align: center;
    padding: 2rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--bg-hover), var(--bg-overlay));
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
}

.closing-message h3 {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border: none;
}

.closing-message blockquote {
    color: var(--cream);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 1rem auto;
    max-width: 600px;
    padding: 0;
    border: none;
}

.closing-message .verse-ref {
    display: block;
    margin-top: 0.5rem;
    color: var(--gold);
    font-style: normal;
    font-size: 0.95rem;
}

.closing-message p {
    color: var(--cream-dim);
    font-size: 1rem;
    margin-top: 1rem;
}

/* Beamer conclusie overrides */
.beamer-page .conclusion-container {
    max-width: 1100px;
    padding: 3rem;
}

.beamer-page .conclusion-header-section h1 {
    font-size: 3rem;
}

.beamer-page .logo-large {
    font-size: 4rem;
}

.beamer-page .score-ring-card {
    min-width: 200px;
    max-width: 280px;
}

.beamer-page .score-ring {
    width: 130px;
    height: 130px;
}

.beamer-page .ring-label {
    font-size: 2rem;
}

.beamer-page .conclusion-section h3 {
    font-size: 1.5rem;
}

.beamer-page .conclusion-item {
    font-size: 1.1rem;
}

.beamer-page .closing-message blockquote {
    font-size: 1.3rem;
}

/* ═══════════════════════════════════════════════
   SCOREBORD
   ═══════════════════════════════════════════════ */

.scoreboard-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.scoreboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.scoreboard-header h1 {
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 2rem;
    margin: 0.5rem 0 0.3rem;
}

.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scoreboard-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg-answer-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scoreboard-row.rank-1 {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.25), var(--bg-card));
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.15);
    font-size: 1.1rem;
    padding: 0.9rem 1rem;
}

.scoreboard-row.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), var(--bg-card));
    border-color: rgba(192, 192, 192, 0.4);
}

.scoreboard-row.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), var(--bg-card));
    border-color: rgba(205, 127, 50, 0.4);
}

.scoreboard-rank {
    min-width: 2.5rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cream-dim);
}

.rank-1 .scoreboard-rank,
.rank-2 .scoreboard-rank,
.rank-3 .scoreboard-rank {
    font-size: 1.6rem;
}

.scoreboard-name {
    flex: 0 0 auto;
    min-width: 120px;
    font-weight: 600;
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scoreboard-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--bar-bg);
    border-radius: 4px;
    overflow: hidden;
}

.scoreboard-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 4px;
    transition: width 0.8s ease;
}

.rank-1 .scoreboard-bar { background: linear-gradient(90deg, var(--gold), #f0d878); }
.rank-2 .scoreboard-bar { background: linear-gradient(90deg, #c0c0c0, #e0e0e0); }
.rank-3 .scoreboard-bar { background: linear-gradient(90deg, #cd7f32, #e8a04c); }

.scoreboard-score {
    min-width: 70px;
    text-align: right;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--gold);
    white-space: nowrap;
}

/* Pulserende knop (hint om scorebord te tonen) */
.btn-pulse {
    animation: btnPulse 1.5s ease-in-out infinite;
    background: var(--gold) !important;
    color: var(--bg-dark) !important;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.6); }
    50% { box-shadow: 0 0 16px 4px rgba(201, 168, 76, 0.4); }
}

/* Beamer scorebord overrides */
.beamer-page .scoreboard-container {
    max-width: 1000px;
    padding: 3rem;
}

.beamer-page .scoreboard-header h1 {
    font-size: 2.8rem;
}

.beamer-page .scoreboard-row {
    padding: 0.9rem 1.5rem;
    font-size: 1.15rem;
}

.beamer-page .scoreboard-row.rank-1 {
    font-size: 1.3rem;
    padding: 1.1rem 1.5rem;
}

.beamer-page .scoreboard-rank {
    font-size: 1.5rem;
    min-width: 3rem;
}

.beamer-page .rank-1 .scoreboard-rank,
.beamer-page .rank-2 .scoreboard-rank,
.beamer-page .rank-3 .scoreboard-rank {
    font-size: 2rem;
}

.beamer-page .scoreboard-name {
    min-width: 160px;
    font-size: 1.2rem;
}

.beamer-page .scoreboard-score {
    min-width: 90px;
    font-size: 1.3rem;
}


/* ═══════════════════════════════════════════════
   BEAMER PAGINA (geen header, meer ruimte)
   ═══════════════════════════════════════════════ */

.beamer-page .presenter-header {
    display: none;
}

.beamer-page .question-text-large {
    font-size: 2rem;
}

.beamer-page .answer-display-item {
    font-size: 1.15rem;
}


/* ═══════════════════════════════════════════════
   TIMER
   ═══════════════════════════════════════════════ */

/* Participant phone: bar */
.timer-bar-container {
    width: 100%;
    height: 28px;
    background: var(--bar-bg);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #e0c36a);
    border-radius: 14px;
    width: 100%;
    transition: none;
}

.timer-bar.urgent {
    background: linear-gradient(90deg, #e53935, #ff7043);
}

.timer-bar-container.expired .timer-bar {
    width: 0 !important;
}

.timer-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.timer-bar-container.expired .timer-text {
    color: #ff7043;
}

/* Presenter / Beamer: circular badge */
.timer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.95rem;
    margin-left: auto;
    padding: 0 6px;
}

.timer-badge.urgent {
    background: #e53935;
    color: #fff;
    animation: timerPulse 0.6s ease-in-out infinite;
}

.timer-badge.expired {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cream-dim);
    animation: none;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.beamer-page .timer-badge {
    min-width: 52px;
    height: 52px;
    font-size: 1.4rem;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
    #question-view {
        flex-direction: column;
    }
    .chart-area {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--bg-answer-border);
        height: 250px;
        flex-shrink: 0;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .presenter-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .welcome-center h1 {
        font-size: 2rem;
    }
    .question-text-large {
        font-size: 1.2rem;
    }
}

/* ═══════════════════════════════════════════════
   Timer badge (beamer/presenter)
   ═══════════════════════════════════════════════ */
.timer-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--border-subtle);
    color: var(--gold);
    font-size: 2rem;
    font-weight: bold;
    padding: 10px 24px;
    border-radius: 12px;
    z-index: 100;
    transition: background 0.3s, color 0.3s;
}
.timer-warning {
    background: rgba(230,126,34,0.25) !important;
    color: #e67e22 !important;
}
.timer-danger {
    background: rgba(231,76,60,0.3) !important;
    color: #e74c3c !important;
    animation: timerPulse 0.5s ease-in-out infinite alternate;
}
@keyframes timerPulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}


/* ═══════════════════════════════════════════════
   THEME TOGGLE
   ═══════════════════════════════════════════════ */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--gold);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    padding: 8px;
    line-height: 1;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--gold);
}

/* ─── Anonymous toggle switch ─── */
.anon-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}
.anon-switch input { display: none; }
.anon-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--border-subtle);
    border-radius: 10px;
    transition: background 0.25s;
    flex-shrink: 0;
}
.anon-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--cream, #fff);
    border-radius: 50%;
    transition: transform 0.25s;
}
.anon-switch input:checked + .anon-slider {
    background: var(--green, #4caf50);
}
.anon-switch input:checked + .anon-slider::after {
    transform: translateX(16px);
}
.anon-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--cream-dim, #aaa);
    white-space: nowrap;
}
.anon-switch input:checked ~ .anon-switch-label {
    color: var(--green, #4caf50);
}

/* ═══════════════════════════════════════════════
   SVG ICON SYSTEM
   Inline SVG icons via CSS masks — no emoji needed
   ═══════════════════════════════════════════════ */

.qi { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qi svg { width: 100%; height: 100%; }

/* Reusable icon button label helper */
.qi-label { display: inline-flex; align-items: center; gap: 6px; }

/* Light theme refinements */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-gold {
    color: #fff;
}

[data-theme="light"] .btn-part.active {
    color: #fff;
}

[data-theme="light"] .answer-btn.selected .letter {
    color: #fff;
}

[data-theme="light"] .letter-badge {
    color: #fff;
}

[data-theme="light"] .timer-text {
    color: #fff;
}

[data-theme="light"] .scoreboard-row.rank-1 {
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), var(--bg-card));
}

[data-theme="light"] .scoreboard-row.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), var(--bg-card));
}

[data-theme="light"] .scoreboard-row.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12), var(--bg-card));
}

[data-theme="light"] .bg-card,
[data-theme="light"] .insight-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}


/* ═══════════════════════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════════════════════ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    padding: 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 900px;
    width: 100%;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 200px;
}

.cookie-banner-text strong {
    color: var(--gold);
    font-size: 0.95rem;
}

.cookie-banner-text p {
    color: var(--cream-dim);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 4px;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.cookie-link {
    color: var(--gold);
    font-size: 0.85rem;
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-link:hover {
    color: var(--gold-light);
}

@media (max-width: 600px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ─── Language Switch ─────────────────────────── */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-family: var(--font-sans);
}
.lang-switch-active {
    color: var(--gold);
    font-weight: 700;
    cursor: default;
}
.lang-switch-link {
    color: var(--cream-dim);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.lang-switch-link:hover {
    color: var(--gold-light);
}
.lang-switch-sep {
    color: var(--cream-dim);
    opacity: 0.4;
}
[data-theme="light"] .lang-switch-link {
    color: #666;
}
[data-theme="light"] .lang-switch-active {
    color: var(--gold);
}
[data-theme="light"] .lang-switch-link:hover {
    color: var(--gold);
}
