/* =========================================================================
   DeenNest: Games & Learning Suite
   Aesthetic: Forest Green (#245c45), Warm Sage (#e4eadb), Gold (#d4a359),
              Terracotta Russet (#7c3418), Sandstone Linen (#f7f5ef), Deep Cosmos (#0d1e18)
   ========================================================================= */

/* --- Quick Access Cards on Home Dashboard --- */
.dn-kids-quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 20px;
}
.dn-kids-quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2eae0);
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: var(--text, #1c2b24);
  box-shadow: 0 2px 8px rgba(36, 92, 69, 0.05);
  font: inherit;
  width: 100%;
}
.dn-kids-quick-card:hover {
  transform: translateY(-2px);
  border-color: #245c45;
  box-shadow: 0 4px 14px rgba(36, 92, 69, 0.12);
}
.dn-kids-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: #eef3e8;
  border: 1px solid #dbe6d6;
}
.dn-kids-quick-card.gold .dn-kids-quick-icon {
  background: #fdf6e6;
  border-color: #f3e2b9;
}
.dn-kids-quick-text strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #245c45;
}
.dn-kids-quick-card.gold .dn-kids-quick-text strong {
  color: #7c3418;
}
.dn-kids-quick-text small {
  display: block;
  font-size: 11.5px;
  color: #63776c;
  margin-top: 2px;
}

/* --- Main Games Hub Shell --- */
.kids-hub-page {
  padding-bottom: 30px;
}
.kids-hub-header {
  margin-bottom: 18px;
}
.kids-hub-header h1 {
  margin: 4px 0 6px;
}

/* Navigation Tabs */
.kids-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border, #e2eae0);
  padding-bottom: 6px;
  overflow-x: auto;
}
.kids-tab-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted, #63776c);
  transition: all 0.18s ease;
  white-space: nowrap;
}
.kids-tab-btn.active {
  background: #245c45;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(36, 92, 69, 0.25);
}
.kids-tab-btn:hover:not(.active) {
  background: rgba(36, 92, 69, 0.08);
  color: #245c45;
}

/* =========================================================================
   Flashcards (Automated Quiz / Guess Mode & Audio)
   ========================================================================= */
.flashcards-view {
  max-width: 480px;
  margin: 0 auto;
}
.flashcard-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #245c45;
  margin-bottom: 14px;
  padding: 0 4px;
}
.flashcard-progress-pill {
  background: #eaf1e7;
  color: #245c45;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  border: 1px solid #d4e2cf;
}

/* 3D Flip Card Scene */
.flashcard-scene {
  width: 100%;
  height: 250px;
  perspective: 1200px;
  cursor: pointer;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}
.flashcard-scene.is-flipped .flashcard-inner {
  transform: rotateY(180deg);
}
.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--card-bg, #ffffff);
  border: 2px solid var(--border, #e2eae0);
  box-shadow: 0 8px 24px rgba(36, 92, 69, 0.08);
}
.flashcard-scene.is-flipped .flashcard-front {
  display: none !important;
}
.flashcard-scene.is-flipped .flashcard-back {
  display: flex !important;
}

