/* --- Reset & Pengaturan Dasar --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #eef1f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    flex-direction: column;
}

/* --- Container Utama & Animasi --- */
.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.07);
    width: 100%;
    max-width: 700px;
    text-align: center;
    border: 1px solid #e7eaf3;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.container.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

h1 i, h2 i {
    color: #007bff;
    margin-right: 10px;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 30px 0;
}

/* --- Gaya Umum Tombol --- */
button {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 123, 255, 0.3);
}

button:disabled {
    background: linear-gradient(45deg, #b4cde6, #a3b8cc);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(-1px);
}

button[hidden] {
    display: none;
}

button.submit-btn {
    background: linear-gradient(45deg, #28a745, #218838);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

button.submit-btn:disabled {
    background: linear-gradient(45deg, #a3d3ab, #8fbc98);
}

button.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

button.btn-secondary:hover {
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
}

/* --- Penyesuaian Tombol Halaman Depan --- */
.start-screen-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.start-screen-buttons button {
    flex: 1;
    max-width: 220px;
}

/* --- Halaman Kuis --- */
.progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 10px;
    margin-bottom: 30px;
    height: 10px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #007bff, #00c6ff);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

#question {
    font-size: 24px;
    font-weight: 600;
}

.options {
    display: grid;
    gap: 15px;
    margin-top: 30px;
    text-align: left;
}

.option {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    transform: translateX(5px);
    border-color: #007bff;
}

.option.selected {
    background-color: #cce5ff;
    border-color: #007bff;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.1);
}

.quiz-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.quiz-footer:has(#prev-button:not([hidden])) {
    justify-content: space-between;
}

/* --- Halaman Skor & Koreksi --- */
#score {
    font-size: 80px;
    font-weight: 700;
    color: #007bff;
    margin: 15px 0;
}

#review-container {
    text-align: left;
    margin-top: 20px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 15px;
}

.review-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.review-item p {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 18px;
}

.review-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.review-option.user-answer.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.review-option.user-answer.incorrect .fa-times {
    color: #721c24;
}

.review-option.correct-answer {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
    font-weight: bold;
}

.review-option.correct-answer .fa-check {
    color: #155724;
}

.score-footer-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* --- Gaya Scrollbar (Opsional) --- */
#review-container::-webkit-scrollbar {
    width: 8px;
}
#review-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
#review-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
#review-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* --- Penyesuaian Header Kuis untuk Timer --- */
.quiz-header {
    margin-bottom: 25px;
}

.quiz-meta {
    display: flex;
    align-items: center;
    margin-top: 15px;
    color: #6c757d;
    width: 100%;
}

#timer {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 8px;
    background-color: #e9ecef;
    transition: all 0.3s ease;
    margin-left: auto;
}

#timer i {
    margin-right: 5px;
}

#timer.time-warning {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: 600;
}

/* --- Gaya Card Penjelasan Website (About Section) --- */
.about-section {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 700px;
    text-align: center;
    border: 1px solid #e7eaf3;
    margin-top: 30px;
    margin-bottom: 30px;
}

.about-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.about-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #007bff, #00c6ff);
    border-radius: 1.5px;
}

.about-section p {
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 15px;
}

.about-section p strong {
    color: #007bff;
    font-weight: 600;
}

.about-section p:last-of-type {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 700;
    color: #343a40;
}

/* --- Responsivitas --- */
@media (max-width: 768px) {
    .about-section {
        padding: 25px;
        margin-top: 25px;
    }
    .about-section h2 {
        font-size: 20px;
    }
    .about-section p {
        font-size: 14px;
    }
    .about-section p:last-of-type {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .quiz-footer {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .quiz-footer button {
        width: 100%;
        margin: 0;
    }
}

/* --- Penyesuaian untuk Fitur Waktu Habis --- */
.option.disabled {
    cursor: not-allowed;
    background-color: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
}

.option.disabled:hover {
    transform: none;
}

.review-status-timeup, .review-status-skipped {
    display: block;
    text-align: left;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 6px;
}

.review-status-timeup {
    color: #721c24;
    background-color: #f8d7da;
}

.review-status-skipped {
    color: #856404;
    background-color: #fff3cd;
}