/* ===================================================================
   PETUALANGAN CAHAYA & MATA - STYLE CSS (RAMAH ANAK SD)
   =================================================================== */

:root {
  --font-main: 'Fredoka', 'Nunito', 'Segoe UI', cursive, sans-serif;
  --font-body: 'Nunito', 'Fredoka', sans-serif;
  
  --primary-yellow: #FFC72C;
  --sky-blue: #38B6FF;
  --fresh-green: #38B000;
  --bright-orange: #FF6B35;
  --coral-red: #E63946;
  --card-bg: #FFFFFF;
  --text-dark: #2C3E50;
  --text-muted: #5A6B7C;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #BEE3F8 0%, #E2F1AF 50%, #FFE082 100%);
  background-attachment: fixed;
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.bg-decorations {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.decor-bubble {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.28;
  animation: floatUp 16s infinite linear;
}
.b1 { left: 5%; bottom: -50px; animation-duration: 18s; font-size: 2.8rem; }
.b2 { left: 20%; bottom: -50px; animation-duration: 22s; animation-delay: 3s; font-size: 2.5rem; }
.b3 { left: 45%; bottom: -50px; animation-duration: 16s; animation-delay: 1s; font-size: 2.6rem; }
.b4 { left: 65%; bottom: -50px; animation-duration: 24s; animation-delay: 5s; font-size: 2rem; }
.b5 { left: 82%; bottom: -50px; animation-duration: 19s; animation-delay: 2s; font-size: 2.3rem; }
.b6 { left: 92%; bottom: -50px; animation-duration: 21s; animation-delay: 4s; font-size: 2.5rem; }
.b7 { left: 35%; bottom: -50px; animation-duration: 25s; animation-delay: 7s; font-size: 2.2rem; }

@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.35; }
  90% { opacity: 0.35; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* GLOBAL TOP BAR */
.global-header {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 1100px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 4px solid #FFD13B;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  border-radius: 0 0 24px 24px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 100;
}

.global-header.hidden { display: none !important; }

.header-left, .header-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-mini-title { display: flex; flex-direction: column; }

.badge-sd {
  font-family: var(--font-main);
  background: #FF6B35;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  width: fit-content;
}

.title-text {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1A365D;
}

.hearts-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFF0F3;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #FF8FA3;
  box-shadow: 0 3px 0 #FF4D6D;
}

.heart-label {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  color: #C9184A;
}

.hearts-row { display: flex; gap: 4px; }

.heart-icon {
  font-size: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
}

.heart-icon.lost {
  filter: grayscale(100%) opacity(0.35);
  transform: scale(0.75);
}

.heart-icon.shake { animation: heartShake 0.5s ease-in-out; }

@keyframes heartShake {
  0%, 100% { transform: scale(1.3) rotate(0deg); }
  25% { transform: scale(1.3) rotate(-15deg); }
  75% { transform: scale(1.3) rotate(15deg); }
}

.btn-sound {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  background: #E8F5E9;
  border: 2px solid #66BB6A;
  color: #2E7D32;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 #388E3C;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-sound.muted {
  background: #FFEBEE;
  border-color: #EF5350;
  color: #C62828;
  box-shadow: 0 3px 0 #D32F2F;
}

.btn-icon-round {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-main);
  font-weight: 700;
  background: #E3F2FD;
  border: 2px solid #42A5F5;
  color: #1565C0;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 #1976D2;
}

