
:root {
    --bg: #f6f8fb;
    --card: #fff;
    --accent: #0b76ef;
    --muted: #6b7280;
    --correct: #10b981;
    --wrong: #ef4444;
    --warning: #f59e0b;
    --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: #111;
    line-height: 1.6;
}

.container {
    max-width: 980px;
    margin: 28px auto;
    padding: 18px;
}

.card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(12, 18, 28, 0.06);
    padding: 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 16px;
}

h2 {
    margin: 0;
    font-family: var(--font);
    font-weight: 700;
    color: #1f2937;
}

.meta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.scorebox {
    text-align: right;
    font-family: var(--font);
}

.scorebox div:first-child {
    font-size: 14px;
    color: var(--muted);
}

.scorebox div:last-child {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
}

.question-box {
    margin-top: 16px;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eef2f6;
    background: #fbfbfe;
}

.choices {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.choice {
    padding: 16px;
    border-radius: 8px;
    border: 2px solid #e6eefb;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    font-family: var(--font);
}

.choice:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 118, 239, 0.1);
}

.choice.correct {
    border-color: var(--correct);
    background-color: rgba(16, 185, 129, 0.05);
}

.choice.wrong {
    border-color: var(--wrong);
    background-color: rgba(239, 68, 68, 0.05);
}

.choice.skipped {
    border-color: var(--warning);
    background-color: rgba(245, 158, 11, 0.05);
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn {
    background: var(--accent);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: var(--font);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 118, 239, 0.2);
}

.btn.secondary {
    background: #fff;
    color: var(--accent);
    border: 2px solid #dbeafe;
}

.btn.secondary:hover {
    background: #f0f7ff;
}

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

.btn.warning:hover {
    background: #e78b08;
}

.btn.success {
    background: var(--correct);
    color: white;
}

.btn.success:hover {
    background: #0da271;
}

.jump-panel {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jump-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e6eefb;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.jump-btn:hover {
    border-color: var(--accent);
    background: #f0f7ff;
}

.jump-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.jump-btn.answered {
    background: var(--correct);
    color: white;
    border-color: var(--correct);
}

.jump-btn.skipped {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.rationale {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-family: var(--font);
}

.rationale b {
    color: var(--correct);
}

.timer {
    font-weight: 600;
    color: var(--accent);
    font-size: 18px;
}

.math-container {
    margin: 10px 0;
}

/* Result Page Styles */
.result-container {
    text-align: center;
    padding: 40px 20px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0%, #e5e7eb 0%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-inner {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.score-percent {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
}

.score-text {
    font-size: 14px;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
}

.comment-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 24px;
    border-radius: 12px;
    margin: 30px 0;
    border-left: 4px solid var(--accent);
}

.comment-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 12px;
}

.answers-section {
    margin-top: 40px;
    text-align: left;
}

.answer-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #e5e7eb;
}

.answer-item.correct {
    border-left-color: var(--correct);
}

.answer-item.wrong {
    border-left-color: var(--wrong);
}

.answer-item.skipped {
    border-left-color: var(--warning);
}

.question-number {
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 8px;
}

.user-answer {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f8fafc;
}

.user-answer.correct {
    background: rgba(16, 185, 129, 0.1);
    color: var(--correct);
}

.user-answer.wrong {
    background: rgba(239, 68, 68, 0.1);
    color: var(--wrong);
}

.user-answer.skipped {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.math-equation {
    display: inline-block;
    margin: 2px 0;
}

/* Instruction Page Styles */
.instruction-container {
    text-align: center;
    padding: 40px 20px;
}

.instruction-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.instruction-list {
    text-align: left;
    max-width: 600px;
    margin: 30px auto;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.instruction-number {
    background: var(--accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.user-form {
    max-width: 400px;
    margin: 30px auto;
    text-align: left;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    font-family: var(--font);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-note {
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
        margin: 12px auto;
    }
    
    .card {
        padding: 16px;
    }
    
    header {
        flex-direction: column;
        gap: 12px;
    }
    
    .scorebox {
        text-align: left;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .instruction-list {
        margin: 20px 0;
        padding: 16px;
    }
}