@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
ul, li { list-style: none; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #1e1e3f 0%, #3b3486 100%);
    padding: 18px 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header .title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px;
}

.quiz-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.q-progress { margin-bottom: 28px; }

.q-counter {
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

.q-total { color: #94a3b8; }

.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.ques {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.55;
    margin-bottom: 28px;
}

.option {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.option li { border-radius: 10px; cursor: pointer; }

.option li .option-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.18s, background 0.18s, transform 0.15s;
    height: 100%;
}

.option li:hover .option-content {
    border-color: #6366f1;
    background: #f5f3ff;
    transform: translateY(-1px);
}

.freeze li { pointer-events: none; }

.optn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.optn span {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.optn-name {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
}

li.right .option-content { border-color: #16a34a; background: #f0fdf4; }
li.right .optn { background: #16a34a; }
li.right .optn span { color: #fff; }
li.right .optn-name { color: #15803d; font-weight: 600; }

li.wrong .option-content { border-color: #dc2626; background: #fff1f2; }
li.wrong .optn { background: #dc2626; }
li.wrong .optn span { color: #fff; }
li.wrong .optn-name { color: #b91c1c; font-weight: 600; }

.answer-wrap {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.answer-title {
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.answer-desc {
    font-size: 14px;
    color: #334155;
    line-height: 1.65;
}

.load-quiz {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    font-family: inherit;
}

.load-quiz:hover { opacity: 0.9; transform: translateY(-1px); }

.score-card {
    background: #fff;
    border-radius: 16px;
    padding: 56px 40px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.score-icon { font-size: 56px; display: block; margin-bottom: 20px; }

.score-title {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
}

.score-value {
    font-size: 72px;
    font-weight: 800;
    color: #6366f1;
    line-height: 1;
}

.score-total-num { font-size: 36px; color: #94a3b8; }

.score-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 10px 0 16px;
}

.score-pct {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    padding: 6px 22px;
    border-radius: 20px;
    margin-bottom: 32px;
}

.pct-pass { background: #dcfce7; color: #16a34a; }
.pct-fail { background: #fee2e2; color: #dc2626; }

.retry-btn {
    display: inline-block;
    padding: 13px 40px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    font-family: inherit;
}

.retry-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 16px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
    .option { grid-template-columns: 1fr; }
    .quiz-card { padding: 28px 20px; }
    .ques { font-size: 17px; }
    .score-value { font-size: 56px; }
    .header { padding: 16px 20px; }
}
