
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --success-bg: #f0fdf4;
    --error: #ef4444;
    --error-bg: #fef2f2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container { width: 100%; max-width: 640px; margin: auto; }
.hidden { display: none !important; }

header { margin-bottom: 24px; }
h1 { font-size: 24px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }

.progress-container { font-size: 14px; color: var(--text-muted); }
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}
#progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

h2 { font-size: 18px; line-height: 1.5; margin-bottom: 24px; }

.option-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border: 2px solid var(--bg);
    background: #f1f5f9;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    transition: all 0.2s;
}
.option-btn:hover { background: #e2e8f0; }
.option-btn.selected {
    border-color: var(--primary);
    background: #eef2ff;
    color: var(--primary);
}
.option-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 600;
}
.selected .option-marker {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

#next-btn, #retry-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
#next-btn:hover, #retry-btn:hover { background: var(--primary-hover); }
#next-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

/* Results Styles */
.text-center { text-align: center; }
.score-circle { margin-bottom: 24px; }
#final-score { display: block; font-size: 48px; font-weight: 800; color: var(--text); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.stat-box { padding: 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); }
.stat-val { display: block; font-size: 20px; font-weight: 700; }
.stat-label { font-size: 12px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.stat-box.correct .stat-val { color: var(--success); }
.stat-box.incorrect .stat-val { color: var(--error); }

.review-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.review-item.correct { border-left-color: var(--success); }
.review-item.incorrect { border-left-color: var(--error); }
.review-q { font-weight: 600; margin-bottom: 12px; display: block; }
.review-opt { padding: 8px 12px; border-radius: 6px; font-size: 14px; margin-bottom: 4px; display: flex; justify-content: space-between;}
.review-opt.is-correct { background: var(--success-bg); color: #15803d; }
.review-opt.is-wrong { background: var(--error-bg); color: #b91c1c; }
.explanation { margin-top: 12px; font-size: 14px; color: var(--text-muted); background: #f8fafc; padding: 10px; border-radius: 6px; }
      