/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red: #c41e3a;
    --red-dark: #9b1830;
    --blue: #002868;
    --blue-light: #1a4a8a;
    --gold: #f5c518;
    --gold-dark: #d4a50a;
    --white: #ffffff;
    --off-white: #f8f6f1;
    --gray-100: #f0eeea;
    --gray-200: #e0ddd6;
    --gray-400: #a09d96;
    --gray-600: #6b6860;
    --gray-800: #3a3835;
    --green: #2d8a4e;
    --green-bg: #e8f5e9;
    --red-bg: #fce4ec;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--off-white);
    color: var(--gray-800);
    min-height: 100vh;
    overflow-x: hidden;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* ===== Screens ===== */
.app {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen {
    display: none;
    width: 100%;
    max-width: 640px;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

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

/* ===== Home Screen ===== */
.home-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--red);
}

.trump-emoji {
    font-size: 72px;
    margin-bottom: 12px;
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.home-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--blue);
    line-height: 1.1;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 20px;
}

.description {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 24px;
}

.home-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
    font-size: 0.95rem;
    color: var(--gray-600);
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--gray-400);
    font-style: italic;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 14px 28px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-light);
    box-shadow: var(--shadow-md);
}

.btn-large {
    font-size: 1.15rem;
    padding: 18px 48px;
    border-radius: 60px;
}

.answer-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-true, .btn-false {
    flex: 1;
    padding: 18px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
}

.btn-true {
    background: var(--green);
    color: var(--white);
}

.btn-true:hover {
    background: #247a42;
    box-shadow: var(--shadow-sm);
}

.btn-false {
    background: var(--red);
    color: var(--white);
}

.btn-false:hover {
    background: var(--red-dark);
    box-shadow: var(--shadow-sm);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Game Screen ===== */
.game-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.score-display {
    background: var(--blue);
    color: var(--gold);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 40px;
    white-space: nowrap;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    min-width: 80px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--gold));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.question-counter {
    font-size: 0.9rem;
    color: var(--gray-400);
    white-space: nowrap;
}

.game-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--gold);
    animation: slideIn 0.35s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.quote-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-400);
    font-weight: 600;
    margin-bottom: 16px;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--gray-800);
    padding: 0;
    border: none;
    position: relative;
}

.quote-text::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--gold);
    position: absolute;
    top: -20px;
    left: -10px;
    font-family: 'Playfair Display', serif;
    opacity: 0.4;
}

/* ===== Result Panel ===== */
.result-panel {
    margin-top: 28px;
    animation: fadeIn 0.4s ease;
}

.result-panel.hidden {
    display: none;
}

.result-banner {
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.result-banner.correct {
    background: var(--green-bg);
    color: var(--green);
    border: 2px solid var(--green);
}

.result-banner.wrong {
    background: var(--red-bg);
    color: var(--red);
    border: 2px solid var(--red);
}

.result-context {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--gray-600);
}

.result-context .context-label {
    font-weight: 700;
    color: var(--blue);
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-context .context-date {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.result-context .context-source {
    font-style: italic;
    color: var(--gray-400);
    font-size: 0.85rem;
    margin-top: 8px;
    display: block;
}

#btn-next {
    width: 100%;
    padding: 16px;
}

/* ===== End Screen ===== */
.end-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--gold);
}

.end-emoji {
    font-size: 80px;
    margin-bottom: 16px;
}

.end-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--blue);
    margin-bottom: 20px;
}

.end-score {
    margin-bottom: 24px;
}

.end-score-num {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--red);
}

.end-score-label {
    font-size: 1rem;
    color: var(--gray-400);
}

.end-message {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 28px;
    padding: 0 16px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .app {
        padding: 12px;
        align-items: flex-start;
        padding-top: 24px;
    }

    .home-card, .game-card, .end-card {
        padding: 28px 20px;
    }

    .home-card h1 {
        font-size: 2.2rem;
    }

    .quote-text {
        font-size: 1.1rem;
    }

    .answer-buttons {
        flex-direction: column;
    }

    .game-header {
        gap: 10px;
    }

    .trump-emoji {
        font-size: 56px;
    }
}
