/* ==========================================================================
   MINI-GAMES, LEARNING MODE & COLLECTION STYLES
   ========================================================================== */

/* Header / Instruksi Game Area */
.game-play-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  height: 100%;
  padding: 10px 15px 25px;
  position: relative;
}

.game-instruction-banner {
  background: rgba(255, 255, 255, 0.95);
  border: 4px solid #ffd214;
  border-radius: var(--radius-full);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  margin-bottom: 12px;
  animation: popIn 0.3s ease;
  max-width: 95%;
}

.instruction-text {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  color: #2c3e50;
  text-align: center;
}

.btn-speak-instruction {
  background: #ff9f1a;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 0 #c25e00;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.btn-speak-instruction:active {
  transform: scale(0.92);
}

/* Status & Progress Bar Bulat */
.game-progress-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid #ffffff;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.progress-dot.active {
  background: #ffd214;
  transform: scale(1.3);
  box-shadow: 0 0 10px #ffd214;
}

.progress-dot.completed {
  background: #2ebd36;
}

/* ==========================================================================
   MINI GAME 1: HITUNG BUAH
   ========================================================================== */

.fruit-stage-container {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  border: 4px dashed #ff9f1a;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.fruit-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 600px;
}

.fruit-item {
  font-size: clamp(3rem, 7vw, 4.5rem);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: fruitPopIn 0.4s ease backwards;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.fruit-item:hover {
  transform: scale(1.2) rotate(10deg);
}

.fruit-item.counted {
  transform: scale(1.25);
  filter: drop-shadow(0 0 12px #ffd214);
  animation: fruitWiggle 0.4s ease;
}

.counting-options-grid {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 550px;
  justify-content: center;
}

.btn-number-option {
  flex: 1;
  max-width: 130px;
  height: 85px;
  font-size: 2.5rem;
  font-weight: 900;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #ff4757;
  border: 4px solid #ff4757;
  box-shadow: 0 8px 0 #cf1727, 0 12px 18px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-number-option:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 #cf1727, 0 4px 8px rgba(0, 0, 0, 0.1);
}

.number-dots-guide {
  display: flex;
  gap: 3px;
  margin-top: -4px;
}

.number-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4757;
}

/* ==========================================================================
   MINI GAME 2: MENGENAL HURUF
   ========================================================================== */

.letter-hero-badge {
  background: linear-gradient(135deg, #00d2d3, #0abde3);
  color: #ffffff;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 900;
  border: 5px solid #ffffff;
  box-shadow: 0 8px 20px rgba(10, 189, 227, 0.4), 0 0 25px rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
  animation: letterPulse 2s infinite ease-in-out;
}

.letter-choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 650px;
  flex: 1;
  align-items: center;
}

.letter-choice-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 4px solid #54a0ff;
  box-shadow: 0 8px 0 #2e86de, 0 12px 18px rgba(0, 0, 0, 0.12);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.letter-choice-card:hover {
  transform: translateY(-6px) scale(1.03);
}

.letter-choice-card:active {
  transform: translateY(4px) scale(0.97);
  box-shadow: 0 2px 0 #2e86de, 0 4px 8px rgba(0, 0, 0, 0.1);
}

.letter-choice-emoji {
  font-size: clamp(3rem, 6vw, 4.5rem);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.letter-choice-label {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark-text);
  text-align: center;
}

/* ==========================================================================
   MINI GAME 3: MENGENAL WARNA
   ========================================================================== */

.color-target-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  margin-bottom: 15px;
  animation: bounceSmall 2s infinite ease-in-out;
}

.color-choices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 550px;
  flex: 1;
  align-items: center;
}

.color-choice-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 5px solid #eaeaea;
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  transition: transform 0.15s ease;
}

.color-choice-card:hover {
  transform: scale(1.05);
}

.color-choice-card:active {
  transform: scale(0.95);
}

.color-item-icon {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.color-item-name {
  font-size: 1.3rem;
  font-weight: 800;
}

/* ==========================================================================
   MINI GAME 4: MENGENAL BENTUK
   ========================================================================== */

.shapes-choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 650px;
  flex: 1;
  align-items: center;
}

.shape-choice-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 4px solid #a55eea;
  box-shadow: 0 8px 0 #8854d0, 0 12px 18px rgba(0,0,0,0.12);
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.shape-choice-card:hover {
  transform: translateY(-6px) scale(1.03);
}

.shape-choice-card:active {
  transform: translateY(4px) scale(0.96);
  box-shadow: 0 2px 0 #8854d0;
}

.shape-svg-wrapper {
  width: 85px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shape-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark-text);
}

/* ==========================================================================
   MINI GAME 5: PUZZLE SERU (DRAG & DROP)
   ========================================================================== */

