/* ==========================================
   125 Jaar Digitalisering & Data
   Clean, Minimal Design
   ========================================== */

:root {
    --color-bg: #1a1f2e;
    --color-bg-light: #242b3d;
    --color-bg-card: #2a3246;
    
    --color-primary: #2563eb;
    --color-primary-light: #3b82f6;
    --color-primary-dark: #1d4ed8;
    
    --color-success: #22c55e;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    
    --color-text: #f8fafc;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    
    --color-border: #374151;
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* ==========================================
   Welcome Screen
   ========================================== */

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
}

#welkom-screen {
    align-items: center;
    justify-content: center;
}

.welkom-container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.welkom-content {
    text-align: center;
}

.welkom-content h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.welkom-subtitle {
    color: var(--color-text-secondary);
    font-size: 1rem;
    margin-bottom: 48px;
}

.herstel-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.herstel-card p {
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.herstel-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--color-bg-card);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-light);
}

.btn-stats {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    color: var(--color-text);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-stats:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-stats-icon {
    display: flex;
    align-items: center;
    color: #818cf8;
}

.btn-text {
    background: transparent;
    color: var(--color-text-secondary);
    padding: 8px 16px;
}

.btn-text:hover {
    color: var(--color-text);
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-finish {
    background: linear-gradient(135deg, var(--color-success), var(--color-primary));
}

.btn-skip {
    width: 100%;
    margin-top: 8px;
    color: var(--color-text-muted);
}

.btn-skip:hover {
    color: var(--color-text-secondary);
}

.welkom-hint {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: 24px;
}

.welkom-link {
    display: inline-block;
    color: var(--color-text-secondary);
    text-decoration: underline;
    font-size: 0.875rem;
    margin-top: 16px;
}

.welkom-link:hover {
    color: var(--color-text);
}

/* ==========================================
   Navigation Screen
   ========================================== */

#navigatie-screen {
    flex-direction: column;
}

.nav-back-bar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

.nav-back-bar .back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
}

.nav-back-bar .back-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.nav-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
}

.nav-header {
    text-align: center;
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--color-border);
}

