* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    background: #0f172a;
    color: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app {
    background: #f9fafb;
    width: 100%;
    max-width: 900px;
    margin: 16px;
    border-radius: 16px;
    padding: 24px 24px 32px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

.score-box {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
}

.progress {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 8px;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0ea5e9, #22c55e);
    transition: width 0.25s ease-out;
}

.question-box {
    background: white;
    border-radius: 16px;
    padding: 20px 20px 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.4;
}

.question-number {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.option-btn {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    padding: 10px 14px;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease-out;
}

.option-label {
    font-weight: 600;
    width: 22px;
    text-align: center;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 2px 0;
    font-size: 0.8rem;
    background: #f3f4f6;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    color: #111827;
}

.option-btn:hover {
    border-color: #0ea5e9;
    background: #eff6ff;
    transform: translateY(-1px);
}

.option-btn.selected {
    border-color: #0ea5e9;
    background: #e0f2fe;
    box-shadow: 0 0 0 1px #0ea5e9;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    border-radius: 999px;
    border: none;
    padding: 9px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #0ea5e9;
    color: white;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: default;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: default;
}

.result-box {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #065f46;
    font-size: 0.95rem;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}

.result-box strong {
    font-size: 1.05rem;
}

.wrong-item {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #a7f3d0;
    font-size: 0.9rem;
}

.wrong-item .q {
    font-weight: 600;
    color: #064e3b;
    margin-bottom: 3px;
}

.wrong-item .a {
    color: #b91c1c;
}

.wrong-item .c {
    color: #166534;
}

.all-correct {
    margin-top: 10px;
    font-weight: 600;
}

#retryBtn {
    margin-top: 8px;
}

.note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Jawaban Benar */
.option-btn.correct {
    background: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
    font-weight: 600;
}

/* Jawaban Salah */
.option-btn.wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #7f1d1d !important;
    font-weight: 600;
}

/* Matikan hover supaya tidak ganggu warna */
.option-btn.correct:hover,
.option-btn.wrong:hover {
    transform: none;
    background: inherit;
}


@media (max-width: 600px) {
    .app {
    padding: 16px 14px 20px;
    }

    .title {
    font-size: 1.1rem;
    }

    .option-btn {
    font-size: 0.9rem;
    }
}