/* --- [STYLE GAME 8 - TEBAK TEMA ARBA'IN v2.0] --- */
/* Versi 2.0: Mode Belajar (Optimal) */

@import url('https://fonts.googleapis.com/css2?family=Lateef:wght@400;700&family=Noto+Sans:wght@400;700&display=swap');

:root {
    --font-arab: 'Lateef', serif; --font-latin: 'Noto Sans', sans-serif; --warna-bg: #f4f7f6; --warna-container-bg: #ffffff; --warna-teks-utama: #222; --warna-teks-sekunder: #555; --warna-teks-judul: #006400; --warna-teks-putih: #ffffff; --warna-teks-arab: #006400; --warna-utama: #28a745; --warna-utama-hover: #218838; --warna-netral: #6c757d; --warna-netral-hover: #5a6268; --warna-border: #ddd; --warna-bayangan: rgba(0,0,0,0.07); --warna-benar-bg: #d4edda; --warna-benar-teks: #155724; --warna-salah-bg: #f8d7da; --warna-salah-teks: #721c24; --warna-skor-saya-bg: #d4edda; --warna-pilihan-bg: #f8f9fa; --warna-pilihan-hover: #e2e6ea; --warna-tabel-header: #f0f4f6;
}

html[data-theme="dark"] {
    --warna-bg: #121212; --warna-container-bg: #1e1e1e; --warna-teks-utama: #f1f1f1; --warna-teks-sekunder: #aaa; --warna-teks-judul: #38c172; --warna-teks-putih: #ffffff; --warna-teks-arab: #38c172; --warna-utama: #28a745; --warna-utama-hover: #38c172; --warna-netral: #6c757d; --warna-netral-hover: #5a6268; --warna-border: #444; --warna-bayangan: rgba(255,255,255,0.05); --warna-benar-bg: #1a3a24; --warna-benar-teks: #a3d9b1; --warna-salah-bg: #4a1c22; --warna-salah-teks: #f1b9be; --warna-skor-saya-bg: #1a3a24; --warna-pilihan-bg: #333; --warna-pilihan-hover: #444; --warna-tabel-header: #2c2c2c;
}

body { font-family: var(--font-latin); background-color: var(--warna-bg); color: var(--warna-teks-utama); display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; margin: 0; padding: 20px; box-sizing: border-box; transition: background-color 0.3s, color 0.3s; }
.container { width: 100%; max-width: 600px; margin: 0 auto; padding: 25px; background-color: var(--warna-container-bg); border-radius: 12px; box-shadow: 0 6px 18px var(--warna-bayangan); text-align: center; transition: background-color 0.3s; }
.header-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; } .header-nav > div { display: flex; gap: 10px; } .back-link { font-family: var(--font-latin); text-decoration: none; color: var(--warna-netral); font-size: 0.9em; font-weight: 700; } .back-link:hover { color: var(--warna-teks-utama); }
.theme-toggle { background: none; border: 2px solid var(--warna-border); color: var(--warna-teks-sekunder); font-size: 1.2em; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; padding: 0; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s, color 0.3s, border-color 0.3s; } .theme-toggle:hover { background-color: var(--warna-pilihan-bg); }
@media (max-width: 600px) { h1 { display: none; } }
.input-nama-wrapper { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; } #input-nama { flex-grow: 1; padding: 12px; border: 1px solid var(--warna-border); border-radius: 5px; font-size: 1em; background-color: var(--warna-bg); color: var(--warna-teks-utama); box-sizing: border-box; }
#simpan-nama-btn { width: auto; padding: 12px 15px; font-weight: 700; font-size: 1em; margin-top: 0; flex-shrink: 0; }
.nama-aktif-wrapper { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 10px 15px; background-color: var(--warna-pilihan-bg); border: 1px solid var(--warna-border); border-radius: 8px; } #nama-aktif { margin: 0; font-weight: 700; color: var(--warna-teks-sekunder); font-size: 1.1em; text-align: left; flex-grow: 1; }
.rank-info { font-family: var(--font-latin); font-weight: 700; font-size: 0.9em; color: var(--warna-teks-sekunder); margin: 0 10px; white-space: nowrap; } .btn-ganti-user { background-color: var(--warna-netral); color: var(--warna-teks-putih); border: none; border-radius: 5px; padding: 5px 12px; font-size: 0.9em; font-weight: 700; cursor: pointer; transition: background-color 0.3s; flex-shrink: 0; } .btn-ganti-user:hover { background-color: var(--warna-netral-hover); }
h1 { color: var(--warna-teks-judul); margin-bottom: 10px; font-weight: 700; } h2 { color: var(--warna-teks-judul); border-bottom: 2px solid var(--warna-border); padding-bottom: 10px; font-size: 1.3em; } p { font-size: 1.1em; color: var(--warna-teks-sekunder); margin-bottom: 25px; }
.instruksi-game { font-size: 0.9em; color: var(--warna-teks-sekunder); margin-top: -10px; margin-bottom: 15px; font-weight: 700; text-align: center; line-height: 1.4; padding: 0 5px; }
.game-card { padding: 20px; margin-top: 20px; border: 1px solid var(--warna-border); border-radius: 8px; text-align: center; transition: border-color 0.3s; }
#label-pertanyaan { text-align: center; font-weight: 700; font-size: 1.1em; color: var(--warna-teks-utama); }

/* [BARU v2.0] Style untuk Nomor Hadits (Permintaan Antum) */
.info-hadits-nomor {
    font-family: var(--font-latin);
    font-weight: 700;
    font-size: 1.1em;
    color: var(--warna-teks-sekunder);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--warna-border);
    direction: rtl; /* Agar Arab di kanan */
}