/* Front Face */
.flashcard-front {
  background: linear-gradient(135deg, #ffffff 0%, #f6faf4 100%);
  border-color: #245c45;
}
.flashcard-front .tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #245c45;
  background: #e4eadb;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
}
.flashcard-front .arabic-huge {
  font-size: 78px;
  line-height: 1.1;
  font-family: 'Amiri', serif;
  color: #245c45;
  margin: 4px 0;
  text-shadow: 0 2px 8px rgba(36, 92, 69, 0.15);
}
.flashcard-hint {
  font-size: 11.5px;
  color: var(--muted, #63776c);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Back Face */
.flashcard-back {
  background: linear-gradient(135deg, #fdfbf7 0%, #f4eee2 100%);
  border-color: #d4a359;
  transform: rotateY(180deg);
}
.letter-name-en {
  font-size: 26px;
  font-weight: 800;
  color: #7c3418;
  margin-bottom: 2px;
}
.letter-phonetic {
  font-size: 13.5px;
  font-weight: 600;
  color: #245c45;
  margin-bottom: 12px;
}
.example-box {
  background: #ffffff;
  padding: 8px 18px;
  border-radius: 14px;
  border: 1px solid #ebdcc5;
  display: flex;
  align-items: center;
  gap: 12px;
}
.example-ar {
  font-family: 'Amiri', serif;
  font-size: 26px;
  color: #245c45;
  font-weight: bold;
}
.example-en {
  font-size: 13px;
  color: #555555;
  font-weight: 600;
}

/* Automated Quiz Guessing Tray */
.flashcard-guess-container {
  margin-top: 18px;
}
.guess-tray-title {
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #245c45;
  margin-bottom: 10px;
}
.guess-success-msg {
  color: #0f6b4a;
  font-size: 15px;
  animation: pulseGlow 1.5s ease-in-out infinite alternate;
}
.flashcard-guess-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.guess-option-btn {
  background: #ffffff;
  border: 1.5px solid #c7d8c4;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: #245c45;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.guess-option-btn:hover:not(:disabled) {
  border-color: #245c45;
  background: #f4faf2;
  transform: translateY(-2px);
}
.guess-option-btn.correct {
  background: #245c45 !important;
  color: #ffffff !important;
  border-color: #1a4231 !important;
  box-shadow: 0 4px 14px rgba(36, 92, 69, 0.35);
  animation: correctBounce 0.4s ease;
}
@keyframes correctBounce {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.guess-option-btn.wrong {
  background: #faebe8 !important;
  color: #a82e1c !important;
  border-color: #d67a6e !important;
  animation: errorShake 0.4s ease;
}
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Flashcard Bottom Action Row */
.flashcard-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.flashcard-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease;
}
.flashcard-btn:active {
  transform: scale(0.97);
}
.flashcard-btn.practice {
  background: #eef3e8;
  color: #245c45;
  border: 1px solid #d4e2cf;
}
.flashcard-btn.flip-toggle {
  background: #f8f4ea;
  color: #7c3418;
  border: 1px solid #e7d8be;
}
.flashcard-btn.right {
  background: #245c45;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(36, 92, 69, 0.25);
}

/* =========================================================================
   River Crossing (Frogger Math Exact Mechanics & Auto-Hop Engine)
   ========================================================================= */
.sky-jumper-view {
  max-width: 540px;
  margin: 0 auto;
}
.sky-game-stage {
  background: #09171d;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  position: relative;
  border: 2px solid #2b4c59;
}

/* Top HUD */
.sky-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: #0e1a20;
  border-bottom: 1px solid #1f3744;
  color: #ffffff;
  z-index: 15;
  position: relative;
}
.sky-hud-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #d4a359;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sky-hud-lives {
  display: flex;
  gap: 2px;
  font-size: 14px;
}
.sky-hud-lives span.lost {
  opacity: 0.2;
  filter: grayscale(1);
}
.sky-hud-progress {
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(212, 163, 89, 0.2);
  color: #f7d28b;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(212, 163, 89, 0.4);
  white-space: nowrap;
}

/* Frogger Drift Timer Bar */
.frogger-timer-container {
  background: #0b151a;
  padding: 6px 14px 8px;
  border-bottom: 1px solid rgba(35, 77, 97, 0.4);
}
.frogger-timer-track {
  height: 8px;
  background: #182e3b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.frogger-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 60%, #ef4444 100%);
  border-radius: 8px;
  transition: width 0.08s linear;
}
.frogger-timer-fill.urgent {
  animation: pulseUrgent 0.6s infinite alternate;
}
@keyframes pulseUrgent {
  from { filter: brightness(1); }
  to { filter: brightness(1.4) drop-shadow(0 0 6px #ef4444); }
}
.frogger-timer-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #8da3a6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.frogger-timer-sec {
  color: #fcd34d;
  font-size: 11px;
}

/* --- River Canvas Playfield --- */
.river-stage {
  height: 380px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}
.water-bg {
  background: linear-gradient(180deg, #071c26 0%, #0d2f40 50%, #081d28 100%);
}

/* Top Safe Haven Destination Bank (Green Oasis) */
.river-bank-top {
  position: relative;
  width: 100%;
  height: 44px;
  background: linear-gradient(180deg, #1f4a38 0%, #17382b 100%);
  border-bottom: 2px solid #2d6a4f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}
.oasis-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #d1fae5;
}
.oasis-badge {
  font-size: 10px;
  font-weight: 800;
  background: #112920;
  color: #fcd34d;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(252, 211, 77, 0.3);
}

/* Water Current Lines */
.water-current-lines {
  position: absolute;
  inset: 44px 0 44px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  pointer-events: none;
  opacity: 0.18;
}
.current-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #67e8f9, transparent);
  animation: waterWaveCurrent 3s linear infinite;
}
@keyframes waterWaveCurrent {
  0% { transform: translateX(-30%); }
  100% { transform: translateX(30%); }
}

/* Middle River Play Area */
.river-play-area {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

/* Drifting Logs */
.river-log {
  position: absolute;
  height: 56px;
  min-width: 175px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  box-sizing: border-box;
  z-index: 20;
  transition: transform 0.15s ease, filter 0.15s ease;
  user-select: none;
}
.log-wood {
  background: linear-gradient(180deg, #7c4822 0%, #522d14 50%, #3a1e0b 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45), inset 0 2px 2px rgba(255, 255, 255, 0.25);
  border: 1.5px solid #8f5328;
}
.river-log.current-log {
  opacity: 0.92;
  filter: brightness(0.95);
}
.river-log .log-end {
  position: absolute;
  width: 10px;
  height: 38px;
  background: #965c32;
  border-radius: 5px;
  border: 1px solid #522d14;
}
.river-log .log-end.left { left: 4px; }
.river-log .log-end.right { right: 4px; }

.log-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}
.log-sublabel {
  font-size: 9.5px;
  font-weight: 800;
  color: #fcd34d;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}
.log-label {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
  letter-spacing: 0.5px;
}

.log-water-wake {
  position: absolute;
  bottom: -4px;
  width: 80%;
  height: 5px;
  background: rgba(34, 211, 238, 0.25);
  border-radius: 50%;
  filter: blur(2px);
  animation: pulseWake 1.8s ease-in-out infinite alternate;
}
@keyframes pulseWake {
  0% { transform: scaleX(0.85); opacity: 0.2; }
  100% { transform: scaleX(1.1); opacity: 0.45; }
}

.river-log.log-squash {
  animation: logSquashAnim 0.25s ease-out;
}
@keyframes logSquashAnim {
  0% { transform: scale(1, 1); }
  40% { transform: scale(1.15, 0.85); }
  100% { transform: scale(1, 1); }
}

/* Player Sprite */
.river-player-sprite {
  position: absolute;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.player-avatar-render {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}
.player-nametag {
  font-size: 9.5px;
  font-weight: 800;
  background: #0f6b4a;
  color: #ffffff;
  padding: 1px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.3);
  white-space: nowrap;
  margin-top: 2px;
}

/* Auto-Hop Leap Animation */
.river-player-sprite.auto-hopping {
  animation: hopParabolic 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes hopParabolic {
  0% { transform: scale(1) translate(0, 0); }
  45% { transform: scale(1.35) translate(0, -60px); }
  100% { transform: scale(1) translate(0, 0); }
}

/* Splash Miss Fall Animation */
.river-player-sprite.splash-miss {
  animation: splashFall 0.45s ease-in forwards;
}
@keyframes splashFall {
  0% { transform: scale(1) translate(0, 0); }
  45% { transform: scale(1.15) translate(20px, -25px) rotate(25deg); }
  100% { transform: scale(0.35) translate(35px, 55px) rotate(90deg); opacity: 0; }
}

.river-player-sprite.respawn {
  animation: playerRespawnAnim 0.4s ease-out forwards;
}
@keyframes playerRespawnAnim {
  0% { opacity: 0; transform: translateY(-20px) scale(0.5); }
  70% { opacity: 1; transform: translateY(4px) scale(1.15); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Bottom Starting Bank */
.river-bank-bottom {
  position: relative;
  width: 100%;
  height: 44px;
  background: linear-gradient(180deg, #6b4a2c 0%, #4a321d 100%);
  border-top: 3px solid #382414;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 10;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}
.bank-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fed7aa;
}
.bank-tag {
  font-size: 10px;
  font-weight: 800;
  background: #382414;
  color: #fcd34d;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Controls Dock (Keypad with Candidate Arabic Letters/Words) */
.sky-control-dock {
  background: #0b151a;
  border-top: 1.5px solid #1f3744;
  padding: 12px 14px 14px;
  box-sizing: border-box;
}
.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.dock-prompt {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}
.btn-pronounce {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #34d399;
  background: #142833;
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-pronounce:hover {
  background: #1a3847;
  color: #6ee7b7;
  border-color: #34d399;
}

.arabic-choices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.arabic-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 6px 4px;
  background: linear-gradient(180deg, #182e3b 0%, #10212b 100%);
  border: 2px solid #234d61;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
  transition: all 0.12s ease;
  user-select: none;
}
.arabic-choice-btn:hover {
  background: linear-gradient(180deg, #165c3e 0%, #0c3d28 100%);
  border-color: #fcd34d;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}
.arabic-choice-btn:active {
  transform: scale(0.95);
}
.arabic-choice-btn .choice-num {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
}
.arabic-choice-btn .arabic-glyph {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 26px;
  font-weight: 800;
  color: #fcd34d;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.arabic-choice-btn:hover .arabic-glyph {
  color: #ffffff;
}
.dock-footer-hint {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 10px;
}

/* Stage Cards & Expert Highlights */
.expert-stage-card {
  border-color: rgba(212, 163, 89, 0.6) !important;
  background: linear-gradient(135deg, rgba(212, 163, 89, 0.08) 0%, rgba(13, 30, 24, 0.8) 100%) !important;
}
.badge-expert {
  font-size: 9px;
  font-weight: 800;
  background: #d4a359;
  color: #1a2820;
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Companion Selector Carousel */
.sky-companions-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
}
.companion-card {
  flex: 0 0 105px;
  scroll-snap-align: start;
  background: var(--card-bg, #ffffff);
  border: 2px solid var(--border, #e2eae0);
  border-radius: 16px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.companion-card:hover {
  transform: translateY(-2px);
  border-color: #245c45;
}
.companion-card.selected {
  border-color: #d4a359;
  background: #fdfbf5;
  box-shadow: 0 4px 12px rgba(212, 163, 89, 0.25);
}
.companion-card.locked {
  opacity: 0.55;
  filter: grayscale(1);
  cursor: not-allowed;
}
.companion-icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.companion-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text, #1a2820);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.companion-ar {
  font-family: 'Amiri', serif;
  font-size: 13px;
  font-weight: 700;
  color: #245c45;
  margin-top: 2px;
}
.companion-lock-badge {
  font-size: 9px;
  font-weight: 700;
  background: #e2eae0;
  color: #63776c;
  padding: 1px 5px;
  border-radius: 6px;
  margin-top: 4px;
}

/* Stage List Cards */
.sky-stages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sky-stage-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border, #e2eae0);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}
.sky-stage-card:hover {
  border-color: #245c45;
  transform: translateX(2px);
}
.sky-stage-card.locked {
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed;
}
.sky-stage-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #245c45;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sky-stage-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sky-stage-info strong {
  font-size: 14px;
  color: var(--text, #1a2820);
}
.sky-stage-info span {
  font-size: 12px;
  color: var(--muted, #63776c);
}
.sky-stage-info small {
  font-size: 11px;
  color: #245c45;
  font-weight: 600;
  margin-top: 2px;
}
.sky-stage-reward {
  font-size: 20px;
  flex-shrink: 0;
}

/* Victory / Game Over Overlays */
.sky-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 29, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #ffffff;
  z-index: 50;
  animation: fadeInOverlay 0.3s ease;
}
@keyframes fadeInOverlay {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.sky-overlay-icon {
  font-size: 52px;
  margin-bottom: 12px;
}
.sky-overlay h2 {
  font-size: 22px;
  margin: 0 0 8px;
  color: #fcd34d;
}
.sky-overlay p {
  font-size: 13.5px;
  color: #cbd5e1;
  margin: 0 0 18px;
  max-width: 380px;
  line-height: 1.4;
}
.sky-overlay-btn {
  background: #d4a359;
  color: #1a2820;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sky-overlay-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}

/* =========================================================================
   Explorer's Trophy Case & Medals
   ========================================================================= */
.trophy-case-view {
  padding-bottom: 20px;
}
.trophy-medals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
}
.trophy-medal-badge {
  text-align: center;
  padding: 12px 6px;
  border-radius: 14px;
  background: #f7faf5;
  border: 1px solid #dbe6d6;
}
.trophy-medal-badge.cleared {
  background: linear-gradient(135deg, #fef9ec 0%, #fdf2d5 100%);
  border-color: #d4a359;
  box-shadow: 0 4px 10px rgba(212, 163, 89, 0.15);
}
.trophy-medal-badge.locked {
  opacity: 0.35;
  filter: grayscale(1);
}
.trophy-medal-badge .medal-icon {
  font-size: 26px;
  margin-bottom: 4px;
}
.trophy-medal-badge .medal-label {
  font-size: 11px;
  font-weight: 700;
  color: #245c45;
}
.trophy-medal-badge .medal-name {
  font-size: 9.5px;
  color: #63776c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trophy-champions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.trophy-pedestal {
  background: #ffffff;
  border: 1px solid #e2eae0;
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.trophy-pedestal:hover:not(.locked) {
  transform: translateY(-3px);
  border-color: #245c45;
  box-shadow: 0 6px 16px rgba(36, 92, 69, 0.12);
}
.trophy-pedestal.locked {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: default;
}
.pedestal-cloud {
  font-size: 22px;
  line-height: 1;
  margin-bottom: -10px;
  opacity: 0.8;
}
.pedestal-sprite {
  font-size: 36px;
  line-height: 1;
  position: relative;
  z-index: 2;
  margin-bottom: 6px;
}
.pedestal-name {
  font-size: 13px;
  font-weight: 700;
  color: #245c45;
}
.pedestal-sub {
  font-size: 10px;
  color: #63776c;
  margin-top: 2px;
}

/* In-App Stardust Celebration Toast */
.achievement-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0d1e18;
  color: #ffffff;
  border: 1.5px solid #d4a359;
  border-radius: 18px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 163, 89, 0.3);
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1.2), opacity 0.35s ease;
  opacity: 0;
  max-width: 90%;
  pointer-events: none;
}
.achievement-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-icon-badge {
  font-size: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px #ffd977);
}
.toast-body strong {
  display: block;
  font-size: 14px;
  color: #fcebb6;
}
.toast-body span {
  display: block;
  font-size: 12px;
  color: #dce7e1;
  margin-top: 1px;
}

/* =========================================================================
   Frogger Math Gameplay Engine & Drifting Cloud Physics
   ========================================================================= */

/* High-Contrast More Group Section Titles */
.more-group h2 {
  color: #153b2c !important;
  font-weight: 800 !important;
  font-size: 16.5px !important;
  border-bottom: 2px solid #245c45 !important;
  letter-spacing: 0.01em !important;
}

/* Drift Timer Bar across Top */
.frogger-timer-container {
  padding: 8px 16px 4px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.frogger-timer-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.frogger-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #245c45, #5bb691, #d4a359);
  border-radius: 6px;
  transition: width 0.1s linear;
}
.frogger-timer-fill.urgent {
  background: linear-gradient(90deg, #c0392b, #e67e22);
  animation: urgentPulse 0.4s infinite alternate;
}
@keyframes urgentPulse {
  0% { opacity: 0.8; }
  100% { opacity: 1; filter: brightness(1.3); }
}
.frogger-timer-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.frogger-timer-sec {
  color: #ffd977;
  font-size: 13px;
  font-weight: 800;
}

/* Playfield & Drift Rail */
.frogger-lane.lane-drifting-stream {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.frogger-drift-rail {
  position: relative;
  width: 100%;
  height: 100%;
}
.frogger-drifting-cloud {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 100px;
  cursor: pointer;
  transition: left 0.1s linear, transform 0.25s ease;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}
.drifting-cloud-graphics {
  font-size: 80px;
  line-height: 1;
  user-select: none;
}
.cloud-target-arabic {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  font-weight: 900;
  color: #153b2c;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  font-family: 'Amiri', 'Traditional Arabic', serif;
}

/* Landing squash & bounce */
.frogger-drifting-cloud.land-bounce {
  animation: cloudLandBounce 0.45s ease-out forwards;
}
@keyframes cloudLandBounce {
  0% { transform: translate(-50%, -50%) scale(1); }
  35% { transform: translate(-50%, -42%) scale(1.25, 0.75); }
  65% { transform: translate(-50%, -56%) scale(0.9, 1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Cloud drifts away on miss */
.frogger-drifting-cloud.drift-away {
  animation: cloudDriftAway 0.5s ease-in forwards;
}
@keyframes cloudDriftAway {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(120%, -50%) scale(0.6); opacity: 0; }
}

/* Base Launch Cloud & Companion Physics */
.launch-cloud-pad {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.launch-cloud-visual {
  font-size: 50px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
  opacity: 0.95;
}
.frogger-companion-sprite {
  position: absolute;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}
.companion-avatar-view {
  font-size: 52px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}
.companion-nametag {
  background: rgba(15, 107, 74, 0.85);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 2px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Jump physics animations */
.frogger-companion-sprite.jumping-correct {
  animation: froggerLeapCorrect 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes froggerLeapCorrect {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-75px) scale(1.3); }
  100% { transform: translateY(-120px) scale(1.1); }
}

.frogger-companion-sprite.landing-on-cloud {
  transform: translateY(-120px) scale(1.1);
  animation: companionLandSettle 0.4s ease-out;
}
@keyframes companionLandSettle {
  0% { transform: translateY(-120px) scale(1.2, 0.8); }
  50% { transform: translateY(-126px) scale(0.95, 1.05); }
  100% { transform: translateY(-120px) scale(1); }
}

.frogger-companion-sprite.jumping-wrong {
  animation: froggerMissLeap 0.38s ease-in forwards;
}
@keyframes froggerMissLeap {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translate(30px, -50px) scale(1.15) rotate(20deg); }
  100% { transform: translate(60px, 40px) scale(0.7) rotate(60deg); opacity: 0; }
}

.frogger-companion-sprite.falling {
  opacity: 0;
  transform: translateY(60px);
}

.frogger-companion-sprite.timeout-miss {
  animation: froggerTimeoutTumble 0.5s ease-in forwards;
}
@keyframes froggerTimeoutTumble {
  0% { transform: translateY(0); }
  50% { transform: translateY(20px) rotate(-15deg); }
  100% { transform: translateY(90px) rotate(-45deg); opacity: 0; }
}

.frogger-companion-sprite.respawn {
  animation: companionRespawn 0.45s ease-out forwards;
}
@keyframes companionRespawn {
  0% { transform: translateY(-40px) scale(0.3); opacity: 0; }
  70% { transform: translateY(4px) scale(1.15); opacity: 0.9; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Touch Choice Buttons Dock */
.sky-control-dock {
  padding: 14px 16px 20px;
  background: #112a20;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}
.dock-prompt {
  font-size: 13px;
  font-weight: 700;
  color: #dce7e1;
  text-align: center;
  margin-bottom: 12px;
}
.dock-choices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}
.sky-choice-name-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
}
.sky-choice-name-btn:hover {
  background: rgba(36, 92, 69, 0.6);
  border-color: #ffd977;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.sky-choice-name-btn:active {
  transform: translateY(1px);
}
.sky-choice-name-btn .choice-num {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.sky-choice-name-btn .choice-name {
  letter-spacing: 0.02em;
}


/* =========================================================================
   Cloud Jumper Fluffy Cumulus & Clean UI Additions
   ========================================================================= */
.fluffy-cloud-wrap {
  position: absolute;
  width: 190px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 14px 18px rgba(2, 10, 18, 0.45));
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  user-select: none;
}
.fluffy-cloud-wrap:hover {
  transform: scale(1.04);
}
.fluffy-cloud-wrap:active {
  transform: scale(0.96);
}
.fluffy-cloud-wrap.is-target {
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.8)) drop-shadow(0 14px 20px rgba(2, 10, 18, 0.45));
  animation: cloudFloat 2.4s ease-in-out infinite alternate;
}
@keyframes cloudFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}
.fluffy-cloud-wrap.land-squash {
  animation: cloudSquash 0.35s ease-out;
}
@keyframes cloudSquash {
  0% { transform: scale(1, 1); }
  35% { transform: scale(1.18, 0.82); }
  70% { transform: scale(0.96, 1.04); }
  100% { transform: scale(1, 1); }
}
.cloud-svg-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cloud-word-display {
  position: relative;
  z-index: 10;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #031522;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
  pointer-events: none;
}

/* Zero Scrollbar rules */
.no-scrollbar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
}

/* Clean Destination Land Goal Badge */
.dest-land-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 28px;
  border-radius: 9999px;
  background: rgba(6, 29, 18, 0.9);
  border: 1.5px solid rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.35);
  transition: all 0.25s ease;
}
.dest-land-pill.is-target {
  background: #fbbf24;
  color: #0f172a;
  border-color: #fde047;
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.8);
}
.dest-land-word {
  font-size: 20px;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 1px;
}
.dest-land-pill.is-target .dest-land-word {
  color: #0f172a;
}


/* =========================================================================
   Cloud Jumper Arcade & Flashcard Multi-Level Suite Additions
   ========================================================================= */
/* removed global body override (made whole app black) */

    /* Atmospheric Sky (Pure Open Sky, Zero Artificial Lines) */
    .sky-viewport {
      background: linear-gradient(180deg, 
        #061a29 0%, 
        #0a283e 25%, 
        #0f3b58 50%, 
        #154f74 75%, 
        #1d6592 100%
      );
      box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.7);
    }

    .sky-sun-glow {
      position: absolute;
      top: -40px;
      right: -40px;
      width: 220px;
      height: 220px;
      background: radial-gradient(circle, rgba(254, 240, 138, 0.22) 0%, rgba(251, 191, 36, 0.08) 45%, transparent 70%);
      pointer-events: none;
      filter: blur(20px);
    }

    /* Organic Fluffy Cumulus Cloud */
    .fluffy-cloud-wrap {
      position: absolute;
      width: 190px;
      height: 70px;
      display: flex;
      align-items: center;
      justify-content: center;
      filter: drop-shadow(0 14px 18px rgba(2, 10, 18, 0.45));
      transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
      cursor: pointer;
    }
    .fluffy-cloud-wrap:hover {
      transform: scale(1.04);
    }
    .fluffy-cloud-wrap:active {
      transform: scale(0.96);
    }

    .fluffy-cloud-wrap.is-target {
      filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.8)) drop-shadow(0 14px 20px rgba(2, 10, 18, 0.45));
      animation: cloudFloat 2.4s ease-in-out infinite alternate;
    }

    @keyframes cloudFloat {
      0% { transform: translateY(0); }
      100% { transform: translateY(-3px); }
    }

    .fluffy-cloud-wrap.land-squash {
      animation: cloudSquash 0.35s ease-out;
    }

    @keyframes cloudSquash {
      0% { transform: scale(1, 1); }
      35% { transform: scale(1.18, 0.82); }
      70% { transform: scale(0.96, 1.04); }
      100% { transform: scale(1, 1); }
    }

    .cloud-svg-art {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    .cloud-word-display {
      position: relative;
      z-index: 10;
      font-size: 18px;
      font-weight: 900;
      color: #0c2738;
      text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
      letter-spacing: 0.1px;
      line-height: 1.1;
      padding-top: 4px;
      text-align: center;
      padding-left: 8px;
      padding-right: 8px;
    }

    .is-target .cloud-word-display {
      color: #78350f;
      text-shadow: 0 1px 3px rgba(255, 255, 255, 1);
    }

    /* Jump & Push-Back Animations */
    .anim-jump-forward {
      animation: jumpForward 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }
    @keyframes jumpForward {
      0% { transform: scale(1) translateY(0); }
      45% { transform: scale(1.22) translateY(-32px); }
      100% { transform: scale(1) translateY(0); }
    }

    .anim-push-back {
      animation: pushBackStumble 0.45s ease-in-out forwards;
    }
    @keyframes pushBackStumble {
      0% { transform: scale(1) rotate(0deg); }
      30% { transform: scale(1.1) translateY(-18px) rotate(-15deg); }
      70% { transform: scale(0.95) translateY(12px) rotate(8deg); }
      100% { transform: scale(1) rotate(0deg); }
    }

    /* Candidate Buttons */
    .arabic-candidate-btn {
      background: linear-gradient(180deg, #123243 0%, #0a1f2a 100%);
      border: 1.5px solid #24526b;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
      transition: all 0.12s ease;
    }
    .arabic-candidate-btn:hover {
      background: linear-gradient(180deg, #18445b 0%, #0e2b3b 100%);
      border-color: #d4a359;
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 163, 89, 0.3);
    }
    .arabic-candidate-btn:active {
      transform: translateY(2px) scale(0.96);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }

    /* 3D Flip Card Game Styles */
    .flashcard-scene {
      perspective: 1000px;
      width: 100%;
      height: 250px;
      cursor: pointer;
    }
    .flashcard-inner {
      position: relative;
      width: 100%;
      height: 100%;
      text-align: center;
      transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
      transform-style: preserve-3d;
    }
    .flashcard-scene.is-flipped .flashcard-inner {
      transform: rotateY(180deg);
    }
    .flashcard-face {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      border-radius: 18px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 16px;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    }
    .flashcard-front {
      background: linear-gradient(145deg, #0d2836 0%, #091e28 100%);
      border: 2px solid #234f66;
    }
    .flashcard-back {
      background: linear-gradient(145deg, #13392a 0%, #0c241a 100%);
      border: 2px solid #34d399;
      transform: rotateY(180deg);
    }

    /* Level Selector Pills */
    .level-pill {
      background: #0c202d;
      border: 1px solid #1c445a;
      color: #94a3b8;
      transition: all 0.15s ease;
    }
    .level-pill.active {
      background: #0f6b4a;
      border-color: #34d399;
      color: #ffffff;
      box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
    }
    .level-pill.expert-active {
      background: #78350f;
      border-color: #fbbf24;
      color: #fef08a;
      box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    }

    .main-tab-btn {
      transition: all 0.15s ease;
      color: #94a3b8;
      border-bottom: 2px solid transparent;
    }
    .main-tab-btn.active {
      color: #fbbf24;
      border-bottom-color: #fbbf24;
      font-weight: 800;
    }

    .star-icon {
      filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8));
    }
    .star-icon.lost {
      opacity: 0.18;
      filter: grayscale(1);
    }
  
    /* 1. NO SCROLLBAR AT ALL (USER REQUIREMENT) */
    * {
      scrollbar-width: none !important;
      -ms-overflow-style: none !important;
    }
    html, body {
      overflow-x: hidden;
      scrollbar-width: none;
    }

  
