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

:root {
    --gold: #ffd700;
    --gold-dark: #b8960b;
    --champagne: #f7e7ce;
    --success: #4caf50;
    --error: #ff6b6b;
    --bg: #0a0a1a;
    --surface: #12122a;
    --text: #fff;
    --text-muted: #b8b8d0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Starfield background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, var(--gold), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--champagne), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, var(--gold), transparent),
        radial-gradient(1px 1px at 160px 120px, var(--champagne), transparent),
        radial-gradient(2px 2px at 200px 50px, white, transparent),
        radial-gradient(1px 1px at 250px 160px, var(--gold), transparent),
        radial-gradient(2px 2px at 300px 100px, var(--champagne), transparent),
        radial-gradient(1px 1px at 350px 70px, white, transparent),
        radial-gradient(2px 2px at 400px 140px, var(--gold), transparent);
    background-size: 400px 200px;
    animation: twinkle 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gold), var(--champagne), var(--gold));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg);
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn:hover, .btn:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: none;
    transform: none;
}

/* Decorative elements */
.sparkle {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Stage specific styles */
.stage-header {
    margin-bottom: 2rem;
}

.stage-number {
    background: linear-gradient(135deg, var(--surface), #1a1a3a);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--gold);
}

.stage-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Quiz styles */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.btn-quiz {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.125rem;
    background: var(--surface);
    border: 2px solid rgba(255, 215, 0, 0.3);
    color: var(--text);
    box-shadow: none;
}

.btn-quiz:hover {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    transform: none;
    box-shadow: none;
}

.quiz-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.btn-emoji {
    font-size: 2rem;
    padding: 1.5rem;
}

.quiz-options.answered .btn-quiz {
    pointer-events: none;
    opacity: 0.5;
}

.quiz-options.answered .btn-quiz.correct {
    opacity: 1;
    border-color: var(--success);
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
}

.quiz-options.answered .btn-quiz.wrong {
    opacity: 1;
    border-color: var(--error);
    background: rgba(255, 107, 107, 0.2);
    color: var(--error);
}

/* Result section */
.result {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease;
}

.result.hidden {
    display: none;
}

.result-answer {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.result-detail {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

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

/* Confetti animation */
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: 0;
    z-index: 100;
    pointer-events: none;
}

/* Year display */
.year {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--champagne));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

/* Final page stats */
.stats-card {
    background: var(--surface);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1rem 0 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.final-message {
    font-size: 1.25rem;
    color: var(--text);
    margin: 1.5rem 0;
}