.soal-ayat {
    direction: rtl; text-align: right; font-family: var(--font-arab); font-size: 2em; line-height: 1.8; color: var(--warna-teks-arab); margin: 15px 0; padding: 15px; border: 1px dashed var(--warna-border); border-radius: 8px; background-color: var(--warna-bg); min-height: 60px;
}

/* [DIUBAH v2.0] Style Audio Player (tanpa controls) */
#audio-player { width: 100%; margin-top: -5px; margin-bottom: 15px; }
#audio-player:not([src]) { display: none; }

.pilihan-jawaban { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 15px; direction: ltr; }
.btn-pilihan {
    display: block; width: 100%; box-sizing: border-box; padding: 15px 20px; font-family: var(--font-latin); font-size: 1.1em; font-weight: 700; color: var(--warna-teks-utama); background-color: var(--warna-pilihan-bg); border: 1px solid var(--warna-border); border-radius: 5px; cursor: pointer; text-align: left; transition: background-color 0.3s, border-color 0.3s;
}
.btn-pilihan:hover { background-color: var(--warna-pilihan-hover); }
.btn-pilihan:disabled { background-color: var(--warna-bg); color: var(--warna-teks-sekunder); opacity: 0.7; }
.btn { display: inline-block; width: 100%; box-sizing: border-box; padding: 15px 20px; font-family: var(--font-latin); font-size: 1.1em; font-weight: 700; color: var(--warna-teks-putih); background-color: var(--warna-utama); border: none; border-radius: 5px; cursor: pointer; margin-top: 15px; text-decoration: none; transition: background-color 0.3s, transform 0.2s; }
.btn:hover { background-color: var(--warna-utama-hover); transform: translateY(-2px); }

.hasil { margin-top: 20px; font-size: 1.2em; font-weight: 700; padding: 15px; border-radius: 5px; text-align: left; line-height: 1.5; }
.hasil.benar { color: var(--warna-benar-teks); background-color: var(--warna-benar-bg); border: 1px solid var(--warna-benar-teks); }
.hasil.salah { color: var(--warna-salah-teks); background-color: var(--warna-salah-bg); border: 1px solid var(--warna-salah-teks); }
.hasil .poin-nol { color: var(--warna-salah-teks); font-weight: bold; }

/* [DIUBAH v2.0] Style Info Terjemahan (Indo) */
.hasil-info-terjemahan {
    display: block;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--warna-border);
    font-family: var(--font-latin);
    font-size: 0.9em;
    font-weight: 400;
    color: var(--warna-teks-utama);
}
.hasil-info-terjemahan strong {
    color: var(--warna-teks-judul);
    display: block;
    margin-bottom: 5px;
}

/* [BARU v2.0] Style Info Sumber (Arab & Indo) */
.hasil-info-sumber {
    display: block;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--warna-border);
}
.hasil-info-sumber strong {
    font-family: var(--font-latin);
    font-size: 0.9em;
    font-weight: 700;
    color: var(--warna-teks-judul);
    display: block;
    margin-bottom: 5px;
    direction: ltr;
    text-align: left;
}
.hasil-info-sumber .sumber-arab {
    font-family: var(--font-arab);
    font-size: 1.5em; /* Lebih besar untuk Arab */
    line-height: 1.6;
    color: var(--warna-teks-arab);
    display: block;
    direction: rtl;
    text-align: right;
    margin-bottom: 5px;
}
.hasil-info-sumber .sumber-indo {
    font-family: var(--font-latin);
    font-size: 0.9em;
    font-weight: 400;
    color: var(--warna-teks-utama);
    display: block;
    direction: ltr;
    text-align: left;
}

.leaderboard-container { margin-top: 30px; text-align: left; } #leaderboard-table { width: 100%; border-collapse: collapse; }
#leaderboard-table th, #leaderboard-table td { padding: 12px 15px; border-bottom: 1px solid var(--warna-border); transition: border-color 0.3s; text-align: center; }
#leaderboard-table td:nth-child(2) { text-align: left; } #leaderboard-table th { background-color: var(--warna-tabel-header); color: var(--warna-teks-sekunder); font-weight: 700; }
.skor-saya { background-color: var(--warna-skor-saya-bg) !important; font-weight: 700; }
.pagination-controls { display: none; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--warna-border); }
.pagination-btn { width: auto; flex-grow: 0; flex-shrink: 0; padding: 10px 15px; font-size: 0.9em; margin-top: 0; background-color: var(--warna-utama); }
.pagination-btn:hover { background-color: var(--warna-utama-hover); } .pagination-btn:disabled { background-color: var(--warna-netral); opacity: 0.6; cursor: not-allowed; transform: none; }
#page-info { font-family: var(--font-latin); font-weight: 700; font-size: 0.9em; color: var(--warna-teks-sekunder); flex-grow: 1; text-align: center; }
.admin-contact { font-family: var(--font-latin); font-size: 0.85em; color: var(--warna-teks-sekunder); margin-top: 20px; margin-bottom: 0; text-align: center; line-height: 1.5; }
.admin-contact a { color: var(--warna-utama); font-weight: 700; text-decoration: none; white-space: nowrap; } .admin-contact a:hover { text-decoration: underline; }

@keyframes pulse-green { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); } 70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); } }
.jawaban-benar-highlight { animation: pulse-green 1s ease-out; }

@keyframes pulse-red { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
.jawaban-salah-highlight {
    animation: pulse-red 0.5s ease-out;
    background-color: var(--warna-salah-bg) !important;
    color: var(--warna-salah-teks) !important;
    border-color: var(--warna-salah-teks) !important;
}