.puzzle-game-board {
  flex: 1;
  width: 100%;
  max-width: 750px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  gap: 15px;
}

.puzzle-frame {
  position: relative;
  width: 320px;
  height: 240px;
  background: rgba(255, 255, 255, 0.9);
  border: 5px solid #2ed573;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  overflow: hidden;
}

.puzzle-target-slot {
  position: absolute;
  border: 3px dashed #7bed9f;
  background: rgba(123, 237, 159, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.puzzle-target-slot.hover-active {
  background: rgba(46, 213, 115, 0.4);
  border-color: #2ed573;
  transform: scale(1.02);
}

.puzzle-target-slot.filled {
  border: 3px solid #2ed573;
  background: transparent;
}

.puzzle-pieces-tray {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border: 4px solid #70a1ff;
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 100px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  overflow-x: auto;
}

.puzzle-piece {
  cursor: grab;
  touch-action: none;
  transition: transform 0.15s ease, filter 0.15s ease;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.2));
  user-select: none;
}

.puzzle-piece:active, .puzzle-piece.is-dragging {
  cursor: grabbing;
  transform: scale(1.15);
  z-index: 1000 !important;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,0.3));
}

.puzzle-piece.placed {
  cursor: default;
  transform: none !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* ==========================================================================
   MODUL BELAJAR / FLASHCARD EXPLORER
   ========================================================================== */

.learning-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  height: 100%;
  overflow-y: auto;
  padding: 10px 15px 30px;
}

.learning-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.learning-tab-btn {
  background: #ffffff;
  border: 3px solid #74b9ff;
  color: #0984e3;
  font-family: var(--font-fun);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.learning-tab-btn.active {
  background: #0984e3;
  color: #ffffff;
  box-shadow: 0 6px 12px rgba(9, 132, 227, 0.3);
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  width: 100%;
}

.learning-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 4px solid #ffeaa7;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learning-card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 20px rgba(0,0,0,0.15);
  border-color: #ffd214;
}

.learning-card-symbol {
  font-size: 3rem;
  font-weight: 900;
  color: #ff7675;
}

.learning-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark-text);
}

/* ==========================================================================
   HALAMAN KOLEKSIKU & TROPHY SHOWCASE
   ========================================================================== */

.collection-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 950px;
  height: 100%;
  overflow-y: auto;
  padding: 10px 15px 30px;
  gap: 20px;
}

.collection-stats-card {
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 4px solid #ffd214;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 2.6rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--dark-text);
}

.stat-label {
  font-size: 0.95rem;
  color: #7f8c8d;
  font-weight: 700;
}

.section-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.section-heading {
  font-size: 1.5rem;
  font-weight: 900;
  color: #2c3e50;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.trophy-card {
  background: #f8f9fa;
  border: 3px solid #dfe4ea;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.trophy-card.unlocked {
  background: #fff9e6;
  border-color: #ffd214;
  box-shadow: 0 6px 14px rgba(255, 210, 20, 0.25);
}

.trophy-icon {
  font-size: 2.8rem;
  filter: grayscale(1) opacity(0.4);
}

.trophy-card.unlocked .trophy-icon {
  filter: none;
  animation: pulseScale 2s infinite ease-in-out;
}

.trophy-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark-text);
}

.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.wardrobe-item-card {
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.wardrobe-item-card.equipped {
  border-color: #2ed573;
  background: #f0fff4;
  box-shadow: 0 4px 12px rgba(46, 213, 115, 0.3);
}

/* ==========================================================================
   PENGATURAN & PARENT GATE
   ========================================================================== */

.settings-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 5px solid #74b9ff;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.settings-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0984e3;
  text-align: center;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 2px dashed #f1f2f6;
  font-size: 1.2rem;
  font-weight: 800;
}

.toggle-switch {
  position: relative;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .toggle-slider {
  background-color: #2ebd36;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* Parent Gate Modal */
.parent-gate-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 5px solid #ff7675;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.parent-quiz-text {
  font-size: 1.8rem;
  font-weight: 900;
  color: #d63031;
}

.parent-quiz-input {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 3px solid #dfe6e9;
  outline: none;
  font-family: var(--font-fun);
}

/* ==========================================================================
   EXTRA ANIMATIONS
   ========================================================================== */

@keyframes fruitPopIn {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fruitWiggle {
  0%, 100% { transform: scale(1.25) rotate(0deg); }
  25% { transform: scale(1.25) rotate(-12deg); }
  75% { transform: scale(1.25) rotate(12deg); }
}

@keyframes letterPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(10, 189, 227, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 12px 30px rgba(10, 189, 227, 0.7); }
}
