/* --- [STYLE HAN-TADRIBAT v3.0] --- */
/* [REVISI] 100% BERSIH dari "Spasi Aneh" (NBSP) "Bege" */
/* [REVISI] 100% LENGKAP (Termasuk Visi Grid, Font, dan Tema) */

@import url('https://fonts.googleapis.com/css2?family=Lateef:wght@400;700&family=Noto+Sans:wght@400;700&display=swap');

/* 1. VARIABEL TEMA HIJAU (Standar Tadribat) */
:root {
    --font-arab: 'Lateef', 'Noto Serif Arabic', serif; /* [REVISI] Sesuai Visi Antum (Lateef) */
    --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; /* HIJAU TUA */
    --warna-teks-putih: #ffffff;
    --warna-teks-arab: #006400; /* HIJAU TUA */
    --warna-utama: #28a745; /* HIJAU CERAH */
    --warna-utama-hover: #218838; /* HIJAU HOVER */
    --warna-netral: #6c757d;
    --warna-netral-hover: #5a6268;
    --warna-border: #ddd;
    --warna-bayangan: rgba(0,0,0,0.07);
    --warna-benar-bg: #d4edda; /* HIJAU MUDA */
    --warna-benar-teks: #155724; /* HIJAU TUA */
    --warna-pilihan-bg: #f8f9fa;
    --warna-pilihan-hover: #e2e6ea;
}
html[data-theme="dark"] {
    --warna-bg: #121212;
    --warna-container-bg: #1e1e1e;
    --warna-teks-utama: #f1f1f1;
    --warna-teks-sekunder: #aaa;
    --warna-teks-judul: #38c172; /* HIJAU CERAH (Dark) */
    --warna-teks-putih: #ffffff;
    --warna-teks-arab: #38c172; /* HIJAU CERAH (Dark) */
    --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; /* HIJAU TUA */
    --warna-benar-teks: #a3d9b1; /* HIJAU MUDA */
    --warna-pilihan-bg: #333;
    --warna-pilihan-hover: #444;
}

/* 2. STYLE DASAR (Standar Tadribat) */
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: 800px; 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); }
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; }
.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; }
.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); }

/* 3. STYLE "TABS MODEL" (BARU) */
.han-container {
    border: 1px solid var(--warna-border);
    border-radius: 8px;
    margin-top: 20px;
}

/* [REVISI] Navigasi (42 Tombol) - Grid 7 Kolom (Visi Antum L405) */
.han-navigasi {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 15px;
    background-color: var(--warna-pilihan-bg);
    border-radius: 8px 8px 0 0;
}

/* [REVISI] Tambahan "Responsive" (Visi Antum L405) */
@media (max-width: 600px) {
    .han-navigasi {
        grid-template-columns: repeat(6, 1fr);
        gap: 5px;
    }
    .btn-tab {
        font-size: 0.8em;
        padding: 6px 8px;
    }
}
.btn-tab {
    font-family: var(--font-latin);
    font-size: 0.9em;
    font-weight: 700;
    padding: 8px 12px;
    border: 1px solid var(--warna-border);
    background-color: var(--warna-container-bg);
    color: var(--warna-teks-judul);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-tab:hover {
    background-color: var(--warna-utama-hover);
    color: var(--warna-teks-putih);
    border-color: var(--warna-utama-hover);
}
.btn-tab.active {
    background-color: var(--warna-utama);
    color: var(--warna-teks-putih);
    border-color: var(--warna-utama);
    transform: scale(1.05);
}

/* Panel Konten (yang 1 itu) */
.han-konten {
    padding: 20px;
    text-align: left;
    direction: rtl; /* Default Arab */
}

/* 4. STYLE ISI KONTEN (LENGKAP) */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* [BARU] Style Info Hadits (Visi Antum L416 & L419) */
.panel-info-wrapper {
    text-align: center; /* [REVISI] "CENTER" (Visi Antum) */
    direction: ltr; /* Teks Latin */
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--warna-border); /* Pemisah "rapi" */
    animation: fadeIn 0.5s ease;
}
.panel-info-nomor {
    font-family: var(--font-latin);
    font-size: 1.1em;
    font-weight: 700;
    color: var(--warna-teks-sekunder); /* Abu-abu "santun" */
    margin: 0;
}
.panel-info-tema {
    font-family: var(--font-latin);
    font-size: 1.6em; /* Dibuat besar (Tema) */
    font-weight: 700;
    color: var(--warna-teks-judul); /* HIJAU (Judul) */
    margin: 5px 0 0 0;
}

.panel-arab {
    direction: rtl; 
    text-align: right; 
    font-family: var(--font-arab); /* Font Lateef (L408) */
    font-size: 1.8em; 
    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); 
    animation: fadeIn 0.5s ease;
}

.panel-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);
    text-align: left; direction: ltr;
    animation: fadeIn 0.5s ease;
}
.panel-terjemahan strong {
    color: var(--warna-teks-judul); display: block;
    margin-bottom: 5px;
}
 .panel-terjemahan p {
    font-family: var(--font-latin); color: var(--warna-teks-utama);
    font-size: 1em; text-align: left; direction: ltr; margin: 0;
 }

/* [REVISI] Style Sumber (CENTER - Visi Antum L397) */
.panel-sumber {
    display: block; margin-top: 15px; padding-top: 15px;
    border-top: 1px dashed var(--warna-border);
    text-align: center; /* CENTER */
    direction: ltr;
    animation: fadeIn 0.5s ease;
}
.panel-sumber strong {
    font-family: var(--font-latin); font-size: 0.9em;
    font-weight: 700; color: var(--warna-teks-judul);
    display: block; margin-bottom: 5px; text-align: center; /* CENTER */
}
.panel-sumber .sumber-arab {
    font-family: var(--font-arab); font-size: 1.5em; 
    line-height: 1.6; color: var(--warna-teks-arab);
    display: block; direction: rtl; text-align: center; /* CENTER */
    margin-bottom: 5px;
}
.panel-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: center; /* CENTER */
}

/* Audio Player (100% Full - Visi Antum L398) */
.audio-player-global {
    display: block; /* KUNCI */
    width: 100%;
    margin-top: 15px;
    animation: fadeIn 0.5s ease;
}

/* 5. FOOTER (BARU) */
.han-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--warna-border);
    font-family: var(--font-latin);
    font-size: 0.9em;
    display: flex; /* Agar rapi di HP */
    flex-wrap: wrap; /* Pindah baris jika tidak muat */
    justify-content: center;
    gap: 5px 10px; /* Jarak atas/bawah 5px, kiri/kanan 10px */
}
.han-footer a {
    color: var(--warna-netral);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap; /* Jangan patahkan link */
}
.han-footer a:hover {
    color: var(--warna-teks-judul);
}