/* Panggil fail font dari folder fonts/ */
@font-face {
  font-family: 'NotoNaskhJawi';
  src: url('../fonts/NotoNaskhArabic-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Gunakan class ini pada teks soalan atau pilihan Jawi */
.teks-jawi {
  font-family: 'NotoNaskhJawi', serif;
  direction: rtl; /* Untuk susunan dari kanan ke kiri */
}
/* ========================================= */
/* 1. ASAS & GLOBAL                          */
/* ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { 
    width: 100%; 
    height: 100%; 
    height: -webkit-fill-available;
    overflow: hidden; 
    font-family: 'Poppins', sans-serif; 
    background-color: #f0f8f0; 
}
/* ========================================= */
/* 2. SKRIN UTAMA (HOME)                     */
/* ========================================= */
.hero-container { 
    position: relative; 
    width: 100vw; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 0 0 0; 
    z-index: 1; 
}
.bg-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.content-overlay { 
    position: relative; 
    z-index: 2; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: space-evenly; 
    flex-grow: 1;
    width: 100%; 
    margin-bottom: 75px; 
}
.brand-header { background: rgba(255, 255, 255, 0.9); padding: 10px 20px; border-radius: 18px; backdrop-filter: blur(5px); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); border: 2px solid #81c784; text-align: center; max-width: 90%; }
.main-title { font-family: 'Fredoka', cursive; font-size: 2.2rem; color: #1b5e20; text-shadow: 1px 1px 3px rgba(255, 215, 0, 0.6); line-height: 1.1; }
.sub-brand { font-size: 0.8rem; font-weight: 600; color: #2e7d32; }
.slogan { font-size: 0.8rem; color: #333; font-weight: 600; margin-top: 2px; }
.character-section { display: flex; flex-direction: column; align-items: center; position: relative; margin: 5px 0; z-index: 3; }
.speech-bubble { background: #ffffff; color: #1b5e20; font-weight: 600; padding: 8px 16px; border-radius: 14px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); border: 2px solid #4caf50; margin-bottom: 2px; font-size: 0.9rem; position: relative; text-align: center; animation: terapung 3s infinite ease-in-out; }
.speech-bubble::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); border-width: 8px 8px 0; border-style: solid; border-color: #ffffff transparent; display: block; width: 0; }
.maskot-luqman { height: 320px; width: auto; filter: drop-shadow(0 12px 18px rgba(0,0,0,0.35)); animation: melambai 2.5s infinite ease-in-out; }
.action-section { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.mini-btn-group { display: flex; justify-content: center; align-items: center; }
.btn-info-panduan, .btn-bgm {
    position: relative; 
    background: #ffffff; 
    width: 45px; height: 45px; border-radius: 50%; font-size: 1.2rem;
    cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.15); transition: transform 0.2s ease, background 0.2s ease;
    display: flex; justify-content: center; align-items: center;
}
.btn-info-panduan { color: #1976d2; border: 2px solid #1976d2; }
.btn-info-panduan:hover { transform: scale(1.1); background: #e3f2fd; }
.btn-bgm { color: #9c27b0; border: 2px solid #9c27b0; }
.btn-bgm:hover { transform: scale(1.1); background: #f3e5f5; }
.btn-bgm.playing { background: #9c27b0; color: #ffffff; animation: pulseBgm 2s infinite; }
@keyframes pulseBgm { 0% { box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(156, 39, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(156, 39, 176, 0); } }
.btn-mula { font-family: 'Fredoka', cursive; background: linear-gradient(185deg, #4caf50, #2e7d32); color: white; font-size: 1.2rem; padding: 12px 40px; border: 3px solid #ffffff; border-radius: 50px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.25); transition: all 0.25s ease; }
.btn-mula:hover { transform: scale(1.06); background: linear-gradient(185deg, #66bb6a, #1b5e20); }
.btn-profil { font-family: 'Poppins', sans-serif; background: rgba(255, 255, 255, 0.98); color: #1b5e20; font-size: 0.9rem; font-weight: 600; padding: 8px 24px; border: 2px solid #4caf50; border-radius: 30px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.15); transition: all 0.25s ease; }
.btn-profil:hover { background: #e8f5e9; transform: translateY(-2px); }

/* ========================================= */
/* 4. MODAL / POPUP UMUM                     */
/* ========================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 999; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box { 
    background-color: #ffffff; 
    padding: 25px; 
    border-radius: 20px; 
    width: 90%; 
    max-width: 420px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
    position: relative; 
    border: 3px solid #81c784; 
    transform: scale(0.8); 
    transition: transform 0.3s ease; 
    max-height: 88dvh; 
    overflow-y: auto;  
}
.modal-overlay.active .modal-box { transform: scale(1); }
.close-modal { position: absolute; top: 15px; left: 15px; background: none; border: none; font-size: 1.8rem; color: #888; cursor: pointer; line-height: 1; }
.close-modal:hover { color: #ff5252; }
.modal-header { text-align: center; margin-bottom: 15px; }
.profile-icon-header { font-size: 2.2rem; color: #4caf50; margin-bottom: 8px; }
.modal-header h2 { font-family: 'Fredoka', cursive; color: #1b5e20; font-size: 1.5rem; margin-bottom: 4px; }
.modal-header p { font-size: 0.85rem; color: #666; }

/* ========================================= */
/* 5. PROFIL MURID & BORANG                  */
/* ========================================= */
.profile-list { margin-bottom: 15px; max-height: 200px; overflow-y: auto; padding-right: 5px; }
.profile-item { display: flex; align-items: center; padding: 10px 12px; background-color: #f9f9f9; border-radius: 15px; margin-bottom: 10px; border: 1px solid #eee; cursor: pointer; transition: all 0.2s ease; }
.profile-item:hover { background-color: #e8f5e9; border-color: #81c784; }
.profile-avatar { width: 55px; height: 55px; margin-right: 12px; border-radius: 50%; border: 2px solid #81c784; object-fit: cover; }
.profile-info { flex-grow: 1; }
.profile-info h3 { font-size: 0.95rem; color: #333; }
.profile-info p { font-size: 0.8rem; color: #666; }
.profile-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-edit-profile, .btn-delete-profile { background: none; border: none; font-size: 1rem; cursor: pointer; padding: 6px; border-radius: 50%; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; }
.btn-edit-profile { color: #1976d2; } .btn-edit-profile:hover { background-color: #e3f2fd; transform: scale(1.15); }
.btn-delete-profile { color: #ff5252; } .btn-delete-profile:hover { background-color: #ffebee; transform: scale(1.15); }
.select-arrow { color: #4caf50; font-size: 1.1rem; }
.btn-tambah-murid, .btn-simpan-profil { width: 100%; padding: 12px; font-family: 'Fredoka', cursive; border: none; border-radius: 12px; font-size: 1.05rem; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.btn-tambah-murid { background-color: #4caf50; color: white; margin-bottom: 12px; }
.btn-simpan-profil { background-color: #1976d2; color: white; }
.pakej-info-pilih { margin-top: 10px; text-align: center; border-top: 1px dashed #ddd; padding-top: 10px; }
.pakej-info-pilih p { font-size: 0.8rem; color: #555; }
.btn-upgrade-pilih { background: none; border: none; color: #ff9800; font-weight: bold; cursor: pointer; font-size: 0.82rem; text-decoration: underline; }
.tambah-murid-form { display: flex; flex-direction: column; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: #555; }
.form-group input, .form-group select { padding: 9px; border: 2px solid #eee; border-radius: 10px; font-family: 'Poppins', sans-serif; font-size: 0.88rem; }
.avatar-selector { display: flex; gap: 10px; justify-content: space-around; flex-wrap: wrap; padding: 8px 0; }
.av-radio { display: none; }
.av-label { cursor: pointer; border: 3px solid #eee; border-radius: 50%; padding: 3px; transition: all 0.2s ease; }
.av-label:hover { transform: scale(1.08); }
.av-label img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; display: block; }
.av-radio:checked + .av-label { border-color: #ff9800; background-color: #fffde7; box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3); }
.locked-avatar { position: relative; filter: grayscale(100%); opacity: 0.6; cursor: not-allowed !important; border-color: #ccc !important; }
.locked-avatar img { filter: blur(2px); }
.lock-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #333; font-size: 1.5rem; z-index: 10; text-shadow: 0 0 5px white; }
.unlocked-avatar { filter: none !important; opacity: 1 !important; cursor: pointer !important; }
.unlocked-avatar .lock-icon { display: none; }

/* ========================================= */
/* 6. GRID SUBJEK & UJIAN                    */
/* ========================================= */
.subjek-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; padding: 5px; }
.subjek-card { background: #f4fbf4; border: 2px solid #a5d6a7; border-radius: 18px; padding: 10px 8px; text-align: center; cursor: pointer; transition: all 0.25s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.06); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.subjek-card:hover { transform: translateY(-3px); background: #e8f5e9; border-color: #4caf50; box-shadow: 0 6px 15px rgba(76, 175, 80, 0.25); }
.subjek-icon-img { width: 68px; height: 68px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); transition: transform 0.2s ease; }
.subjek-card:hover .subjek-icon-img { transform: scale(1.15); }
.subjek-title { font-family: 'Fredoka', cursive; color: #1b5e20; font-size: 1rem; }
.ujian-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.btn-ujian-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #ffffff; border: 2px solid #a5d6a7; border-radius: 16px; cursor: pointer; transition: all 0.25s ease; text-align: left; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.btn-ujian-card:hover { background: #e8f5e9; border-color: #4caf50; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(76, 175, 80, 0.2); }
.btn-ujian-card.locked { background: #f5f5f5; border-color: #e0e0e0; opacity: 0.8; cursor: not-allowed; }
.btn-ujian-card.locked:hover { transform: none; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.btn-ujian-card.locked h3, .btn-ujian-card.locked p { color: #9e9e9e; }
.btn-ujian-card.locked .ujian-badge { background: #bdbdbd; }
.ujian-badge { color: white; font-family: 'Fredoka', cursive; font-size: 0.95rem; padding: 8px 14px; border-radius: 12px; letter-spacing: 0.5px; }
.ujian-badge.ppt { background: #2e7d32; }
.ujian-badge.pat { background: #e65100; }
.ujian-info { flex-grow: 1; }
.ujian-info h3 { font-family: 'Fredoka', cursive; font-size: 1.05rem; color: #1b5e20; margin-bottom: 2px; }
.ujian-info p { font-size: 0.8rem; color: #666; }
.arrow-icon { color: #4caf50; font-size: 1.1rem; }

/* ========================================= */
/* 7. AMARAN DELETE                          */
/* ========================================= */
.text-center { text-align: center; }
.warning-icon-header { font-size: 2.8rem; color: #ff9800; margin-bottom: 8px; }
.warning-box { background-color: #fff3e0; border: 1px dashed #ffb74d; border-radius: 12px; padding: 12px; margin: 12px 0; font-size: 0.8rem; color: #e65100; text-align: left; line-height: 1.4; }
.modal-actions-row { display: flex; gap: 10px; justify-content: space-between; margin-top: 15px; }
.btn-batal-delete { flex: 1; padding: 10px; background: #e0e0e0; color: #333; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; }
.btn-sah-delete { flex: 1.2; padding: 10px; background: #ff5252; color: white; border: none; border-radius: 10px; font-family: 'Fredoka', cursive; font-size: 0.95rem; cursor: pointer; box-shadow: 0 4px 10px rgba(255, 82, 82, 0.3); }

/* ========================================= */
/* 8. UI KUIZ & SOALAN                       */
/* ========================================= */
.rtl-text { direction: rtl; text-align: right; font-family: 'Amiri', 'Traditional Arabic', 'Segoe UI', sans-serif; font-size: 1.4rem !important; line-height: 1.8; }
.kuiz-modal { max-width: 480px; width: 92%; text-align: center; padding-bottom: 30px; }
.kuiz-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px dashed #a5d6a7; }
.kuiz-badge { background: #1b5e20; color: white; font-family: 'Fredoka', cursive; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; }
.kuiz-progress { font-weight: 600; color: #333; font-size: 0.85rem; }
.kuiz-mascot-box { text-align: center; margin-bottom: 8px; }
.kuiz-mascot-img { height: 95px; width: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); transition: transform 0.25s ease; }
.soalan-gambar-img { max-width: 100%; max-height: 140px; object-fit: contain; border-radius: 12px; border: 2px solid #a5d6a7; background: #ffffff; padding: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin: 10px auto; }
.soalan-container { background: #f4fbf4; border: 2px solid #c8e6c9; padding: 16px; border-radius: 16px; margin-bottom: 12px; }
.soalan-text { color: #1b5e20; font-size: 1.15rem; }
.drop-zone { display: inline-block; min-width: 120px; padding: 2px 12px; margin: 0 6px; border: 2px dashed #2b78e4; border-radius: 10px; background-color: #e8f0fe; color: #1967d2; font-weight: bold; text-align: center; vertical-align: middle; font-family: 'Amiri', 'Poppins', sans-serif; transition: all 0.3s ease; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); }
.drop-zone.filled { border: 2px solid #28a745; background-color: #e8f8f5; color: #155724; box-shadow: 0 3px 8px rgba(40, 167, 69, 0.2); }
.pilihan-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.opt-card { background: #ffffff; border: 2px solid #e0e0e0; padding: 12px 16px; border-radius: 14px; font-size: 1rem; color: #2c3e50; cursor: pointer; transition: all 0.2s ease; text-align: left; box-shadow: 0 3px 6px rgba(0,0,0,0.05); font-family: 'Poppins', sans-serif; }
.opt-card.rtl-text { text-align: right; font-size: 1.25rem !important; }
.opt-card:hover:not(:disabled) { border-color: #4caf50; background: #f1f8e9; transform: translateY(-2px); }
.opt-card.correct { background-color: #d4edda !important; border-color: #28a745 !important; color: #155724 !important; font-weight: bold; }
.opt-card.wrong { background-color: #f8d7da !important; border-color: #dc3545 !important; color: #721c24 !important; }
.rujukan-box { background: #fff8e1; border: 2px solid #ffe082; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; text-align: left; font-size: 0.82rem; color: #e65100; }
.rujukan-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rujukan-mascot { width: 24px; height: 24px; object-fit: contain; }
.btn-seterusnya, .btn-cetak-sijil { width: 100%; color: white; border: none; padding: 12px 24px; border-radius: 14px; font-family: 'Fredoka', cursive; font-size: 1.05rem; cursor: pointer; margin-top: 5px; }
.btn-seterusnya { background: #4caf50; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3); }
.btn-cetak-sijil { background: #1976d2; box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3); animation: flashBtn 2s infinite; }
.hidden { display: none !important; }
.result-icon-header { font-size: 3rem; color: #ffc107; margin-bottom: 10px; }
.result-score-box { background: #fffde7; border: 2px solid #ffe082; padding: 20px; border-radius: 18px; margin: 15px 0; }
.score-number { font-family: 'Fredoka', cursive; font-size: 2.8rem; color: #1b5e20; animation: popScore 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* ========================================= */
/* 9. MODUL PAPARAN MARKAH & LEADERBOARD     */
/* ========================================= */
#modalPaparMarkah .modal-box { max-width: 520px !important; width: 92% !important; }
.markah-tabs { display: flex; gap: 5px; margin-bottom: 15px; border-bottom: 2px solid #eee; }
.tab-btn { flex: 1; padding: 8px; background: none; border: none; font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 600; color: #888; cursor: pointer; border-radius: 8px 8px 0 0; transition: all 0.2s ease; }
.tab-btn.active { color: #ff9800; background: #fff8e1; border-bottom: 3px solid #ff9800; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.markah-card { display: flex; justify-content: space-between; align-items: center; background: #f8f9fa; border-left: 6px solid #ccc; padding: 14px 15px; margin-bottom: 10px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.2s ease; }
.markah-card:hover { transform: translateX(5px); }
.markah-info h4 { font-family: 'Fredoka', cursive; margin-bottom: 4px; color: #333; font-size: 1.1rem; }
.markah-info p { font-size: 0.85rem; color: #666; font-weight: 600; }
.markah-gred { font-family: 'Fredoka', cursive; font-weight: bold; padding: 6px 12px; border-radius: 20px; font-size: 0.95rem; text-align: center; min-width: 90px; }
.gred-mumtaz { background: #e8f5e9; border-left-color: #4caf50; } .gred-mumtaz .markah-gred { background: #4caf50; color: white; }
.gred-jayyid-jiddan { background: #e3f2fd; border-left-color: #1976d2; } .gred-jayyid-jiddan .markah-gred { background: #1976d2; color: white; }
.gred-jayyid { background: #fff8e1; border-left-color: #ffb300; } .gred-jayyid .markah-gred { background: #ffb300; color: white; }
.gred-maqbul { background: #f5f5f5; border-left-color: #9e9e9e; } .gred-maqbul .markah-gred { background: #9e9e9e; color: white; }
.gred-rasib { background: #ffebee; border-left-color: #ff5252; } .gred-rasib .markah-gred { background: #ff5252; color: white; }
.bintang-badge { font-size: 1.3rem; margin-right: 10px; }
.bintang-emas { color: #ffc107; filter: drop-shadow(0 0 4px rgba(255,193,7,0.6)); }
.bintang-kelabu { color: #e0e0e0; }
.markah-info-header { display: flex; align-items: center; }
.leaderboard-card { display: flex; align-items: center; background: #ffffff; border: 2px solid #e0e0e0; padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 3px 6px rgba(0,0,0,0.05); }
.lb-rank { font-family: 'Fredoka', cursive; font-size: 1.4rem; color: #9e9e9e; width: 35px; text-align: center; }
.lb-rank.champion { color: #ffb300; font-size: 1.8rem; }
.lb-avatar { width: 45px; height: 45px; border-radius: 50%; margin-right: 12px; border: 2px solid #eee;}
.lb-info { flex-grow: 1; }
.lb-info h4 { margin-bottom: 2px; color: #333; font-size: 1rem; }
.lb-info p { font-size: 0.8rem; color: #ff9800; font-weight: 600; margin: 0; }
.lb-score { font-weight: bold; color: #2e7d32; font-size: 1.1rem; }

/* ========================================= */
/* 10. MODAL INFOGRAFIK & ZOOM               */
/* ========================================= */
.infografik-modal { max-width: 600px; width: 95%; }
.infografik-zoom-container { width: 100%; height: 350px; overflow: auto; border: 2px solid #ccc; border-radius: 12px; margin-bottom: 10px; background-color: #f8f9fa; text-align: center; position: relative; }
#imgInfografikViewer { max-width: 100%; height: auto; transition: transform 0.3s ease; transform-origin: top center; }
.zoom-controls { display: flex; justify-content: center; gap: 15px; margin-bottom: 10px; }
.btn-zoom { background: #e8f5e9; color: #2e7d32; border: 2px solid #4caf50; border-radius: 50%; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; transition: all 0.2s ease; }
.btn-zoom:hover { background: #4caf50; color: white; }
.btn-cetak-nota { width: 100%; background: #1976d2; color: white; border: none; padding: 12px; border-radius: 12px; font-family: 'Fredoka', cursive; font-size: 1rem; cursor: pointer; margin-top: 5px; box-shadow: 0 4px 10px rgba(25, 118, 210, 0.3); }

/* ========================================= */
/* 11. REKAAN SIJIL & CETAKAN (PRINT MODE)   */
/* ========================================= */
.hidden-screen { display: none; }
.sijil-print-container {
    background-color: white; padding: 40px;
    width: 297mm; height: 210mm; 
    box-sizing: border-box; text-align: center;
}
.sijil-border {
    border: 15px solid #1b5e20; outline: 4px solid #ffe082; outline-offset: -10px;
    height: 100%; padding: 40px; border-radius: 20px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background-image: radial-gradient(circle, #ffffff, #f1f8e9);
}
.sijil-header { margin-bottom: 30px; }
.sijil-title { font-family: 'Fredoka', cursive; font-size: 45px; color: #ff9800; letter-spacing: 2px; margin-bottom: 10px; text-shadow: 2px 2px 0px rgba(0,0,0,0.1); }
.sijil-subtitle { font-family: 'Poppins', sans-serif; font-size: 24px; color: #1b5e20; letter-spacing: 5px; text-transform: uppercase; }
.sijil-body { margin-bottom: 40px; font-size: 18px; color: #444; width: 100%; }
.sijil-nama { font-family: 'Fredoka', cursive; font-size: 42px; color: #1976d2; margin: 20px 0 5px 0; border-bottom: 2px solid #ccc; padding-bottom: 5px; display: inline-block; min-width: 60%; }
.sijil-gred { font-family: 'Fredoka', cursive; font-size: 50px; color: #d32f2f; margin: 15px 0; letter-spacing: 3px; }
.sijil-subjek { font-size: 26px; color: #333; font-weight: bold; background: #e0f2f1; padding: 5px 20px; border-radius: 10px; display: inline-block; margin-top: 10px; }
.sijil-table { width: 90%; margin: 20px auto; border-collapse: collapse; font-size: 16px; }
.sijil-table th { background-color: #1b5e20; color: white; padding: 10px; border: 1px solid #ddd; }
.sijil-table td { padding: 10px; border: 1px solid #ddd; text-align: center; }
.td-mumtaz { color: #2e7d32; font-weight: bold; background-color: #e8f5e9; }
.td-jayyid { color: #1976d2; font-weight: bold; background-color: #e3f2fd; }
.sijil-footer { margin-top: auto; font-size: 16px; color: #777; font-style: italic; }
@media print {
    body.print-mode-sijil > *:not(#sijilPrintArea) { display: none !important; }
    body.print-mode-sijil #sijilPrintArea { display: block !important; position: absolute; left: 0; top: 0; width: 297mm; height: 210mm; padding: 0; margin: 0; }
    body:not(.print-mode-sijil) .hero-container { display: none !important; }
    body:not(.print-mode-sijil) .modal-overlay.active { position: absolute !important; top: 0; left: 0; background: none !important; display: block !important; opacity: 1 !important; visibility: visible !important; }
    body:not(.print-mode-sijil) .modal-overlay:not(.active) { display: none !important; }
    body:not(.print-mode-sijil) .modal-box { border: none !important; box-shadow: none !important; width: 100% !important; max-width: 100% !important; transform: none !important; padding: 0 !important; margin: 0 !important; }
    body:not(.print-mode-sijil) .close-modal, body:not(.print-mode-sijil) .btn-cetak-nota, body:not(.print-mode-sijil) .zoom-controls { display: none !important; }
    body:not(.print-mode-sijil) #imgInfografikViewer { width: 100% !important; max-width: 100% !important; height: auto !important; page-break-inside: avoid; }
    body:not(.print-mode-sijil) .infografik-zoom-container { height: auto !important; overflow: visible !important; border: none !important; }
    @page { size: landscape; margin: 0; }
}

/* ========================================= */
/* 12. ANIMASI & RESPONSIVE                  */
/* ========================================= */
@keyframes popScore { 0% { transform: scale(0.5); opacity: 0; } 70% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
@keyframes melambai { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes terapung { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes flashBtn { 0%, 100% { transform: scale(1); background-color: #1976d2; } 50% { transform: scale(1.03); background-color: #1565c0; box-shadow: 0 0 15px rgba(25,118,210,0.6); } }
/* ==========================================
   KEMBALIKAN PAPARAN PENUH LAPTOP (LUQMAN KECIL & TIADA SCROLL)
   ========================================== */
@media (min-width: 768px) {
    html, body {
        overflow: hidden !important; /* Matikan fungsi scroll sepenuhnya */
    }
    
    .hero-container {
        height: 100vh !important;
        padding-bottom: 0 !important;
    }

    .content-overlay {
        justify-content: center !important;
        gap: 15px !important; /* Beri jarak cantik antara elemen */
        margin-bottom: 90px !important; /* Ruang selamat untuk menu kapsul di bawah */
    }

    /* Ini rahsianya: Luqman yang lebih kecil untuk laptop */
    .maskot-luqman {
        height: 22vh !important; /* Guna peratusan tinggi supaya automatik ikut saiz skrin */
        min-height: 200px !important;
        max-height: 240px !important;
    }

    /* Kecilkan sikit kotak tajuk atas supaya lebih banyak ruang */
    .brand-header {
        padding: 8px 15px !important; 
    }
    
    .main-title {
        font-size: 1.8rem !important;
    }
}
@media (max-width: 600px) {
    .main-title { font-size: 1.8rem; }
    .maskot-luqman { height: 260px !important; } 
    .btn-mula { font-size: 1rem; padding: 10px 30px; }
    .modal-box { width: 95%; padding: 20px; }
    .modal-header h2 { font-size: 1.35rem; }
    .subjek-grid { gap: 10px; }
    .subjek-card { padding: 10px 6px; }
    .av-label img { width: 52px; height: 52px; }
    .drop-zone { min-width: 90px; padding: 1px 8px; }
}
.btn-baca-nota { width: 100%; margin-top: 15px; background: linear-gradient(135deg, #29b6f6, #0288d1); color: white; border: none; padding: 12px; border-radius: 14px; font-family: 'Fredoka', cursive; font-size: 1.05rem; cursor: pointer; box-shadow: 0 4px 10px rgba(2, 136, 209, 0.3); transition: all 0.25s ease; display: flex; justify-content: center; align-items: center; gap: 8px; }
.btn-baca-nota:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(2, 136, 209, 0.4); background: linear-gradient(135deg, #4fc3f7, #0277bd); }

/* ==========================================
   KOD MENU BAWAH (KAPSUL TERAPUNG UNTUK SEMUA)
   ========================================== */
.bottom-nav {
    position: fixed;
    bottom: 25px; 
    left: 50%;
    transform: translateX(-50%); 
    width: max-content; 
    min-width: 240px; 
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px; 
    padding: 12px 35px;
    border-radius: 50px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); 
    z-index: 1000;
}

.bottom-nav > * {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #1b5e20;
    text-decoration: none;
    background: none;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
}

/* TUTUP LENCANA NETLIFY */
a[href*="netlify.com"] {
    display: none !important;
}
/* TOLAK BUTANG NAIK ATAS UNTUK SKRIN LAPTOP SUPAYA TAK BERTINDIH */
@media (min-width: 768px) {
    .content-overlay {
        margin-bottom: 140px !important; 
    }
}
/* Status Aktif untuk Bar Navigasi Bawah */
.nav-item.active {
    color: #28a745; /* Warna hijau tema Cahaya Ilmu */
    font-weight: bold;
}
/* BAR NAVIGASI BAWAH (BOTTOM NAVIGATION PWA) */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 90%;
    max-width: 400px;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
}

.nav-item {
    text-decoration: none;
    color: #888;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 1.2rem;
}

/* Status Aktif untuk Bar Navigasi Bawah */
.nav-item.active {
    color: #28a745;
    font-weight: 700;
}
/* Sembunyikan navigasi bawah HANYA apabila modal kuiz dibuka */
#modalKuiz.active ~ .bottom-nav,
.modal-overlay.active ~ .bottom-nav,
body:has(#modalKuiz.active) .bottom-nav {
    display: none !important;
}