#quizApp {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Poppins', sans-serif;
    background: radial-gradient(circle at 10% 30%, #f8fafc, #eef2ff);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#quizApp .quiz-app {
    max-width: 1000px;
    width: 90%;
    margin: 1rem auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(2px);
    border-radius: 2rem;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* halaman utama & hasil */
#quizApp .page {
    padding: 1.5rem;
    width: 100%;
    min-width: unset;        /* hapus batasan lebar minimum kaku */
}

/* sembunyikan halaman */
#quizApp .hidden {
    display: none !important;
}

/* Hero title */
#quizApp .hero-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff5f0, #fff);
    color: #b91c1c;
    letter-spacing: -0.02em;
    padding: 1rem 1.2rem;
    border-radius: 1.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    border: 1px solid rgba(255,200,180,0.4);
}

#quizApp .sub {
    color: #334155;
    border-left: 5px solid #f97316;
    padding-left: 1rem;
    margin: 1rem 0 1.5rem 0;
    font-weight: 500;
    font-size: 0.95rem;
}

/* panel pengaturan (grid responsif) */
#quizApp .settings-panel {
    background: #ffffffdd;
    backdrop-filter: blur(4px);
    padding: 1.2rem 1.5rem;
    border-radius: 1.5rem;
    margin: 1.2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eef2ff;
    box-shadow: 0 5px 12px -8px rgba(0,0,0,0.05);
}

#quizApp .setting-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: #f9fbfe;
    padding: 0.3rem 1rem 0.3rem 1.2rem;
    border-radius: 2rem;
}

.setting-item label {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9rem;
}

#quizApp select,
#quizApp .toggle-switch {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

#quizApp select:hover,
#quizApp .toggle-switch:hover {
    border-color: #f97316;
    background: #fffaf5;
}

#quizApp .toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
}

/* tombol start */
#quizApp .btn-start {
    background: linear-gradient(95deg, #1e293b, #0f172a);
    color: white;
    border: none;
    padding: 0.85rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 3rem;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 8px 18px -8px rgba(0,0,0,0.2);
    transform: translateY(0);
}

#quizApp .btn-start:active {
    transform: scale(0.98);
    box-shadow: 0 3px 8px -4px rgba(0,0,0,0.2);
}

/* header kuis */
#quizApp .quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: #fffaf0;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

#quizApp .quiz-title-click {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    background: none;
    border: none;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#quizApp .quiz-title-click:hover {
    color: #f97316;
    text-decoration: none;
    transform: translateX(3px);
}

#quizApp .stats {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: #ffffffcc;
    backdrop-filter: blur(4px);
    padding: 0.3rem 1rem;
    border-radius: 2rem;
}

#quizApp .stat-badge {
    font-weight: 600;
    background: white;
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#quizApp .timer-box {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    background: #1e293b;
    color: #facc15;
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* teks pertanyaan */
#quizApp .question-text {
    font-size: clamp(1.25rem, 5vw, 1.8rem);
    font-weight: 700;
    margin: 0.5rem 0 1.5rem 0;
    line-height: 1.35;
    color: #0c4a6e;
    background: #fefce8;
    padding: 0.8rem 1rem;
    border-radius: 1.2rem;
}

/* pilihan jawaban - grid lebih modern */
#quizApp .options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}

#quizApp .option-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    text-align: left;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

#quizApp .option-btn:hover:not(:disabled) {
    background: #fef9c3;
    border-color: #facc15;
    transform: translateX(6px);
    box-shadow: 0 8px 18px -12px rgba(0,0,0,0.2);
}

#quizApp .option-prefix {
    font-weight: 800;
    background: #f1f5f9;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 40%;
    font-size: 1rem;
    transition: 0.2s;
}

.option-btn:hover .option-prefix {
    background: #f97316;
    color: white;
}

/* feedback jawaban */
#quizApp .correct-feedback,
#quizApp .wrong-feedback {
    padding: 0.9rem 1.2rem;
    border-radius: 1.2rem;
    margin: 0.8rem 0;
    font-weight: 500;
    backdrop-filter: blur(2px);
}

#quizApp .correct-feedback {
    background: #dcfce7;
    color: #166534;
    border-left: 6px solid #22c55e;
}

#quizApp .wrong-feedback {
    background: #fee2e2;
    color: #991b1b;
    border-left: 6px solid #ef4444;
}

#quizApp .explanation-text {
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
    opacity: 0.9;
}

/* tombol next */
#quizApp .next-btn {
    background: linear-gradient(105deg, #f97316, #ea580c);
    border: none;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 2.5rem;
    color: white;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(249,115,22,0.3);
}

#quizApp .next-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

#quizApp .next-btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* skor summary */
#quizApp .score-summary {
    background: linear-gradient(125deg, #1e293b, #0f172a);
    color: white;
    padding: 1.8rem;
    border-radius: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 20px -10px rgba(0,0,0,0.2);
}

#quizApp .score-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #facc15, #f97316);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
}

/* daftar review */
#quizApp .review-list {
    max-height: 380px;
    overflow-y: auto;
    margin: 1rem 0 1.5rem;
    border-radius: 1.2rem;
    padding: 0.4rem;
    background: #f8fafc;
}

#quizApp .review-item {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-left: 6px solid #94a3b8;
    transition: 0.1s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#quizApp .review-correct {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

#quizApp .review-wrong {
    border-left-color: #ef4444;
    background: #fef2f2;
}

/* tombol main lagi */
#quizApp .btn-playagain {
    background: #2d3a5e;
    color: white;
    border: none;
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 3rem;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

#quizApp .btn-playagain:hover {
    background: #f97316;
    transform: translateY(-2px);
}

/* highlight jawaban */
#quizApp .option-correct-highlight {
    background: #bbf7d0 !important;
    border-color: #15803d !important;
    box-shadow: 0 0 0 2px #22c55e40;
}

#quizApp .option-wrong-highlight {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    text-decoration: line-through;
    opacity: 0.7;
}

/* ========== RESPONSIVE (mobile friendly) ========== */
@media (max-width: 680px) {
     #quizApp {
        padding: 0.5rem;
    }
    #quizApp .quiz-app {
        width: 100%;
        border-radius: 1.5rem;
    }
    #quizApp .page {
        padding: 0.5rem;
    }
    #quizApp .settings-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0.5rem;
    }
    #quizApp .setting-item {
        justify-content: space-between;
        width: 100%;
    }
    #quizApp .quiz-header {
        flex-direction: column;
        align-items: flex-start;
    }
    #quizApp .stats {
        align-self: flex-start;
    }
    #quizApp .option-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    .option-prefix {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    #quizApp .question-text {
        font-size: 1.2rem;
        padding: 0.7rem;
    }
    #quizApp .score-number {
        font-size: 2.5rem;
    }
    #quizApp .hero-title {
        text-align: center;
    }
}

/* untuk tablet dan layar sedang */
@media (min-width: 681px) and (max-width: 900px) {
    #quizApp .quiz-app {
        width: 95%;
    }
    #quizApp .settings-panel {
        gap: 1.2rem;
    }
}

/* sentuhan modern : transisi halus untuk semua interaksi */
#quizApp button,
#quizApp .option-btn,
#quizApp select {
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* efek glass tambahan untuk container */
#quizApp .quiz-app {
    backdrop-filter: blur(0px);
    background: rgba(255, 255, 255, 0.96);
}

/* scrollbar modern */
#quizApp .review-list::-webkit-scrollbar {
    width: 6px;
}
#quizApp .review-list::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 8px;
}
#quizApp .review-list::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 8px;
}