:root {
    --primary: #4318FF;
    --primary-hover: #3311DB;
    --bg-color: #F4F7FE;
    --card-bg: #FFFFFF;
    --text-main: #1B254B;
    --text-muted: #A3AED0;
    --success: #01B574;
    --danger: #EE5D50;
    --border: #E0E5F2;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 50px 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    user-select: none;
}

.container {
    max-width: 800px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.header p {
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 5px;
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0px 18px 40px rgba(112, 144, 176, 0.12);
    margin-bottom: 25px;
}

.form-title {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 20px; }

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-main);
}

input, select {
    width: 100%;
    padding: 15px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    transition: 0.3s;
    background: #F4F7FE;
    color: var(--text-main);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B254B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 45px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: #FFF;
    box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.1);
}

.input-disabled { background: #E9EDF7; color: var(--text-muted); cursor: not-allowed; }

button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }

.btn-submit { background: var(--success); color: white; }
.btn-submit:hover { background: #019A62; }

.btn-reset { background: #E9EDF7; color: var(--text-main); margin-top: 12px; }
.btn-reset:hover { background: #D8E0F3; }

.loader-container { text-align: center; padding: 50px 20px; }
.loader-circle {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px; height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loader-title { font-size: 22px; margin-bottom: 15px; color: var(--text-main); }
.progress-box {
    background: #F4F7FE;
    display: inline-block;
    padding: 15px 30px;
    border-radius: 16px;
    margin-bottom: 15px;
}
.progress-number { font-size: 36px; font-weight: 800; color: var(--primary); }
.progress-total { font-size: 18px; font-weight: 600; color: var(--text-muted); margin-left: 5px; }
.loader-text { color: var(--text-muted); font-size: 14px; }

.soal-item {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0px 18px 40px rgba(112, 144, 176, 0.12);
    margin-bottom: 25px;
}

.soal-badge {
    display: inline-block;
    background: var(--bg-color);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 15px;
}

.pertanyaan {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 25px;
}

.opsi-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.2s ease;
    font-weight: 500;
    color: var(--text-main);
}

.opsi-label:hover { border-color: #CBD5E1; background: #F9FAFB; }
.opsi-label input { display: none; }
.custom-radio {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid #CBD5E1;
    margin-right: 15px;
    position: relative;
    transition: 0.2s;
    flex-shrink: 0;
}
.opsi-label.selected {
    border-color: var(--primary);
    background: rgba(67, 24, 255, 0.04);
}
.opsi-label.selected .custom-radio { border-color: var(--primary); }
.opsi-label.selected .custom-radio::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    background: var(--primary);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.pembahasan-box {
    display: none;
    margin-top: 25px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(1, 181, 116, 0.1);
    border: 1px solid rgba(1, 181, 116, 0.2);
    font-size: 15px;
    line-height: 1.7;
    color: #019A62;
}

.pembahasan-box strong { color: var(--success); display: block; margin-bottom: 10px; font-size: 16px; }

#hasil-skor {
    display: none;
    text-align: center;
    padding: 40px;
}
.skor-angka { font-size: 64px; font-weight: 800; color: var(--primary); line-height: 1; }
.skor-subtitle { display: block; margin-top: 15px; color: var(--text-muted); font-size: 18px; font-weight: 500; }
.action-bar { display: flex; flex-direction: column; gap: 10px; }



.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 15px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
}
body { padding-top: 100px; }

/* Transisi mulus untuk nav-links */
.nav-links { 
    display: flex; 
    gap: 10px; 
    transition: all 0.4s ease-in-out;
}

/* Tombol menu disembunyikan di versi PC */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
    transition: 0.3s;
}

.menu-toggle:hover { color: var(--primary); }
.nav-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    background: #F4F7FE;
    color: var(--text-main);
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: 0.3s;
}
.nav-btn:hover { background: #E0E5F2; }
.donate-btn { background: #FEF3C7; color: #B45309; }
.donate-btn:hover { background: #FDE68A; }
.exit-btn { background: #FEE2E2; color: #DC2626; }
.exit-btn:hover { background: #FECACA; }

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    align-items: center; justify-content: center;
}
.modal-content {
    background: white; padding: 30px; border-radius: 16px; width: 90%; max-width: 400px;
}
.qris-box {
    background: #F4F7FE; padding: 20px; border-radius: 12px; margin: 20px 0; border: 2px dashed var(--primary);
}
.info-alert {
    background: #EFF6FF; border-left: 4px solid #3B82F6; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: #1E3A8A;
}
.btn-download { background: #F59E0B; color: white; }
.btn-download:hover { background: #D97706; }

/* ==========================================
   MOBILE RESPONSIVE FIX (HP & TABLET)
   ========================================== */
@media (max-width: 768px) {
    body { 
        padding-top: 100px; /* Disesuaikan biar nggak kepotong */
        padding-left: 15px; 
        padding-right: 15px; 
    }
    .navbar { 
        padding: 15px 20px; 
    }
    
    /* Tampilkan tombol Hamburger */
    .menu-toggle {
        display: block; 
    }

    /* Modifikasi nav-links menjadi dropdown tersembunyi */
    .nav-links {
        position: absolute;
        top: 65px; /* Tepat di bawah navbar */
        left: 0;
        width: 100%;
        background: var(--card-bg);
        flex-direction: column;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        /* Trik transisi mulus */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0 20px;
        box-sizing: border-box;
        gap: 0;
    }

    /* Class "active" dipanggil oleh JavaScript saat tombol diklik */
    .nav-links.active {
        max-height: 250px; 
        opacity: 1;
        padding: 20px;
        gap: 12px;
        border-top: 1px solid var(--border);
    }

    .nav-btn {
        width: 100%;
        padding: 12px;
    }

    /* Penyesuaian ukuran elemen lain di HP */
    .card { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .logo { font-size: 24px; }
    .pertanyaan { font-size: 16px; }
    .opsi-label { padding: 12px 15px; font-size: 14px; }
    .skor-angka { font-size: 48px; }
    .progress-number { font-size: 28px; }
}