@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');
* { box-sizing: border-box; font-family: 'Fredoka One', cursive, sans-serif; }
body { margin: 0; padding: 0; background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); color: #333; width: 100vw; min-height: 100vh; overflow-x: hidden; display: block; }
.screen { display: none; width: 100%; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 15px; }
.screen.active { display: flex; }
.game-top-bar { display: flex; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; max-width: 500px; margin-bottom: 20px; margin-top: 15px; }
.btn-kembali { background: #ff5e62; color: white; border: none; padding: 12px 18px; font-size: clamp(1rem, 3.5vw, 1.2rem); border-radius: 20px; cursor: pointer; box-shadow: 0 5px 0 #cc4b4e; }
#game-level-title { font-size: clamp(1.4rem, 5vw, 1.8rem); color: white; text-shadow: 2px 2px 0 #333; margin: 0; text-align: center; line-height: 1.2;}
.speaker-btn { background: #ffd166; border: none; border-radius: 50%; width: 60px; height: 60px; font-size: 2.2rem; cursor: pointer; box-shadow: 0 5px 0 #e0a82e; display: flex; align-items: center; justify-content: center; }

.question-card { background: white; border-radius: 30px; padding: 25px 15px; width: 100%; max-width: 500px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.15); border: 6px solid #ffd166; margin-bottom: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 30vh; }
#question-subtext { font-size: clamp(1.1rem, 4vw, 1.4rem); color: #555; margin-top: 10px; }

/* PENYESUAIAN UKURAN HURUF AGAR KALIMAT PANJANG MUAT DI HP */
.hijaiyah-display { font-size: clamp(2.5rem, 10vw, 4.5rem); color: #2c3e50; line-height: 1.4; margin: 10px 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.1); font-family: 'Amiri', serif; font-weight: bold; }

.options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; width: 100%; max-width: 500px; }
/* Font tombol diperkecil agar 3 huruf arab masuk rapi */
.option-btn { background: #ffffff; color: #2c3e50; border: 4px solid #38ef7d; border-radius: 20px; padding: 15px 5px; font-size: clamp(1.8rem, 6vw, 2.5rem); cursor: pointer; box-shadow: 0 6px 0 #27ae60, 0 8px 12px rgba(0,0,0,0.1); font-family: 'Amiri', serif; font-weight: bold; }
.option-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #27ae60; }

.pet-avatar { position: fixed; bottom: 20px; left: 20px; width: 85px; height: 85px; background: white; border-radius: 50%; border: 4px solid #ffd166; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 10; }
.bounce { animation: bounceAnim 0.5s infinite alternate; }
@keyframes bounceAnim { from { transform: translateY(0); } to { transform: translateY(-20px); } }

h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); color: #fff; text-shadow: 2px 2px 0px #0b5345; text-align: center; margin-bottom: 20px; }
.btn-besar { background: #ffd166; color: #333; border: none; padding: 15px; font-size: clamp(1.1rem, 4vw, 1.5rem); border-radius: 20px; cursor: pointer; box-shadow: 0 6px 0 #d4ac0d; width: 100%; max-width: 400px; text-align: center; font-weight: bold; }
.btn-besar:active { transform: translateY(4px); box-shadow: 0 2px 0 #d4ac0d; }
.character-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; width: 100%; max-width: 400px; margin-bottom: 20px; }
.char-card { background: white; border-radius: 20px; padding: 15px; text-align: center; border: 4px solid #ffd166; cursor: pointer; }
.char-card.selected { background: #e8f8f5; border-color: #11998e; transform: scale(1.05); }
.map-header { display: flex; justify-content: space-between; width: 100%; max-width: 450px; font-size: clamp(0.9rem, 3vw, 1.2rem); color: white; margin-bottom: 15px; padding: 0 10px;}
.level-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 15px; background: rgba(255,255,255,0.4); border-radius: 20px; width: 100%; max-width: 450px; max-height: 60vh; overflow-y: auto; }
.level-btn { background: #ffd166; color: #333; border: none; border-radius: 12px; font-size: clamp(1rem, 3.5vw, 1.3rem); aspect-ratio: 1; box-shadow: 0 5px 0 #d4ac0d; cursor: pointer; font-weight: bold;}
.modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); justify-content: center; align-items: center; z-index: 999; padding: 20px;}
.modal-content { background: white; padding: 30px; border-radius: 30px; text-align: center; border: 6px solid #38ef7d; width: 100%; max-width: 400px; animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popUp { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.dana-box:active { transform: scale(0.98); background: #d0e8ff !important; }