:root {
    --primary: #3b82f6;
    --success: #22c55e;
    --danger: #ef4444;
    --background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    min-height: 100vh;
    background: var(--background);
    padding: 1rem;
}

.quiz-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.score-box, .timer-box {
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.question-box {
    margin: 2rem 0;
    text-align: center;
}

.question-text {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.answers-grid {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.answer-btn {
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.answer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.answer-btn.correct {
    background: #f0fdf4;
    border-color: var(--success);
    color: var(--success);
}

.answer-btn.wrong {
    background: #fef2f2;
    border-color: var(--danger);
    color: var(--danger);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.leaderboard h2 {
    margin-bottom: 1rem;
}

.leaderboard ul {
    list-style: none;
}

.leaderboard li {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}