/**
 * Trivia Quiz - Styling
 * Clips & Paper Branding - Clean Design zoals Galgje
 */

:root {
    /* Clips & Paper Groene Branding */
    --primary: #10B981;      /* Emerald green */
    --secondary: #059669;    /* Donker groen */
    --accent-orange: #f97316; /* Oranje voor buttons */
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ffc107;
    --info: #2196f3;
    --dark: #2d3748;
    --light: #f7fafc;
    --bg-light: #f0f4f8;     /* Lichte achtergrond */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-light);  /* WIT/GRIJS - niet groen! */
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* ============================================================================
   CLIPS & PAPER HEADER
   ============================================================================ */

.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    margin-bottom: 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.5em;
    line-height: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.9em;
    color: #718096;
    font-weight: 500;
}

.home-link {
    padding: 8px 16px;
    background: var(--light);
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.home-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    animation: fadeIn 0.3s ease-in;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   HOME SCREEN
   ============================================================================ */

#home-screen {
    text-align: center;
    padding: 40px 20px;
}

h1 {
    color: var(--dark);  /* Donker ipv wit! */
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #718096;  /* Grijs ipv wit! */
    font-size: 1.2em;
    margin-bottom: 30px;
}

.info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.info-box {
    background: white;  /* Wit ipv transparant */
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-box .icon {
    font-size: 2em;
}

.info-box strong {
    display: block;
    font-size: 1.1em;
    color: var(--dark);  /* Donker */
}

.info-box small {
    color: #718096;  /* Grijs */
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.form-card h3 {
    color: var(--dark);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    color: #718096;
    margin-top: 5px;
    font-size: 0.9em;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-orange);  /* ORANJE zoals Galgje! */
    color: white;
}

.btn-primary:hover {
    background: #ea580c;  /* Donkerder oranje */
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--dark);
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Hall of Fame */
.hall-of-fame {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.hall-of-fame h3 {
    color: var(--dark);
    margin-bottom: 20px;
    text-align: left;
}

.hof-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.hof-tab {
    flex: 1;
    padding: 12px;
    background: #f7fafc;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.hof-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    padding: 10px;
    color: var(--dark);
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.leaderboard-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.leaderboard-table tr.rank-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
}

.leaderboard-table tr.rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), transparent);
}

.leaderboard-table tr.rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent);
}

.empty-state {
    text-align: center;
    color: #718096;
    padding: 40px 20px;
    font-style: italic;
}

/* ============================================================================
   GAME SCREEN
   ============================================================================ */

#game-screen {
    max-width: 700px;
    margin: 0 auto;
}

.game-header {
    background: white;  /* Wit ipv transparant */
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-progress {
    flex: 1;
}

.game-progress > span {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 10px;
    display: block;
    color: var(--dark);  /* Donker */
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;  /* Lichtgrijs */
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-orange);  /* Oranje! */
    transition: width 0.3s;
}

.game-timer {
    font-size: 1.5em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);  /* Donker */
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.question-type {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);  /* Groen */
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 20px;
}

#question-text {
    color: var(--dark);
    font-size: 1.5em;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* Open Question */
#open-answer-container input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1em;
    margin-bottom: 20px;
    transition: all 0.3s;
}

#open-answer-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#open-answer-container input:disabled {
    background: #f7fafc;
    cursor: not-allowed;
}

/* Multiple Choice */
.mc-options {
    display: grid;
    gap: 15px;
}

.mc-option {
    padding: 20px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1em;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
}

.mc-option:hover:not(:disabled) {
    background: #e2e8f0;
    border-color: var(--primary);
    transform: translateX(5px);
}

.mc-option:disabled {
    cursor: not-allowed;
}

.mc-option.correct {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.mc-option.incorrect {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Feedback */
.feedback {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}

.feedback.success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
}

.feedback.error {
    background: rgba(244, 67, 54, 0.2);
    color: var(--danger);
}

.feedback.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #f57c00;
}

.feedback.info {
    background: rgba(33, 150, 243, 0.2);
    color: var(--info);
}

/* ============================================================================
   RESULTS SCREEN
   ============================================================================ */

#results-screen {
    max-width: 600px;
    margin: 0 auto;
}

.results-card {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.results-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.results-card h1 {
    color: var(--dark);
    margin-bottom: 30px;
}

.score-display {
    margin-bottom: 30px;
}

.score-big {
    font-size: 5em;
    font-weight: 700;
    color: var(--primary);  /* Groen - geen gradient */
}

.score-label {
    color: #718096;
    font-size: 1.2em;
    margin-top: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--dark);
}

.stat-label {
    color: #718096;
    margin-top: 5px;
}

.rewards-message {
    background: rgba(16, 185, 129, 0.1);  /* Licht groen */
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary);
}

.rewards-message .icon {
    font-size: 1.5em;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ============================================================================
   LOADING
   ============================================================================ */

.loading-container {
    text-align: center;
    padding: 100px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-style: italic;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    /* Header responsive */
    .site-header {
        padding: 12px 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .logo-icon {
        font-size: 2em;
    }
    
    .brand-name {
        font-size: 1.2em;
    }
    
    .home-link {
        font-size: 0.9em;
        padding: 6px 12px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .info-boxes {
        grid-template-columns: 1fr;
    }
    
    .form-card,
    .hall-of-fame,
    .question-card,
    .results-card {
        padding: 20px;
    }
    
    #question-text {
        font-size: 1.2em;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