.nav-footer {
    padding: 24px 0;
    border-top: 1px solid var(--color-border);
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-danger {
    background: var(--color-error);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.nav-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Voortgang */
.voortgang-sectie {
    padding: 24px 0;
}

.voortgang-sectie h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.voortgang-bar {
    height: 8px;
    background: var(--color-bg-card);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.voortgang-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    width: 0%;
}

.voortgang-tekst {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* Timeline */
.reis-timeline {
    padding-top: 16px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.timeline-item:hover {
    opacity: 0.8;
}

.timeline-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 16px;
}

.indicator-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-item.completed .indicator-circle {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.timeline-item.completed .indicator-circle::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Partial state - blue dot without checkmark */
.timeline-item.partial .indicator-circle {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.timeline-item.partial .indicator-line {
    background: var(--color-primary);
}

.timeline-item.current .indicator-circle {
    border-color: var(--color-primary);
    border-width: 3px;
}

.timeline-item.current .indicator-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.indicator-line {
    width: 2px;
    height: 40px;
    background: var(--color-border);
    margin-top: 4px;
}

.timeline-item.completed .indicator-line {
    background: var(--color-primary);
}

.timeline-item:last-child .indicator-line {
    display: none;
}

.timeline-content {
    flex: 1;
    padding-top: 2px;
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.timeline-content p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.timeline-arrow {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    padding-top: 2px;
}

/* ==========================================
   Sectie Header
   ========================================== */

.sectie-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
}

.back-icon {
    font-size: 1.25rem;
}

.sectie-titel {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.pauze-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
}

.pauze-btn:hover {
    color: var(--color-text);
}

/* ==========================================
   Secties
   ========================================== */

.sectie {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 56px;
}

.sectie.active {
    display: flex;
}

.sectie-content {
    flex: 1;
    padding: 24px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.sectie-intro {
    margin-bottom: 32px;
}

.era-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.sectie-intro h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.sectie-intro p {
    color: var(--color-text-secondary);
}

.sectie-footer {
    padding: 16px 24px 32px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================
   Ponskaart
   ========================================== */

.ponskaart {
    background: linear-gradient(145deg, #f5f0e1, #e8e0c8);
    border-radius: var(--radius-md);
    padding: 24px;
    color: #5c4a32;
}

.ponskaart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 2px dashed #c9b896;
    margin-bottom: 24px;
}

.ponskaart-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.ponskaart-nr {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #8b7355;
}

.ponskaart-veld {
    margin-bottom: 20px;
}

.ponskaart-veld label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.ponskaart-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #c9b896;
    border-radius: 4px;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #5c4a32;
}

.ponskaart-input:focus {
    outline: none;
    border-color: #5c4a32;
    background: white;
}

.ponskaart-input::placeholder {
    color: #a08060;
}

/* Ponskaart Header */
.ponskaart-header {
    position: relative;
}

.ponskaart-help-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #5c4a32;
    color: #f5f0e1;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ponskaart-help-btn:hover {
    background: #3d3222;
    transform: translateY(-50%) scale(1.1);
}

.ponskaart-instructie {
    font-size: 0.85rem;
    color: #8b7355;
    margin: 12px 0 16px;
    text-align: center;
    font-style: italic;
}

/* Interactieve Ponskaart */
.ponskaart-wrapper {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.ponskaart-rij-nummers {
    display: flex;
    flex-direction: column;
    /* Headers: veld-labels (22px) + kolom-nummers (16px) + margin (6px) + padding (10px) = 54px */
    padding-top: 54px;
    gap: 4px;
}

.rij-nummer-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: #5c4a32;
    /* Moet exact matchen met .pons-positie height */
    height: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 2px;
}

.ponskaart-interactive {
    flex: 1;
    background: linear-gradient(180deg, #f7f2e3 0%, #e8dfc5 100%);
    border: 3px solid #c9b896;
    border-radius: 8px;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.ponskaart-kolom-headers {
    margin-bottom: 6px;
}

.veld-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.veld-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: #5c4a32;
    text-align: center;
    background: rgba(92, 74, 50, 0.1);
    padding: 3px 2px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
}

.kolom-nummers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.kolom-nummer {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #8b7355;
    text-align: center;
}

.ponskaart-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ponskaart-rij {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    align-items: center;
}

.pons-positie {
    height: 32px;
    background: #ebe3cc;
    border: 2px solid #d4c9a8;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pons-positie:hover {
    background: #d4c9a8;
    transform: scale(1.05);
}

.pons-positie:active {
    transform: scale(0.9);
}

.pons-positie.geponst {
    background: #3d3222;
    border-color: #5c4a32;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pons-positie.geponst::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.pons-positie.veld-start {
    border-left: 3px solid #8b7355;
}

/* Animatie voor ponsen */
@keyframes pons-effect {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.pons-positie.punching {
    animation: pons-effect 0.2s ease;
}

/* Rij labels aan de zijkant */
.ponskaart-rij-labels {
    display: none; /* Labels zijn nu geïntegreerd in de grid */
}

/* Resultaten weergave */
.ponskaart-resultaten {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid #c9b896;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
}

.resultaat-veld {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #d4c9a8;
}

.resultaat-veld:last-child {
    border-bottom: none;
}

.resultaat-label {
    font-size: 0.75rem;
    color: #8b7355;
}

.resultaat-waarde {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: #5c4a32;
    letter-spacing: 0.1em;
}

.resultaat-waarde.valid {
    color: #22c55e;
}

.resultaat-waarde.invalid {
    color: #ef4444;
}

/* Actie knoppen */
.ponskaart-acties {
    display: flex;
    gap: 12px;
}

.ponskaart-acties .btn {
    flex: 1;
    padding: 12px;
    font-size: 0.85rem;
}

.ponskaart-acties .btn span {
    margin-right: 6px;
}

/* Help Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    color: var(--color-text);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-bg-light);
    color: var(--color-text);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: var(--color-primary);
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.help-sectie {
    margin-bottom: 20px;
}

.help-sectie h3 {
    font-size: 0.95rem;
    color: var(--color-primary-light);
    margin-bottom: 8px;
}

.help-sectie h4 {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 12px 0 6px;
}

.help-sectie p, .help-sectie li {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.help-sectie ol {
    padding-left: 20px;
}

.help-sectie li {
    margin-bottom: 6px;
}

.encoding-tabel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.encoding-tabel.encoding-simpel {
    grid-template-columns: 1fr;
}

.encoding-groep {
    background: var(--color-bg-light);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.encoding-groep h4 {
    margin: 0 0 4px;
    color: var(--color-text);
}

.encoding-groep p {
    margin: 0;
    font-size: 0.8rem;
}

.encoding-groep small {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.kolom-tabel {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.kolom-tabel td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--color-border);
}

.kolom-tabel td:first-child {
    width: 80px;
    color: var(--color-primary-light);
}

.provincie-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.provincie-codes span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: var(--color-bg-light);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--color-text-secondary);
}

.modal-ok {
    width: 100%;
    margin-top: 16px;
}

/* Responsive ponskaart */
@media (max-width: 420px) {
    .ponskaart-wrapper {
        gap: 3px;
    }
    
    .ponskaart-rij-nummers {
        /* Headers: veld-labels (20px) + kolom-nummers (14px) + margin (4px) + padding (8px) = 46px */
        padding-top: 46px;
        gap: 3px;
    }
    
    .rij-nummer-label {
        font-size: 0.7rem;
        height: 28px;
        min-height: 28px;
    }
    
    .ponskaart-interactive {
        padding: 8px;
    }
    
    .ponskaart-kolom-headers {
        margin-bottom: 4px;
    }
    
    .veld-labels {
        gap: 3px;
        margin-bottom: 2px;
    }
    
    .kolom-nummers {
        gap: 3px;
    }
    
    .ponskaart-grid {
        gap: 3px;
    }
    
    .ponskaart-rij {
        gap: 3px;
    }
    
    .veld-label {
        font-size: 0.55rem;
        padding: 2px 1px;
    }
    
    .kolom-nummer {
        font-size: 0.55rem;
    }
    
    .pons-positie {
        height: 28px;
        border-radius: 4px;
    }
    
    .encoding-tabel {
        grid-template-columns: 1fr;
    }
    
    .resultaat-veld {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .resultaat-waarde {
        font-size: 1rem;
    }
}

@media (max-width: 340px) {
    .ponskaart-rij-nummers {
        /* Headers: veld-labels (18px) + kolom-nummers (12px) + margin (4px) + padding (6px) = 40px */
        padding-top: 40px;
        gap: 2px;
    }
    
    .rij-nummer-label {
        font-size: 0.6rem;
        height: 24px;
        min-height: 24px;
    }
    
    .ponskaart-interactive {
        padding: 6px;
    }
    
    .ponskaart-kolom-headers {
        margin-bottom: 4px;
    }
    
    .veld-labels {
        gap: 2px;
        margin-bottom: 2px;
    }
    
    .kolom-nummers,
    .ponskaart-grid,
    .ponskaart-rij {
        gap: 2px;
    }
    
    .pons-positie {
        height: 24px;
    }
    
    .veld-label {
        font-size: 0.5rem;
    }
}

/* Visuele Ponskaart */
.ponskaart-visual {
    background: linear-gradient(180deg, #f7f2e3 0%, #ede5d0 100%);
    border: 3px solid #c9b896;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.ponskaart-visual::before {
    content: 'IBM';
    position: absolute;
    top: 4px;
    right: 8px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #b8a882;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.ponskaart-rand-boven,
.ponskaart-rand-onder {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px 0;
    overflow: hidden;
}

.ponskaart-rand-boven {
    border-bottom: 1px solid #c9b896;
    margin-bottom: 8px;
}

.ponskaart-rand-onder {
    border-top: 1px solid #c9b896;
    margin-top: 8px;
}

.ponskaart-rand-boven span,
.ponskaart-rand-onder span {
    width: 8px;
    height: 4px;
    background: #d4c9a8;
    border-radius: 1px;
    flex-shrink: 0;
}

.ponskaart-rijen {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pons-rij {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #d4c9a8;
}

.pons-rij:last-child {
    border-bottom: none;
}

.rij-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 700;
    color: #8b7355;
    width: 70px;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.rij-gaatjes {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    flex: 1;
    min-height: 28px;
    align-items: center;
}

.gaatje {
    width: 12px;
    height: 18px;
    background: #e8dfc5;
    border-radius: 2px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
    transition: all 0.15s ease;
}

.gaatje.geponst {
    background: #d0c5a5;
}

.gaatje-positie {
    width: 8px;
    height: 4px;
    background: #c9bc9e;
    border-radius: 1px;
    margin: 0 auto;
    transition: all 0.15s ease;
}

.gaatje.geponst .gaatje-positie.actief {
    background: transparent;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid #a89970;
}

/* Animatie voor nieuw gaatje */
@keyframes pons-animatie {
    0% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.gaatje.nieuw {
    animation: pons-animatie 0.3s ease;
}

/* Placeholder gaatjes */
.gaatje-placeholder {
    width: 12px;
    height: 18px;
    background: #ebe3cc;
    border-radius: 2px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 380px) {
    .rij-label {
        width: 55px;
        font-size: 0.5rem;
    }
    
    .gaatje {
        width: 10px;
        height: 15px;
    }
    
    .gaatje-positie {
        width: 6px;
        height: 3px;
    }
}

/* ==========================================
   Enigma Machine
   ========================================== */

/* Uitdaging bovenaan - sticky */
.enigma-challenge {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-align: center;
    margin-bottom: 16px;
    position: sticky;
    top: 56px;
    z-index: 10;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.enigma-challenge h3 {
    margin: 0;
    font-size: 0.85rem;
    white-space: nowrap;
}

.enigma-challenge p {
    display: none;
}

.challenge-code {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    background: var(--color-bg);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--color-primary-light);
    letter-spacing: 0.2em;
    font-weight: 700;
}

/* Enigma Machine Box */
.enigma-machine {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 3px solid #3d3d3d;
}

/* Rotor */
.enigma-rotor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.enigma-rotor label {
    color: #888;
    font-size: 0.8rem;
}

.rotor-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rotor-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #444;
    border: 2px solid #555;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.rotor-btn:hover {
    background: #555;
}

.rotor-btn:active {
    transform: scale(0.95);
}

.rotor-waarde {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffeb3b;
    min-width: 30px;
    text-align: center;
}

/* Display voor input/output */
.enigma-display {
    background: #111;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 16px;
}

.display-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.display-row:last-child {
    margin-bottom: 0;
}

.display-label {
    color: #666;
    font-size: 0.7rem;
    min-width: 50px;
    text-transform: uppercase;
}

.display-text {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #888;
    flex: 1;
    letter-spacing: 0.15em;
    word-break: break-all;
    min-height: 1.2em;
}

.display-output {
    color: #0f0;
}

/* Lampjes in QWERTY layout */
.enigma-lampjes {
    background: #0a0a0a;
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.lampjes-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.lampjes-row:last-child {
    margin-bottom: 0;
}

.enigma-lampjes span {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #333;
    transition: all 0.1s;
}

.enigma-lampjes span.lit {
    background: #ffeb3b;
    color: #111;
    box-shadow: 0 0 12px #ffeb3b;
}

/* QWERTY Keyboard */
.enigma-keyboard {
    background: #222;
    border-radius: var(--radius-sm);
    padding: 10px;
    touch-action: manipulation; /* Prevent zoom on tap */
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

.enigma-key {
    width: 30px;
    height: 38px;
    background: linear-gradient(180deg, #555, #3a3a3a);
    border: 1px solid #666;
    border-bottom: 3px solid #222;
    border-radius: 4px;
    color: white;
    font-family: var(--font-mono);
    font-size: 16px; /* Prevent iOS zoom */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s;
    touch-action: manipulation; /* Prevent double-tap zoom */
    -webkit-tap-highlight-color: transparent;
}

.enigma-key:hover {
    background: linear-gradient(180deg, #666, #4a4a4a);
}

.enigma-key:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
    background: linear-gradient(180deg, #4a4a4a, #333);
}

.key-space {
    width: 80px;
    font-size: 0.6rem;
}

.key-backspace,
.key-clear {
    width: 50px;
    font-size: 0.65rem;
    background: linear-gradient(180deg, #664444, #4a3333);
}

.key-backspace:hover,
.key-clear:hover {
    background: linear-gradient(180deg, #775555, #5a4444);
}

.keyboard-controls {
    margin-top: 8px;
    gap: 8px;
}

/* Check button */
.enigma-check {
    margin-top: 16px;
    text-align: center;
}

.enigma-check .btn {
    width: 100%;
}

.feedback-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.feedback-message.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--color-success);
}

.feedback-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.feedback-message.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* Enigma feedback container */
.enigma-feedback-container {
    margin-top: 16px;
    min-height: 44px;
}

/* ==========================================
   Flowchart
   ========================================== */

.flowchart-container {
    text-align: center;
}

.flowchart-stap {
    display: none;
    animation: fadeIn 0.3s ease;
}

.flowchart-stap.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fc-node {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 8px;
}

.fc-node-start {
    background: var(--color-primary);
    color: white;
}

.fc-node-process {
    background: var(--color-bg-card);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.fc-arrow {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    margin: 8px 0;
}

.fc-process {
    background: var(--color-bg-card);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.fc-decision {
    width: 140px;
    height: 140px;
    background: var(--color-bg-card);
    border: 2px solid var(--color-primary-light);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto;
}

.fc-decision span {
    transform: rotate(-45deg);
    font-weight: 500;
    font-size: 0.875rem;
}

.fc-options {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

.fc-btn {
    padding: 16px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid;
    font-family: var(--font-main);
}

.fc-btn-ja {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.fc-btn-ja:hover {
    background: rgba(34, 197, 94, 0.2);
}

.fc-btn-nee {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-error);
    color: var(--color-error);
}

.fc-btn-nee:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Flowchart States */
.fc-error,
.fc-success {
    padding: 32px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.fc-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--color-error);
}

.fc-success {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid var(--color-success);
}

.error-icon,
.success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.fc-error h3 {
    color: var(--color-error);
    font-family: var(--font-mono);
}

.fc-success h3 {
    color: var(--color-success);
    font-family: var(--font-mono);
}

.fc-terminal {
    background: #0a0a0a;
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: #0f0;
    margin: 24px 0;
}

.terminal-line {
    margin-bottom: 4px;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.fc-progress {
    padding: 24px;
}

.progress-bar-fc {
    height: 8px;
    background: var(--color-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill-fc {
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width 1.5s ease;
}

.fc-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.stat-box {
    background: var(--color-bg-card);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-box .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.stat-box .stat-value {
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-box .stat-value.success {
    color: var(--color-success);
}

/* ==========================================
   Digitaal Dier Quiz - Lucidchart Style
   ========================================== */

.flowchart-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.fc-node-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Rechthoekige nodes */
.fc-rect {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fc-start {
    background: linear-gradient(135deg, #c9a87c, #b8956a);
    color: white;
    border: 2px solid #a07d50;
}

.fc-process {
    background: linear-gradient(135deg, #e8b4a0, #d9a08a);
    color: #5c3d2e;
    border: 2px solid #c48b75;
}

.fc-eind {
    background: linear-gradient(135deg, #a8d5a2, #8fc989);
    color: #2d5a2d;
    border: 2px solid #6bb566;
    padding: 16px 32px;
    min-width: 140px;
}

.eind-emoji {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.eind-naam {
    display: block;
    font-size: 1rem;
}

/* Connector lijnen */
.fc-connector {
    width: 3px;
    height: 24px;
    background: #888;
    position: relative;
}

.fc-connector::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #888;
}

/* History nodes */
.fc-history {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4px;
    opacity: 0;
    animation: fadeInNode 0.3s ease forwards;
}

@keyframes fadeInNode {
    to { opacity: 1; }
}

.fc-history-diamond {
    width: 60px;
    height: 60px;
    background: var(--diamond-bg, linear-gradient(135deg, #e8b4a0, #d9a08a));
    border: 2px solid var(--diamond-border, #c48b75);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fc-history-diamond span {
    transform: rotate(-45deg);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--diamond-text, #5c3d2e);
    text-align: center;
    max-width: 50px;
    line-height: 1.2;
}

/* Level kleuren voor history diamonds */
.fc-history-diamond.level-0 { --diamond-bg: linear-gradient(135deg, #e8b4a0, #d9a08a); --diamond-border: #c48b75; --diamond-text: #5c3d2e; }
.fc-history-diamond.level-1 { --diamond-bg: linear-gradient(135deg, #a8c5e8, #8ab0d9); --diamond-border: #6a9bc4; --diamond-text: #2e4a5c; }
.fc-history-diamond.level-2 { --diamond-bg: linear-gradient(135deg, #c8e8a8, #b0d98a); --diamond-border: #8bc46a; --diamond-text: #3d5c2e; }
.fc-history-diamond.level-3 { --diamond-bg: linear-gradient(135deg, #e8d4a8, #d9c48a); --diamond-border: #c4a86a; --diamond-text: #5c4a2e; }
.fc-history-diamond.level-4 { --diamond-bg: linear-gradient(135deg, #d4a8e8, #c48ad9); --diamond-border: #a86ac4; --diamond-text: #4a2e5c; }

.fc-history-answer {
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.fc-history-answer.ja {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.fc-history-answer.nee {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Question Panel */
.fc-question-panel {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    border: 2px solid var(--color-border);
}

.fc-diamond-display {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.fc-diamond {
    width: 100px;
    height: 100px;
    background: var(--diamond-bg, linear-gradient(135deg, #e8b4a0, #d9a08a));
    border: 3px solid var(--diamond-border, #c48b75);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.fc-diamond span {
    transform: rotate(-45deg);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--diamond-text, #5c3d2e);
    text-align: center;
    max-width: 70px;
    line-height: 1.3;
}

/* Verschillende kleuren per vraag niveau */
.fc-diamond.level-0 { --diamond-bg: linear-gradient(135deg, #e8b4a0, #d9a08a); --diamond-border: #c48b75; --diamond-text: #5c3d2e; }
.fc-diamond.level-1 { --diamond-bg: linear-gradient(135deg, #a8c5e8, #8ab0d9); --diamond-border: #6a9bc4; --diamond-text: #2e4a5c; }
.fc-diamond.level-2 { --diamond-bg: linear-gradient(135deg, #c8e8a8, #b0d98a); --diamond-border: #8bc46a; --diamond-text: #3d5c2e; }
.fc-diamond.level-3 { --diamond-bg: linear-gradient(135deg, #e8d4a8, #d9c48a); --diamond-border: #c4a86a; --diamond-text: #5c4a2e; }
.fc-diamond.level-4 { --diamond-bg: linear-gradient(135deg, #d4a8e8, #c48ad9); --diamond-border: #a86ac4; --diamond-text: #4a2e5c; }

.fc-vraag-volledig {
    color: var(--color-text);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.fc-keuzes {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.fc-keuze {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid;
    min-width: 100px;
}

.fc-keuze-ja {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.fc-keuze-ja:hover {
    background: rgba(34, 197, 94, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.fc-keuze-nee {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.fc-keuze-nee:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.fc-keuze-ja.selected {
    background: rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.fc-keuze-nee.selected {
    background: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.fc-keuze {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.keuze-label {
    font-size: 1rem;
    font-weight: 600;
}

.keuze-count {
    font-size: 0.7rem;
    opacity: 0.7;
    font-weight: 400;
}

/* Dier Resultaat */
.dier-resultaat {
    text-align: center;
}

.dier-details {
    margin: 20px 0;
}

.dier-type {
    font-size: 1.1rem;
    color: var(--color-primary-light);
    font-weight: 600;
    margin-bottom: 8px;
}

.dier-beschrijving {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 420px) {
    .fc-diamond {
        width: 80px;
        height: 80px;
    }
    
    .fc-diamond span {
        font-size: 0.65rem;
        max-width: 55px;
    }
    
    .fc-keuzes {
        flex-direction: column;
        gap: 10px;
    }
    
    .fc-keuze {
        width: 100%;
    }
    
    .fc-history-diamond {
        width: 50px;
        height: 50px;
    }
    
    .fc-history-diamond span {
        font-size: 0.55rem;
        max-width: 40px;
    }
}

/* ==========================================
   Vraag Lijst
   ========================================== */

.vraag-lijst {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vraag-item {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.vraag-item.answered {
    border-color: var(--color-success);
}

.vraag-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.vraag-item.disabled .vraag-header {
    cursor: not-allowed;
}

.vraag-header {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.vraag-header:hover {
    background: var(--color-bg-light);
}

.vraag-icon {
    font-size: 1.25rem;
    margin-right: 12px;
}

.vraag-tekst {
    flex: 1;
    font-size: 0.9375rem;
}

.vraag-toggle {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    font-weight: 300;
}

.vraag-body {
    display: none;
    padding: 0 16px 16px;
}

.vraag-item.open .vraag-body {
    display: block;
}

.vraag-item.open .vraag-toggle {
    transform: rotate(45deg);
}

.vraag-body textarea {
    width: 100%;
    min-height: 100px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 1rem;
    resize: vertical;
}

.vraag-body textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Modem Visual */
.modem-visual {
    text-align: center;
    margin-bottom: 24px;
}

.modem-box {
    display: inline-block;
    background: linear-gradient(145deg, #d4d4d4, #a0a0a0);
    border-radius: var(--radius-sm);
    padding: 16px 32px;
    margin-bottom: 8px;
}

.modem-lights {
    display: flex;
    gap: 12px;
}

.led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
    animation: ledBlink 0.5s infinite alternate;
}

.led:nth-child(2) { animation-delay: 0.1s; }
.led:nth-child(3) { animation-delay: 0.2s; }
.led:nth-child(4) { animation-delay: 0.3s; }

@keyframes ledBlink {
    from { background: #333; }
    to { background: #0f0; box-shadow: 0 0 8px #0f0; }
}

.modem-sound {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ==========================================
   Stamboom Spel
   ========================================== */

.stamboom-hint {
    background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-light));
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow);
    text-align: center;
}

.hint-label {
    font-size: 0.7rem;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    font-weight: 600;
}

.hint-tekst {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.stamboom-container {
    padding: 12px 0;
    margin-bottom: 16px;
}

.stamboom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stamboom-rij {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
}

.familie-eenheid {
    display: flex;
    align-items: center;
    gap: 8px;
}

.partner-lijn {
    width: 24px;
    height: 3px;
    background: var(--color-border);
}

.stamboom-slot {
    background: var(--color-bg-card);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px 8px;
    text-align: center;
    flex: 1;
    min-width: 70px;
    max-width: 100px;
    min-width: 80px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stamboom-slot.small {
    min-width: 60px;
    max-width: 80px;
    padding: 6px 4px;
}

.stamboom-slot.small .slot-avatar {
    font-size: 1.25rem;
}

.stamboom-slot.small .slot-naam {
    font-size: 0.7rem;
}

.stamboom-slot.small .slot-relatie {
    font-size: 0.55rem;
    display: none;
}

.stamboom-slot:hover:not(.bezet) {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
}

.stamboom-slot.selected {
    border-color: var(--color-primary);
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.stamboom-slot.bezet {
    border-style: solid;
    border-color: var(--color-success);
    background: rgba(34, 197, 94, 0.1);
    cursor: default;
}

.stamboom-slot.correct-animation {
    animation: correctPulse 0.5s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.slot-avatar {
    font-size: 2rem;
    margin-bottom: 4px;
}

.slot-naam {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.slot-relatie {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

.stamboom-verbinding {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

.stamboom-verbinding.vertical {
    width: 3px;
    height: 16px;
    background: var(--color-border);
}

.partner-verbinding {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 0.9rem;
    padding: 0 4px;
    opacity: 0.7;
}

.partner-verbinding.small {
    font-size: 0.7rem;
    padding: 0 2px;
}

/* Namen selectie */
.stamboom-namen {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
}

.namen-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.namen-lijst {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.naam-btn {
    padding: 10px 8px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.naam-btn:hover:not(.used):not(.selected) {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
    transform: scale(1.02);
}

.naam-btn:active:not(.used) {
    transform: scale(0.98);
}

.naam-btn.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.naam-btn.used {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
    background: var(--color-bg-card);
}

/* Controls en score */
.stamboom-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.stamboom-score {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.stamboom-score span:nth-child(2) {
    font-weight: 700;
    color: var(--color-primary);
}

/* Feedback */
.stamboom-feedback {
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    min-height: 44px;
}

.stamboom-feedback.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--color-success);
}

.stamboom-feedback.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.stamboom-feedback.complete {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(37, 99, 235, 0.2));
    color: var(--color-success);
    font-weight: 600;
}

/* Responsive stamboom */
@media (max-width: 420px) {
    .stamboom-hint {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .hint-tekst {
        font-size: 0.9rem;
    }
    
    .stamboom-rij {
        gap: 4px;
    }
    
    .stamboom-slot {
        min-width: 60px;
        max-width: 85px;
        padding: 8px 4px;
    }
    
    .slot-avatar {
        font-size: 1.4rem !important;
    }
    
    .slot-naam {
        font-size: 0.7rem !important;
    }
    
    .slot-relatie {
        font-size: 0.55rem !important;
    }
    
    .stamboom-slot.small {
        min-width: 55px;
        max-width: 70px;
        padding: 6px 3px;
    }
    
    .namen-lijst {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .naam-btn {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .stamboom-verbinding.vertical {
        height: 12px;
    }
}

@media (max-width: 340px) {
    .stamboom-slot {
        min-width: 50px;
        max-width: 75px;
    }
    
    .stamboom-slot.small {
        min-width: 45px;
        max-width: 60px;
    }
    
    .slot-avatar {
        font-size: 1.2rem !important;
    }
    
    .namen-lijst {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .naam-btn {
        padding: 6px 2px;
        font-size: 0.7rem;
    }
}

/* ==========================================
   Reflectie Vragen
   ========================================== */

.reflectie-vragen {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reflectie-vraag label {
    display: block;
    margin-bottom: 12px;
}

.vraag-nummer {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-border);
    margin-right: 12px;
}

.reflectie-vraag textarea {
    width: 100%;
    min-height: 120px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 1rem;
    resize: vertical;
}

.reflectie-vraag textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Hybride Werken */
.hybride-vragen {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hybride-vraag label,
.hybride-label {
    display: block;
    margin-bottom: 12px;
}

.hybride-vraag textarea {
    width: 100%;
    min-height: 100px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 1rem;
    resize: vertical;
}

.hybride-vraag textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.optie-tekst {
    color: white;
}

/* ==========================================
   Quiz
   ========================================== */

.quiz-container {
    margin-bottom: 24px;
}

.quiz-vraag {
    display: none;
}

.quiz-vraag.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.quiz-nummer {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.quiz-vraag h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.quiz-opties {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-optie {
    padding: 16px;
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: left;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-optie:hover:not(.disabled) {
    border-color: var(--color-primary);
}

.quiz-optie.correct,
.quiz-optie.selected {
    border-color: var(--color-success);
    background: rgba(34, 197, 94, 0.1);
}

.quiz-optie.incorrect {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.1);
}

.quiz-optie.disabled {
    cursor: default;
    opacity: 0.6;
}

.quiz-feedback {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.quiz-feedback.correct {
    background: rgba(34, 197, 94, 0.2);
    color: var(--color-success);
}

.quiz-feedback.incorrect {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.quiz-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.quiz-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-border);
}

.quiz-dot.active {
    background: var(--color-primary);
}

.quiz-dot.correct {
    background: var(--color-success);
}

.quiz-dot.incorrect {
    background: var(--color-error);
}

/* Quiz Result */
.quiz-resultaat {
    text-align: center;
    padding: 24px 0;
}

.quiz-score-display {
    margin-bottom: 16px;
}

.score-groot {
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-primary);
}

.score-van {
    font-size: 2rem;
    color: var(--color-text-muted);
}

/* ==========================================
   Toekomst
   ========================================== */

.toekomst-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0 8px;
}

.timeline-punt {
    text-align: center;
}

.timeline-punt .jaar {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
}

.timeline-punt .label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.timeline-punt.active .jaar {
    color: var(--color-primary);
}

.timeline-lijn {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-border));
    margin: 0 8px;
}

.toekomst-vraag {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
}

.toekomst-vraag label {
    display: block;
    font-weight: 500;
    margin-bottom: 16px;
}

.toekomst-vraag textarea {
    width: 100%;
    min-height: 150px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: 1rem;
    resize: vertical;
}

.toekomst-vraag textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ==========================================
   Dashboard
   ========================================== */

.dashboard-content {
    padding-bottom: 48px;
}

.dashboard-back-bar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}

.dashboard-back-bar .back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
}

.dashboard-back-bar .back-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 32px;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--color-text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.dash-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
}

.dash-card h3 {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.dash-card.card-wide {
    grid-column: span 2;
}

.voortgang-cirkel {
    text-align: center;
}

.voortgang-cirkel .percentage {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.voortgang-cirkel .label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.score-display {
    text-align: center;
}

.score-display .jouw-score {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.score-display .label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.volkstelling-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sum-item {
    display: flex;
    justify-content: space-between;
}

.sum-label {
    color: var(--color-text-muted);
}

.sum-value {
    font-weight: 500;
}

.bezoekers-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.bezoeker-stat .stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.bezoeker-stat .stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================
   Modal
   ========================================== */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 360px;
    width: 100%;
    text-align: center;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.modal-content h3 {
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

/* Melding Modal */
.modal-melding {
    max-width: 400px;
}

.melding-tekst {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    text-align: left;
    line-height: 1.6;
}

.melding-tekst ul {
    margin: 12px 0;
    padding-left: 20px;
}

.melding-tekst li {
    margin-bottom: 6px;
}

/* Bevestig Modal */
.modal-bevestig {
    max-width: 400px;
}

.bevestig-knoppen {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.bevestig-knoppen .btn {
    min-width: 120px;
}

.sessie-code-box {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.sessie-code-box .code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-primary-light);
    word-break: break-all;
    margin-bottom: 12px;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dash-card.card-wide {
        grid-column: span 1;
    }
    
    .fc-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .fc-btn {
        width: 100%;
    }
}

/* ==========================================
   Wrapped Statistieken Modal - PowerPoint Style
   ========================================== */

#wrapped-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a0f;
    z-index: 2000;
    overflow: hidden;
}

.wrapped-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.wrapped-close {
    position: absolute;
    top: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 30;
    transition: all 0.3s ease;
}

.wrapped-close:hover {
    background: rgba(255,255,255,0.2);
}

.wrapped-slides {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.wrapped-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 24px 100px;
    overflow: hidden;
}

.wrapped-slide.active,
.wrapped-slide.leaving {
    display: flex;
}

/* Slide backgrounds - donker en elegant */
.wrapped-slide:nth-child(1) { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.wrapped-slide:nth-child(2) { background: linear-gradient(135deg, #0f3460, #1a1a2e); }
.wrapped-slide:nth-child(3) { background: linear-gradient(135deg, #16213e, #1a1a2e); }
.wrapped-slide:nth-child(4) { background: linear-gradient(135deg, #1e3a5f, #0f3460); }
.wrapped-slide:nth-child(5) { background: linear-gradient(135deg, #1a1a2e, #0f3460); }
.wrapped-slide:nth-child(6) { background: linear-gradient(135deg, #0f3460, #16213e); }
.wrapped-slide:nth-child(7) { background: linear-gradient(135deg, #16213e, #0f3460); }
.wrapped-slide:nth-child(8) { background: linear-gradient(135deg, #1a1a2e, #1e3a5f); }
.wrapped-slide:nth-child(9) { background: linear-gradient(135deg, #0f3460, #1a1a2e); }
.wrapped-slide:nth-child(10) { background: linear-gradient(135deg, #16213e, #1a1a2e); }

/* ===== TRANSITION: MORPH ===== */
.wrapped-slide[data-transition="morph"].active .wrapped-content {
    animation: morphIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wrapped-slide[data-transition="morph"].leaving .wrapped-content {
    animation: morphOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes morphIn {
    0% { 
        opacity: 0;
        transform: scale(0.8) translateY(40px);
        filter: blur(10px);
    }
    100% { 
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes morphOut {
    0% { 
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
    100% { 
        opacity: 0;
        transform: scale(1.1);
        filter: blur(10px);
    }
}

/* ===== TRANSITION: REVEAL ===== */
.wrapped-slide[data-transition="reveal"].active .wrapped-content {
    animation: revealIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wrapped-slide[data-transition="reveal"].leaving .wrapped-content {
    animation: revealOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes revealIn {
    0% { 
        opacity: 0;
        clip-path: inset(100% 0 0 0);
        transform: translateY(30px);
    }
    100% { 
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateY(0);
    }
}

@keyframes revealOut {
    0% { 
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
    100% { 
        opacity: 0;
        clip-path: inset(0 0 100% 0);
    }
}

/* ===== TRANSITION: SHATTER ===== */
.wrapped-slide[data-transition="shatter"].active .wrapped-content {
    animation: shatterIn 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wrapped-slide[data-transition="shatter"].leaving .wrapped-content {
    animation: shatterOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes shatterIn {
    0% { 
        opacity: 0;
        transform: perspective(1000px) rotateX(-15deg) scale(0.9);
        filter: blur(5px);
    }
    50% {
        transform: perspective(1000px) rotateX(5deg) scale(1.02);
    }
    100% { 
        opacity: 1;
        transform: perspective(1000px) rotateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes shatterOut {
    0% { 
        opacity: 1;
        transform: perspective(1000px) rotateX(0) scale(1);
    }
    100% { 
        opacity: 0;
        transform: perspective(1000px) rotateX(15deg) scale(0.85) translateY(-30px);
        filter: blur(8px);
    }
}

/* ===== TRANSITION: ZOOM ===== */
.wrapped-slide[data-transition="zoom"].active .wrapped-content {
    animation: zoomIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.wrapped-slide[data-transition="zoom"].leaving .wrapped-content {
    animation: zoomOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes zoomIn {
    0% { 
        opacity: 0;
        transform: scale(0) rotate(-5deg);
    }
    70% {
        transform: scale(1.1) rotate(2deg);
    }
    100% { 
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes zoomOut {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    100% { 
        opacity: 0;
        transform: scale(2);
        filter: blur(10px);
    }
}

/* ===== TRANSITION: FLIP ===== */
.wrapped-slide[data-transition="flip"].active .wrapped-content {
    animation: flipSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wrapped-slide[data-transition="flip"].leaving .wrapped-content {
    animation: flipSlideOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flipSlideIn {
    0% { 
        opacity: 0;
        transform: perspective(800px) rotateY(-90deg);
    }
    100% { 
        opacity: 1;
        transform: perspective(800px) rotateY(0);
    }
}

@keyframes flipSlideOut {
    0% { 
        opacity: 1;
        transform: perspective(800px) rotateY(0);
    }
    100% { 
        opacity: 0;
        transform: perspective(800px) rotateY(90deg);
    }
}

/* ===== TRANSITION: COMB (Kam) ===== */
.wrapped-slide[data-transition="comb"].active .wrapped-content {
    animation: combIn 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wrapped-slide[data-transition="comb"].leaving .wrapped-content {
    animation: combOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes combIn {
    0% { 
        opacity: 0;
        clip-path: polygon(
            0% 0%, 10% 0%, 10% 100%, 0% 100%,
            20% 0%, 30% 0%, 30% 100%, 20% 100%,
            40% 0%, 50% 0%, 50% 100%, 40% 100%,
            60% 0%, 70% 0%, 70% 100%, 60% 100%,
            80% 0%, 90% 0%, 90% 100%, 80% 100%
        );
        transform: translateX(-30px);
    }
    50% {
        clip-path: polygon(
            0% 0%, 20% 0%, 20% 100%, 0% 100%,
            20% 0%, 40% 0%, 40% 100%, 20% 100%,
            40% 0%, 60% 0%, 60% 100%, 40% 100%,
            60% 0%, 80% 0%, 80% 100%, 60% 100%,
            80% 0%, 100% 0%, 100% 100%, 80% 100%
        );
    }
    100% { 
        opacity: 1;
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        transform: translateX(0);
    }
}

@keyframes combOut {
    0% { 
        opacity: 1;
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    100% { 
        opacity: 0;
        clip-path: polygon(
            0% 0%, 10% 0%, 10% 100%, 0% 100%,
            20% 0%, 30% 0%, 30% 100%, 20% 100%,
            40% 0%, 50% 0%, 50% 100%, 40% 100%,
            60% 0%, 70% 0%, 70% 100%, 60% 100%,
            80% 0%, 90% 0%, 90% 100%, 80% 100%
        );
        transform: translateX(30px);
    }
}

/* Content */
.wrapped-content {
    text-align: center;
    color: white;
    max-width: 320px;
    position: relative;
    z-index: 1;
}

/* Staggered text animations within slides */
.wrapped-slide.active .wrapped-title {
    opacity: 0;
    animation: textFadeIn 0.6s ease forwards;
}

.wrapped-slide.active .wrapped-title:nth-child(1) { animation-delay: 0.2s; }
.wrapped-slide.active .wrapped-title:nth-child(2) { animation-delay: 0.4s; }

.wrapped-slide.active .wrapped-subtitle {
    opacity: 0;
    animation: textFadeIn 0.6s ease forwards;
    animation-delay: 0.6s;
}

.wrapped-slide.active .wrapped-label {
    opacity: 0;
    animation: textFadeIn 0.5s ease forwards;
    animation-delay: 0.1s;
}

.wrapped-slide.active .wrapped-big-number {
    opacity: 0;
    animation: numberPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

.wrapped-slide.active .wrapped-dier-naam {
    opacity: 0;
    animation: numberPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

.wrapped-slide.active .wrapped-answer {
    opacity: 0;
    animation: numberPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

.wrapped-slide.active .wrapped-stat {
    opacity: 0;
}
.wrapped-slide.active .wrapped-stat:nth-child(1) { animation: cardFlipIn 0.5s ease forwards; animation-delay: 0.3s; }
.wrapped-slide.active .wrapped-stat:nth-child(2) { animation: cardFlipIn 0.5s ease forwards; animation-delay: 0.45s; }
.wrapped-slide.active .wrapped-stat:nth-child(3) { animation: cardFlipIn 0.5s ease forwards; animation-delay: 0.6s; }

.wrapped-slide.active .wrapped-quiz-tempo {
    opacity: 0;
    animation: textFadeIn 0.5s ease forwards;
    animation-delay: 0.7s;
}

.wrapped-slide.active .wrapped-dier-type {
    opacity: 0;
    animation: textFadeIn 0.4s ease forwards;
    animation-delay: 0.6s;
}

@keyframes textFadeIn {
    0% { 
        opacity: 0;
        transform: translateY(20px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes numberPop {
    0% { 
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.05);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cardFlipIn {
    0% { 
        opacity: 0;
        transform: perspective(600px) rotateX(-60deg) translateY(20px);
    }
    100% { 
        opacity: 1;
        transform: perspective(600px) rotateX(0) translateY(0);
    }
}

/* Typography */
.wrapped-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 4px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
}

.wrapped-title.accent {
    background: linear-gradient(90deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wrapped-subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 16px;
}

.wrapped-label {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.wrapped-big-number {
    font-size: 6rem;
    font-weight: 900;
    margin: 16px 0;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wrapped-dier-naam {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.wrapped-dier-type {
    opacity: 0.6;
    font-size: 1rem;
}

.wrapped-answer {
    font-size: 4rem;
    font-weight: 900;
    margin: 24px 0;
}

/* Special emoji animations per slide */
.wrapped-slide:nth-child(1).active .wrapped-emoji {
    animation: rocketLaunch 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-delay: 0.4s;
}

@keyframes rocketLaunch {
    0% { opacity: 0; transform: translateY(100px) scale(0.5); }
    50% { transform: translateY(-20px) scale(1.1); }
    70% { transform: translateY(10px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.wrapped-slide:nth-child(4).active .wrapped-emoji {
    animation: animalBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-delay: 0.4s;
}

@keyframes animalBounce {
    0% { opacity: 0; transform: scale(0) rotate(-180deg); }
    60% { transform: scale(1.3) rotate(20deg); }
    80% { transform: scale(0.9) rotate(-10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.wrapped-slide:nth-child(7).active .wrapped-emoji {
    animation: confettiPop 1s ease forwards;
    animation-delay: 0.4s;
}

@keyframes confettiPop {
    0% { opacity: 0; transform: scale(0); }
    50% { transform: scale(1.5); }
    75% { transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.wrapped-big-number {
    font-size: 6rem;
    font-weight: 900;
    margin: 16px 0;
    text-shadow: 0 6px 30px rgba(0,0,0,0.4);
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wrapped-stat-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
    max-width: 280px;
}

.wrapped-stat {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wrapped-stat:hover {
    transform: scale(1.02);
}

.wrapped-stat .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
}

.wrapped-stat .stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wrapped-dier-naam {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.wrapped-dier-type {
    opacity: 0.85;
    font-size: 1rem;
    font-style: italic;
}

.wrapped-quiz-tempo {
    margin-top: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.wrapped-quiz-tempo p {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wrapped-quiz-tempo span {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Progress bar at top */
.wrapped-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    z-index: 20;
}

.wrapped-progress-segment {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.wrapped-progress-segment:hover {
    transform: scaleY(1.5);
    background: rgba(255,255,255,0.35);
}

.wrapped-progress-segment .fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.wrapped-progress-segment.completed .fill {
    width: 100%;
}

.wrapped-progress-segment.active .fill {
    animation: none;
}

/* Bottom bar met timer en skip */
.wrapped-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    z-index: 25;
}

/* Timer display */
.wrapped-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.85rem;
    opacity: 0.6;
}

.wrapped-timer-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Skip button */
.wrapped-skip {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wrapped-skip:hover {
    background: rgba(255,255,255,0.2);
}

/* Hide old nav */
.wrapped-nav {
    display: none;
}

.wrapped-dots {
    display: flex;
    gap: 10px;
}

.wrapped-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.wrapped-dots .dot:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.2);
}

.wrapped-dots .dot.active {
    background: white;
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(255,255,255,0.6);
}

/* ==========================================
   Publieke Statistieken op Homepage
   ========================================== */

.publieke-stats {
    margin-top: 32px;
    animation: fadeIn 0.5s ease;
}

.btn-back-stats {
    margin-bottom: 16px;
    padding: 8px 0;
}

.stats-header {
    text-align: center;
    margin-bottom: 24px;
}

.stats-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.stats-deelnemers {
    color: var(--color-primary-light);
    font-size: 0.9rem;
}

.stats-deelnemers span {
    font-weight: 700;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 500px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-card-wide {
        grid-column: span 2;
    }
}

.stats-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--color-border);
}

.stats-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.stats-icon {
    font-size: 1.25rem;
}

.stats-card-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.stats-card-content {
    min-height: 80px;
}

/* Gender bars */
.gender-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.gender-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gender-label {
    width: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.bar-track {
    flex: 1;
    height: 8px;
    background: var(--color-bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 4px;
    transition: width 1s ease;
    width: 0%;
}

.gender-count {
    width: 30px;
    text-align: right;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Age stats */
.age-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.age-stat {
    text-align: center;
    flex: 1;
    padding: 8px;
    background: var(--color-bg-light);
    border-radius: var(--radius-sm);
}

.age-label {
    display: block;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.age-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Big percentage */
.big-percentage {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 8px;
}

.percentage-value {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-success), #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.percentage-sign {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-success);
}

.percentage-label {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

/* Top dieren */
.top-dieren {
    display: flex;
    justify-content: space-around;
    gap: 12px;
}

.top-dier {
    text-align: center;
    flex: 1;
}

.dier-rank {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.dier-naam {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.dier-count {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Time stats */
.time-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.time-stat {
    text-align: center;
    flex: 1;
    padding: 10px 8px;
    background: var(--color-bg-light);
    border-radius: var(--radius-sm);
}

.time-stat.highlight-fast {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.time-stat.highlight-slow {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.time-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.time-label {
    display: block;
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

/* Yes/No chart */
.yes-no-chart {
    text-align: center;
}

.yes-no-bar {
    display: flex;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.yes-fill {
    background: linear-gradient(90deg, var(--color-success), #10b981);
    transition: width 1s ease;
}

.no-fill {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transition: width 1s ease;
}

.yes-no-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.yes-label {
    color: var(--color-success);
}

.no-label {
    color: var(--color-error);
}

/* Quiz total */
.quiz-total {
    text-align: center;
    margin-bottom: 16px;
}

.quiz-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Vraag bars */
.vraag-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vraag-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vraag-bar-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.vraag-bar-track {
    height: 8px;
    background: var(--color-bg-light);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.vraag-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 4px;
    transition: width 1s ease;
}

.vraag-bar-pct {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Tempo bars voor publieke stats */
.tempo-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tempo-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tempo-bar-label {
    flex: 0 0 140px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    text-align: right;
}

.tempo-bar-track {
    flex: 1;
    height: 20px;
    background: var(--color-bg-light);
    border-radius: 10px;
    overflow: hidden;
}

.tempo-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    border-radius: 10px;
    transition: width 1s ease;
}

.tempo-bar-pct {
    flex: 0 0 45px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-align: right;
}

@media (max-width: 480px) {
    .tempo-bar-label {
        flex: 0 0 100px;
        font-size: 0.7rem;
    }
    
    .tempo-bar-track {
        height: 16px;
    }
    
    .tempo-bar-pct {
        font-size: 0.75rem;
    }
}

/* ==========================================
   Toekomst Vraag - Multiple Choice
   ========================================== */

.toekomst-vraag-mc {
    text-align: center;
}

.toekomst-vraag-mc h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.4;
}

.toekomst-opties {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.toekomst-optie {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.toekomst-optie:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
}

.toekomst-optie.selected {
    border-color: var(--color-primary);
    background: rgba(37, 99, 235, 0.15);
}

.toekomst-optie .optie-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.toekomst-optie.selected .optie-letter {
    background: var(--color-primary);
    color: white;
}

.toekomst-optie .optie-tekst {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
}