/* SCREENS & BUTTONS */
.app-container {
  width: 100%;
  max-width: 1100px;
  padding: 20px 15px 40px;
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.screen { width: 100%; animation: fadeInScreen 0.4s ease-out; }
.screen.hidden { display: none !important; }

@keyframes fadeInScreen {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-3d {
  font-family: var(--font-main);
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 18px;
  padding: 12px 24px;
  font-size: 1.05rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-3d:active { transform: translateY(4px); }

.btn-primary { background: #38B6FF; color: white; box-shadow: 0 6px 0 #0084D1; }
.btn-primary:active { box-shadow: 0 2px 0 #0084D1; }

.btn-secondary { background: #FFC72C; color: #5D4300; box-shadow: 0 6px 0 #C99600; }
.btn-secondary:active { box-shadow: 0 2px 0 #C99600; }

.btn-start {
  background: linear-gradient(180deg, #FF6B35 0%, #F24C00 100%);
  color: white;
  font-size: 1.35rem;
  padding: 16px 36px;
  border-radius: 24px;
  box-shadow: 0 8px 0 #B83200, 0 12px 25px rgba(242, 76, 0, 0.35);
}

.btn-success { background: #38B000; color: white; box-shadow: 0 6px 0 #1F7A00; }
.btn-warning { background: #FF9F1C; color: white; box-shadow: 0 6px 0 #C47100; }
.btn-nav { background: #ECEFF1; color: #455A64; box-shadow: 0 5px 0 #B0BEC5; font-size: 0.95rem; padding: 10px 18px; }
.btn-nav-primary { background: #48CAE4; color: #003049; box-shadow: 0 5px 0 #0077B6; font-size: 1rem; padding: 10px 22px; }

.btn-quiz-ready {
  background: linear-gradient(180deg, #FF6B35, #E63946);
  color: white;
  box-shadow: 0 6px 0 #9E1B24;
  animation: pulseButton 1.6s infinite ease-in-out;
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.btn-pill {
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  background: white;
  color: #2C3E50;
  border: 2px solid #CFD8DC;
  box-shadow: 0 3px 0 #B0BEC5;
}

/* START SCREEN */
.start-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 36px;
  padding: 35px 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1), 0 0 0 6px #FFF4C2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.start-badge {
  display: inline-block;
  background: linear-gradient(90deg, #FF6B35, #FFB703);
  color: white;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 6px 18px;
  border-radius: 24px;
  margin-bottom: 12px;
}

.main-title { font-family: var(--font-main); line-height: 1.15; margin-bottom: 15px; }
.title-glow { font-size: 1.9rem; color: #023E8A; text-shadow: 2px 2px 0 #90E0EF; }
.title-highlight {
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(180deg, #FF4800 0%, #FF9E00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.title-sub { font-size: 1.45rem; font-weight: 700; color: #38B000; display: block; margin-top: 5px; }

.start-tagline { font-size: 1.1rem; color: var(--text-muted); max-width: 620px; margin: 0 auto 24px; }

.characters-duo-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 30px;
  margin: 20px 0 30px;
  flex-wrap: wrap;
}

.char-actor { display: flex; flex-direction: column; align-items: center; max-width: 320px; }

.char-img-wrapper {
  width: 200px; height: 240px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, #FFFDE7 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.char-avatar { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.15)); }
.img-budi { animation: gentleFloat1 3.5s ease-in-out infinite; }
.img-rani { animation: gentleFloat2 3.8s ease-in-out infinite; }
.img-lumi { animation: gentleFloat1 3.5s ease-in-out infinite; }

.characters-single-stage {
  justify-content: center;
  margin: 15px 0 25px;
}
.characters-single-stage .char-actor {
  max-width: 460px;
}
.char-img-lumi {
  width: 240px;
  height: 270px;
  background: radial-gradient(circle, #F0FDF4 0%, rgba(255,255,255,0) 70%);
}

@keyframes gentleFloat1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(-1.5deg); } }
@keyframes gentleFloat2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(1.5deg); } }

.char-tag { font-family: var(--font-main); font-weight: 700; font-size: 0.85rem; padding: 5px 14px; border-radius: 14px; margin-top: 10px; }
.tag-budi { background: #E1F5FE; color: #0277BD; border: 2px solid #81D4FA; }
.tag-rani { background: #FFF3E0; color: #E65100; border: 2px solid #FFCC80; }
.tag-lumi { background: linear-gradient(135deg, #ECFDF5 0%, #FEF9C3 100%); color: #065F46; border: 2px solid #34D399; box-shadow: 0 4px 10px rgba(52, 211, 153, 0.2); }
.bubble-lumi { border-color: #34D399 !important; }

.speech-bubble-floating {
  font-family: var(--font-main);
  background: #FFFFFF;
  border: 3px solid #FFD13B;
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: #2D3748;
  position: relative;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  margin-bottom: 15px;
}

.speech-bubble-floating::after {
  content: '';
  position: absolute;
  bottom: -12px; left: 50%;
  transform: translateX(-50%);
  border-width: 12px 10px 0;
  border-style: solid;
  border-color: #FFD13B transparent;
}

.start-actions { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.start-sub-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.btn-sound-start { background: #E8F5E9; border-color: #81C784; color: #2E7D32; }
.btn-leaderboard-start { background: #FEF9C3; color: #854D0E; border-color: #FDE047; }
.btn-dev-start { background: #F3E8FF; color: #6B21A8; border-color: #D8B4FE; }

/* MENU UTAMA */
.menu-container { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.menu-helper-bar { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.btn-helper {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tujuan { background: #FFF3CD; color: #856404; border: 2px solid #FFEEBA; box-shadow: 0 4px 0 #D3B042; }
.btn-tools { background: #D1ECF1; color: #0C5460; border: 2px solid #BEE5EB; box-shadow: 0 4px 0 #5E9FA8; }
.btn-tutorial { background: #E2E3E5; color: #383D41; border: 2px solid #D6D8DB; box-shadow: 0 4px 0 #909497; }
.btn-leaderboard-menu { background: #FEF08A; color: #854D0E; border: 2px solid #FACC15; box-shadow: 0 4px 0 #CA8A04; }
.btn-dev-menu { background: #F3E8FF; color: #6B21A8; border: 2px solid #D8B4FE; box-shadow: 0 4px 0 #9333EA; }

.mascot-guide-box {
  background: white;
  border-radius: 24px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-left: 8px solid #FFC72C;
}

.avatar-small {
  width: 75px; height: 75px;
  object-fit: contain;
  border-radius: 50%;
  background: #FFF9C4;
  padding: 4px;
  border: 3px solid #FFD13B;
}

.mascot-speech h3 { font-family: var(--font-main); color: #1A365D; margin-bottom: 4px; font-size: 1.15rem; }
.mascot-speech p { color: var(--text-muted); font-size: 0.95rem; }

.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }

.module-card {
  background: white;
  border-radius: 30px;
  padding: 28px 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 3px solid transparent;
}

.card-cahaya { border-color: #B3E5FC; }
.card-mata { border-color: #FFE082; }

.card-badge {
  position: absolute;
  top: 18px; right: 20px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 800;
  background: #2D3748;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
}

.card-icon-banner { font-size: 2.2rem; display: flex; gap: 8px; margin-bottom: 12px; }
.card-title { font-family: var(--font-main); font-size: 1.6rem; color: #1A365D; margin-bottom: 10px; }
.card-desc { color: var(--text-muted); font-size: 0.98rem; line-height: 1.5; margin-bottom: 24px; flex-grow: 1; }
.card-actions { display: flex; flex-direction: column; gap: 12px; }
.card-actions .btn-3d { width: 100%; }

.menu-score-preview {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-rekap { background: #E0F2FE; border-color: #7DD3FC; color: #0369A1; }

/* MATERI & SIMULASI */
.material-container { display: flex; flex-direction: column; gap: 18px; width: 100%; }

.material-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 20px;
  padding: 10px 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.material-stepper { display: flex; gap: 8px; align-items: center; }
.step-dot { width: 14px; height: 14px; border-radius: 50%; background: #E2E8F0; cursor: pointer; }
.step-dot.active { background: #FF6B35; transform: scale(1.3); }
.step-dot.completed { background: #38B000; }

.slide-indicator { font-family: var(--font-main); font-weight: 700; font-size: 0.88rem; color: #4A5568; }

.material-slide-card {
  background: white;
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slide-header { border-bottom: 2px dashed #E2E8F0; padding-bottom: 14px; }
.slide-title-wrap { display: flex; align-items: center; gap: 12px; }
.slide-icon { font-size: 2.2rem; }
.slide-title { font-family: var(--font-main); font-size: 1.65rem; color: #1A365D; }
.slide-subtitle { font-size: 0.95rem; color: #718096; }

.slide-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 25px; align-items: center; }
@media (max-width: 820px) { .slide-body { grid-template-columns: 1fr; } }

.slide-text-col { display: flex; flex-direction: column; gap: 15px; }
.slide-para { font-size: 1.05rem; line-height: 1.6; color: #2D3748; }

.slide-highlight-box {
  background: #FFF9DB;
  border-left: 5px solid #FFD43B;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.98rem;
  color: #5C4300;
}

.slide-guide-box {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #F0FDF4;
  border: 2px solid #BBF7D0;
  border-radius: 18px;
  padding: 12px 16px;
}

.slide-guide-avatar {
  width: 60px; height: 60px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
  border: 2px solid #86EFAC;
}

.slide-guide-text { font-size: 0.92rem; color: #166534; }
.slide-guide-text strong { display: block; font-family: var(--font-main); color: #14532D; }

.simulation-widget {
  background: #F8FAFC;
  border: 3px solid #CBD5E1;
  border-radius: 24px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sim-title-badge {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.82rem;
  background: #475569;
  color: white;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.sim-canvas-box {
  width: 100%;
  max-width: 380px;
  height: 270px;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
}

.sim-controls-row {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.sim-slider-label {
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-slider { accent-color: #FF6B35; cursor: pointer; width: 150px; }

/* Eye Interactive Hotspots */
.eye-interactive-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 280px;
  background: #FFFBF7;
  border-radius: 18px;
  border: 2px solid #E2E8F0;
  overflow: hidden;
}

.hotspot-btn {
  position: absolute;
  background: #E11D48;
  color: white;
  border: 2.5px solid white;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.65);
  animation: hotspotPulse 1.8s infinite;
  z-index: 5;
  transition: transform 0.2s, background 0.2s;
}

.hotspot-btn:hover, .hotspot-btn.active-spot {
  transform: scale(1.28);
  background: #0284C7;
}

@keyframes hotspotPulse {
  0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.eye-part-info-box {
  margin-top: 10px;
  background: #EFF6FF;
  border: 2px solid #BFDBFE;
  border-radius: 14px;
  padding: 10px 14px;
  width: 100%;
  min-height: 60px;
  font-size: 0.88rem;
  color: #1E40AF;
  line-height: 1.4;
  text-align: center;
}

.material-nav-buttons { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; }

/* QUIZ SCREEN */
.quiz-container { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 850px; margin: 0 auto; }

.quiz-header-bar {
  background: white;
  border-radius: 20px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-meta-info { display: flex; justify-content: space-between; align-items: center; }
.quiz-pack-title { font-family: var(--font-main); font-weight: 700; font-size: 1.05rem; color: #1A365D; }
.quiz-number-tag { font-family: var(--font-main); font-weight: 700; font-size: 0.88rem; background: #E0F2FE; color: #0369A1; padding: 4px 12px; border-radius: 12px; }
.quiz-progress-track { width: 100%; height: 12px; background: #E2E8F0; border-radius: 10px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, #FF9E00, #FF6B35); transition: width 0.35s ease; }

.quiz-card {
  background: white;
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-illustration {
  width: 100%;
  height: 185px;
  background: #F8FAFC;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #CBD5E1;
  overflow: hidden;
}

.quiz-question-wrapper { text-align: center; }
.quiz-question-text { font-family: var(--font-main); font-size: 1.32rem; color: #1E293B; }

.quiz-options-list { display: flex; flex-direction: column; gap: 12px; }

.quiz-opt-btn {
  background: #F8FAFC;
  border: 3px solid #E2E8F0;
  border-radius: 20px;
  padding: 13px 18px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.03rem;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 4px 0 #CBD5E1;
  transition: all 0.15s ease;
}

.quiz-opt-btn:hover:not(:disabled) {
  background: #EFF6FF;
  border-color: #93C5FD;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #60A5FA;
}

.opt-letter {
  font-family: var(--font-main);
  background: #E2E8F0;
  color: #475569;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.quiz-opt-btn.correct { background: #DCFCE7 !important; border-color: #22C55E !important; color: #15803D !important; box-shadow: 0 4px 0 #16A34A !important; }
.quiz-opt-btn.correct .opt-letter { background: #22C55E; color: white; }

.quiz-opt-btn.wrong { background: #FEE2E2 !important; border-color: #EF4444 !important; color: #B91C1C !important; box-shadow: 0 4px 0 #DC2626 !important; animation: shakeOpt 0.4s ease; }
.quiz-opt-btn.wrong .opt-letter { background: #EF4444; color: white; }

@keyframes shakeOpt {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.quiz-feedback-box {
  background: #F1F5F9;
  border-radius: 22px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quiz-feedback-box.hidden { display: none !important; }
.quiz-feedback-box.state-correct { background: #ECFDF5; border: 3px solid #6EE7B7; }
.quiz-feedback-box.state-wrong { background: #FFF1F2; border: 3px solid #FDA4AF; }

.feedback-header { display: flex; justify-content: space-between; align-items: center; }
.feedback-badge { font-family: var(--font-main); font-size: 1.12rem; font-weight: 800; }
.quiz-feedback-box.state-correct .feedback-badge { color: #047857; }
.quiz-feedback-box.state-wrong .feedback-badge { color: #BE123C; }
.avatar-tiny { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; background: white; border: 2px solid #CBD5E1; }
.feedback-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* CELEBRATE, GAMEOVER, FINAL SCORE, LEADERBOARD */
.celebrate-card, .gameover-card, .goodbye-card {
  background: white;
  border-radius: 36px;
  padding: 35px 25px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.celebrate-badge { font-family: var(--font-main); font-weight: 800; background: #FEF08A; color: #854D0E; padding: 6px 20px; border-radius: 20px; display: inline-block; margin-bottom: 12px; }
.celebrate-title { font-family: var(--font-main); font-size: 2.1rem; color: #1A365D; margin-bottom: 18px; }
.celebrate-character-wrap { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.celebrate-char { width: 125px; height: 150px; object-fit: contain; }
.char-bounce-1 { animation: bounceCeleb 1.2s infinite alternate; }
.char-bounce-2 { animation: bounceCeleb 1.2s infinite alternate 0.25s; }
@keyframes bounceCeleb { 0% { transform: translateY(0); } 100% { transform: translateY(-12px); } }

.score-summary-box { background: #F0F9FF; border: 3px solid #BAE6FD; border-radius: 24px; padding: 20px; margin-bottom: 22px; }
.score-number { font-family: var(--font-main); font-size: 3.2rem; font-weight: 900; color: #0284C7; }
.score-denom { font-family: var(--font-main); font-size: 1.4rem; color: #64748B; }
.complete-actions, .gameover-actions { display: flex; flex-direction: column; gap: 12px; }

.gameover-icon { font-size: 4rem; margin-bottom: 8px; }
.gameover-title { font-family: var(--font-main); font-size: 2rem; color: #E11D48; margin-bottom: 15px; }
.gameover-mascot { display: flex; align-items: center; gap: 15px; background: #FFF1F2; border-radius: 20px; padding: 16px; margin-bottom: 25px; text-align: left; }
.char-avatar-medium { width: 85px; height: 85px; object-fit: contain; border-radius: 50%; background: white; border: 3px solid #FECDD3; }

.final-score-container { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.final-header { text-align: center; background: white; border-radius: 26px; padding: 24px; }
.final-title { font-family: var(--font-main); font-size: 2rem; color: #1A365D; }
.score-cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.summary-card { background: white; border-radius: 24px; padding: 20px; text-align: center; border-top: 6px solid #CBD5E1; }
.score-a-card { border-color: #38B6FF; }
.score-b-card { border-color: #FFC72C; }
.score-total-card { border-color: #38B000; }
.score-time-card { border-color: #06B6D4; }
.sc-badge { font-family: var(--font-main); font-size: 0.75rem; font-weight: 800; background: #E2E8F0; padding: 3px 10px; border-radius: 10px; display: inline-block; margin-bottom: 8px; }
.sc-value { font-family: var(--font-main); font-size: 2.1rem; font-weight: 900; color: #0F172A; margin: 6px 0; }

.tips-board { background: white; border-radius: 26px; padding: 24px; display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; border-left: 8px solid #FF8FA3; }
@media (max-width: 650px) { .tips-board { grid-template-columns: 1fr; text-align: center; } }
.tips-avatar { width: 90px; height: 90px; object-fit: contain; border-radius: 50%; background: #FFF0F3; border: 3px solid #FF8FA3; }
.tips-content-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

.review-section, .final-actions-box, .leaderboard-section { background: white; border-radius: 26px; padding: 26px; }
.review-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.review-item { border: 2px solid #E2E8F0; border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.review-item.status-correct { border-color: #86EFAC; background: #F0FDF4; }
.review-item.status-wrong { border-color: #FECDD3; background: #FFF1F2; }
.review-item-header { display: flex; justify-content: space-between; align-items: center; }
.review-status-pill { font-family: var(--font-main); font-size: 0.78rem; font-weight: 800; padding: 3px 10px; border-radius: 10px; color: white; }
.pill-benar { background: #22C55E; }
.pill-salah { background: #EF4444; }
.pill-belum { background: #94A3B8; }

.final-actions-box { text-align: center; }
.repeat-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 16px; }

/* MODAL POPUPS */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none !important; }

.modal-content {
  background: white;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 30px;
  padding: 26px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px dashed #E2E8F0; padding-bottom: 12px; }
.modal-badge { font-family: var(--font-main); font-size: 1rem; font-weight: 800; color: #1A365D; }
.btn-modal-close { background: #F1F5F9; border: none; font-size: 1.2rem; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.modal-guide-speech { display: flex; align-items: center; gap: 15px; background: #FFF9DB; border-radius: 18px; padding: 12px 18px; margin-bottom: 16px; }

.tujuan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.t-card, .tool-item, .tut-step { background: #F8FAFC; border: 2px solid #E2E8F0; border-radius: 18px; padding: 14px; }
.tools-grid, .tutorial-steps { display: flex; flex-direction: column; gap: 12px; }
.tool-item, .tut-step { display: flex; align-items: center; gap: 14px; }
.tut-num { font-family: var(--font-main); font-weight: 900; background: #38B6FF; color: white; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-footer { display: flex; justify-content: flex-end; }

/* PROFIL TIM PENGEMBANG */
.modal-dev-box { max-width: 540px; max-height: 90vh; overflow-y: auto; }

.dev-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 3px solid #BAE6FD;
  border-radius: 24px;
  padding: 22px 20px;
  text-align: center;
}

.dev-photo-frame {
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid #FFFFFF;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.2);
  background: #E2E8F0;
}

.dev-team-photo {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.dev-info-fields {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-field-group {
  background: #FFFFFF;
  border: 2px solid #93C5FD;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.dev-field-label {
  display: block;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: #0284C7;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dev-team-names {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 800;
  color: #1E293B;
  line-height: 1.4;
}

/* HEADER PILLS, INPUT NAMA, LOCK & LEADERBOARD */
.header-player-pill { display: flex; align-items: center; gap: 6px; background: #FEF3C7; border: 2px solid #F59E0B; padding: 4px 12px; border-radius: 16px; }
.player-name-text { font-family: var(--font-main); font-weight: 700; font-size: 0.88rem; color: #92400E; }

.header-timer-pill { display: flex; align-items: center; gap: 5px; background: #E0F2FE; border: 2px solid #38BDF8; padding: 4px 12px; border-radius: 16px; }
.timer-text { font-family: var(--font-main); font-weight: 800; font-size: 0.88rem; color: #0369A1; }

.player-name-card { background: #FFFBEB; border: 3px solid #FCD34D; border-radius: 22px; padding: 18px 22px; max-width: 520px; margin: 0 auto 24px; }
.name-input-label { display: block; font-family: var(--font-main); font-weight: 700; font-size: 1.05rem; color: #B45309; margin-bottom: 10px; }
.name-input-wrapper { display: flex; align-items: center; background: white; border: 3px solid #F59E0B; border-radius: 18px; padding: 8px 16px; }
.student-name-input { width: 100%; border: none; outline: none; font-family: var(--font-main); font-size: 1.15rem; font-weight: 700; color: #1E293B; margin-left: 8px; }
.name-validation-msg { font-family: var(--font-main); font-size: 0.92rem; font-weight: 700; color: #DC2626; margin-top: 10px; }
.name-validation-msg.hidden { display: none !important; }

.module-card.module-locked { background: #F1F5F9; border-color: #CBD5E1; }
.lock-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(30, 41, 59, 0.74);
  backdrop-filter: blur(3px);
  border-radius: 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; z-index: 20; color: white; text-align: center;
}
.lock-badge-icon { font-size: 3.2rem; margin-bottom: 8px; }
.lock-notice-title { font-family: var(--font-main); font-size: 1.25rem; font-weight: 900; color: #FEF08A; margin-bottom: 6px; }
.lock-notice-desc { font-size: 0.95rem; color: #E2E8F0; }

.leaderboard-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px dashed #E2E8F0; padding-bottom: 16px; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.lb-title-wrap { display: flex; align-items: center; gap: 14px; }
.lb-trophy-icon { font-size: 2.6rem; }
.lb-main-title { font-family: var(--font-main); font-size: 1.55rem; color: #1A365D; }
.podium-stage { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 15px 0 25px; padding-top: 20px; }
.podium-card { display: flex; flex-direction: column; align-items: center; width: 130px; text-align: center; position: relative; }
.podium-avatar-wrap { font-size: 2.2rem; margin-bottom: 4px; position: relative; }
.podium-crown { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 1.4rem; }
.podium-name { font-family: var(--font-main); font-weight: 700; font-size: 0.95rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-size: 0.82rem; font-weight: 800; color: #2563EB; }
.podium-time { font-size: 0.78rem; color: #059669; font-weight: 700; }
.podium-block { width: 100%; border-radius: 14px 14px 0 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-main); font-weight: 900; font-size: 1.6rem; color: white; margin-top: 6px; }
.podium-rank-1 .podium-block { height: 110px; background: linear-gradient(180deg, #F59E0B, #D97706); }
.podium-rank-2 .podium-block { height: 85px; background: linear-gradient(180deg, #94A3B8, #64748B); }
.podium-rank-3 .podium-block { height: 65px; background: linear-gradient(180deg, #D97706, #B45309); }

.leaderboard-table-wrapper { overflow-x: auto; border-radius: 18px; border: 2px solid #E2E8F0; }
.leaderboard-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.92rem; }
.leaderboard-table th { background: #F1F5F9; font-family: var(--font-main); padding: 12px 14px; border-bottom: 2px solid #CBD5E1; }
.leaderboard-table td { padding: 10px 14px; border-bottom: 1px solid #E2E8F0; }
.row-current-player { background: #FEF3C7 !important; font-weight: 700; }
.badge-you { background: #EF4444; color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 8px; margin-left: 6px; }
.rank-badge { font-family: var(--font-main); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; }
.rb-1 { background: #FEF08A; color: #854D0E; }
.rb-2 { background: #E2E8F0; color: #334155; }
.rb-3 { background: #FFEDD5; color: #9A3412; }
.rb-other { background: #F8FAFC; color: #64748B; }
.modal-leaderboard-box { max-width: 760px; }
.hidden { display: none !important; }