/* Main Stylesheet for Alphabet Detective Challenge */
/* Designed for Grade 1 & 2 children: Big buttons, bright colors, visual intuition, no sound dependency */

:root {
  --primary-blue: #0984E3;
  --sky-blue: #74B9FF;
  --bg-gradient: linear-gradient(135deg, #74b9ff 0%, #a29bfe 50%, #ffeaa7 100%);
  --mint-green: #2ED573;
  --green-dark: #20BF6B;
  --sun-yellow: #FED330;
  --orange-accent: #FA8231;
  --coral-red: #FC5C65;
  --candy-purple: #8854D0;
  --cloud-white: #FFFFFF;
  --card-bg: #FFFFFF;
  --text-dark: #2D3436;
  --text-light: #636E72;
  --border-radius-lg: 28px;
  --border-radius-md: 20px;
  --border-radius-sm: 14px;
  --shadow-chunky: 0 8px 0 rgba(0, 0, 0, 0.15), 0 16px 24px rgba(0, 0, 0, 0.1);
  --btn-shadow-blue: 0 8px 0 #0767B0;
  --btn-shadow-green: 0 8px 0 #1E824C;
  --btn-shadow-yellow: 0 8px 0 #D35400;
  --btn-shadow-purple: 0 8px 0 #5E2A9D;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family: 'Comic Neue', 'Fredoka', 'Nunito', 'Arial Rounded MT Bold', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-gradient);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text-dark);
  position: relative;
}

/* Background cartoon landscape (Sky, clouds, Ferris wheel, roller coaster, hot air balloon, green lawn) */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-landscape-svg {
  width: 100vw;
  height: 100vh;
  display: block;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 100px;
}
.cloud-1 {
  width: 180px;
  height: 60px;
  top: 8%;
  left: 5%;
}
.cloud-1::before {
  content: '';
  position: absolute;
  background: inherit;
  width: 80px;
  height: 80px;
  top: -35px;
  left: 30px;
  border-radius: 50%;
}
.cloud-2 {
  width: 220px;
  height: 70px;
  top: 15%;
  right: 6%;
}
.cloud-2::before {
  content: '';
  position: absolute;
  background: inherit;
  width: 90px;
  height: 90px;
  top: -40px;
  right: 40px;
  border-radius: 50%;
}

/* Canvas for Confetti */
#effectsCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* App Main Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: clamp(4px, 0.8vh, 10px) clamp(10px, 1.4vw, 20px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
}

/* ==========================================================================
   TOP BAR: HUD (Score, Stars, Level Select, Audio-free Controls)
   ========================================================================== */
.top-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: clamp(4px, 0.8vw, 12px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(4px, 0.6vh, 8px) clamp(8px, 1.2vw, 16px);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.14), 0 2px 4px rgba(0, 0, 0, 0.04);
  border: clamp(2px, 0.25vw, 3.5px) solid #FFFFFF;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Speaker button */
.action-btn.speaker-btn {
  width: clamp(32px, 2.8vw, 40px);
  height: clamp(32px, 2.8vw, 40px);
  flex-shrink: 0;
  padding: 2px;
}

/* Left: Level Select Badges */
.hud-level-nav {
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.4vw, 6px);
  flex-shrink: 0;
}

.level-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: clamp(4px, 0.5vh, 6px) clamp(6px, 0.7vw, 10px);
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(0.82rem, 1vw, 1.02rem);
  font-weight: 800;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-easy {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 0 #047857;
}
.badge-medium {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 0 #B45309;
}
.badge-hard {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 0 #B91C1C;
}
.badge-lvl4 {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 0 #075985;
}
.badge-lvl5 {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 0 #5B21B6;
}
.badge-lvl6 {
  background: linear-gradient(135deg, #EC4899 0%, #BE185D 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 0 #9D174D;
}

.level-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.level-badge:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.level-badge.active-level {
  outline: 3px solid #FFFFFF;
  box-shadow: 0 0 0 5px #0284C7, 0 6px 12px rgba(2, 132, 199, 0.35);
  transform: scale(1.05);
}

.level-badge.locked-level {
  background: #CBD5E1 !important;
  color: #64748B !important;
  opacity: 0.75;
  box-shadow: 0 3px 0 #94A3B8 !important;
}

.badge-locked-wobble {
  animation: lockedBadgeNudge 0.4s ease-in-out;
}

.level-lock-icon {
  width: clamp(11px, 1vw, 14px);
  height: clamp(11px, 1vw, 14px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Center: Score & Stars Counter */
.hud-stats-group {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.6vw, 10px);
  flex-shrink: 0;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.5vw, 6px);
  background: #FFFFFF;
  padding: clamp(3px, 0.5vh, 5px) clamp(6px, 0.8vw, 12px);
  border-radius: 50px;
  border: 2px solid #E0F2FE;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

#starCounterBox {
  border-color: #FDE047 !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #FEFCE8 100%) !important;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.2) !important;
}

#scoreBox {
  border-color: #FDBA74 !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF7ED 100%) !important;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2) !important;
}

.stat-icon {
  width: clamp(18px, 1.6vw, 24px);
  height: clamp(18px, 1.6vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-number {
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  font-weight: 900;
  color: #1E293B;
}

.star-bump-anim {
  animation: starCounterBump 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Timer Pill in HUD */
.timer-pill {
  border-color: #6EE7B7 !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #ECFDF5 100%) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2) !important;
  min-width: clamp(65px, 5.5vw, 84px);
  justify-content: center;
  transition: all 0.3s ease;
}

.timer-icon-box {
  width: clamp(18px, 1.6vw, 24px);
  height: clamp(18px, 1.6vw, 24px);
}

.timer-digits {
  font-size: clamp(1rem, 1.3vw, 1.35rem);
  font-weight: 900;
  min-width: 30px;
  text-align: center;
  transition: color 0.3s ease;
}

.timer-pill.timer-danger {
  border-color: #FF4757 !important;
  animation: timerPulse 0.6s ease-in-out infinite alternate;
}

/* Right: Control Buttons (Help, Restart, Fullscreen) */
.hud-actions {
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.4vw, 7px);
  flex-shrink: 0;
}

.action-btn {
  width: clamp(30px, 2.6vw, 38px);
  height: clamp(30px, 2.6vw, 38px);
  border-radius: 50%;
  border: none;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 0 #DFE4EA;
  transition: all 0.18s ease;
  padding: clamp(3px, 0.4vw, 6px);
  flex-shrink: 0;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 #DFE4EA;
}
.action-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #DFE4EA;
}

/* ==========================================================================
   DETECTIVE PROGRESS TRAIL (Visual footprint journey)
   ========================================================================== */
.progress-trail-container {
  position: relative;
  margin: clamp(2px, 0.4vh, 5px) 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 249, 255, 0.95) 100%);
  border-radius: 20px;
  padding: clamp(3px, 0.5vh, 6px) clamp(10px, 1.2vw, 18px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.10);
  border: 2px solid #BAE6FD;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.progress-steps-markers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 2px;
  gap: 4px;
}

.step-stone {
  font-size: clamp(0.72rem, 0.85vw, 0.88rem);
  font-weight: 900;
  color: #475569;
  background: #F1F5F9;
  padding: clamp(2px, 0.3vh, 3px) clamp(6px, 0.8vw, 10px);
  border-radius: 14px;
  border: 1.5px solid #CBD5E1;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-stone.active {
  background: linear-gradient(135deg, #FDE047 0%, #F59E0B 100%);
  color: #78350F;
  border-color: #D97706;
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.step-stone.completed {
  background: linear-gradient(135deg, #4ADE80 0%, #16A34A 100%);
  color: #FFFFFF;
  border-color: #15803D;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

.progress-track {
  position: relative;
  width: 100%;
  height: clamp(8px, 1vh, 12px);
  background: #E2E8F0;
  border-radius: 20px;
  overflow: visible;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #22C55E 0%, #FACC15 50%, #FB923C 100%);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.45);
  transition: width 0.4s ease-out;
}

.progress-detective-icon {
  position: absolute;
  top: clamp(-10px, -1.2vh, -8px);
  left: 0;
  width: clamp(26px, 2.5vw, 34px);
  height: clamp(26px, 2.5vw, 34px);
  transform: translateX(-50%);
  transition: left 0.4s ease-out;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.25));
  font-size: clamp(1.2rem, 1.5vw, 1.6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* ==========================================================================
   GAMEPLAY STAGE: Detective + Clue + Large Choices
   ========================================================================== */
.game-stage {
  display: grid;
  grid-template-columns: minmax(130px, clamp(150px, 16vw, 220px)) 1fr;
  gap: clamp(10px, 1.4vw, 20px);
  margin: clamp(2px, 0.5vh, 6px) 0;
  align-items: center;
  flex: 1;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

/* Detective Character Section */
.detective-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
  max-height: 100%;
}

.detective-wrapper {
  position: relative;
  width: clamp(120px, 15vw, 200px);
  height: clamp(130px, 25vh, 230px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detective-svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
}

/* Detective Animated States */
.state-idle .det-body-group {
  animation: detectiveBreathe 3s ease-in-out infinite;
}

.state-correct .det-body-group {
  animation: detectiveJoyJump 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.state-celebrate .det-body-group {
  animation: detectiveCelebrateDance 0.8s ease-in-out infinite;
}

.state-hint .det-head-group {
  animation: detectiveCuriousTilt 1.4s ease-in-out infinite;
}

.glass-sparkle {
  animation: glassSparkleGlint 2s ease-in-out infinite;
}

/* Visual Thought Bubble */
.detective-bubble {
  position: absolute;
  top: 0;
  right: -10px;
  background: #FFFFFF;
  border: 3px solid #2D3436;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
  z-index: 5;
  animation: bubbleFloat 3s ease-in-out infinite;
}

.detective-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 12px;
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  border-right: 3px solid #2D3436;
  border-bottom: 3px solid #2D3436;
  border-radius: 50%;
}

.pulse-bubble {
  animation: bubblePop 0.4s ease-out;
}

/* Reward Stars Container around Detective */
.reward-stars-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.burst-star {
  position: absolute;
  font-size: 2rem;
  animation: burstStarFloat 1.4s ease-out forwards;
}

/* Main Interactive Question Panel */
.main-question-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius-lg);
  padding: clamp(6px, 1.2vh, 16px) clamp(10px, 1.6vw, 22px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  border: clamp(2.5px, 0.3vw, 4px) solid #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8vh, 10px);
  position: relative;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: hidden;
}

/* Question Visual Countdown Timer Bar */
.question-timer-bar-wrap {
  width: 100%;
  height: clamp(5px, 0.8vh, 8px);
  background: #E2E8F0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.question-timer-bar-fill {
  height: 100%;
  width: 100%;
  border-radius: 20px;
  background-color: #2ED573;
  transition: width 0.12s linear, background-color 0.3s ease;
}

/* Timer Color States */
.timer-safe {
  background-color: #2ED573 !important;
  color: #2ED573 !important;
}

.timer-warning {
  background-color: #FFA502 !important;
  color: #FFA502 !important;
}

.timer-danger {
  background-color: #FF4757 !important;
  color: #FF4757 !important;
}

/* Timeout Notice Overlay */
.timeout-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
}

.timeout-badge-card {
  background: #FF4757;
  color: #FFFFFF;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(255, 71, 87, 0.45), 0 0 0 4px #FFFFFF;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: bubblePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Clue Display Container */
.clue-display-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  padding: clamp(2px, 0.4vh, 6px) 0;
}

.clue-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 24px);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-radius: var(--border-radius-lg);
  padding: clamp(6px, 1vh, 12px) clamp(12px, 1.8vw, 24px);
  border: 3px solid #E2E8F0;
  max-width: 95%;
  width: 100%;
  max-height: 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

/* Level 1: Beginning Sound Magnifier Card */
.clue-magnifier-frame {
  position: relative;
  width: clamp(115px, 19vh, 180px);
  height: clamp(115px, 19vh, 180px);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clue-illu-box .game-illu,
.clue-illu-box svg {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.clue-illu-box {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.game-illu {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.clue-mystery-tag {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clue-letter-slot {
  width: 82px;
  height: 82px;
  border-radius: var(--border-radius-md);
  background: #FFF275;
  border: 5px dashed #FFA502;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  font-weight: 900;
  color: #D35400;
  box-shadow: 0 6px 14px rgba(255, 165, 2, 0.3);
}

/* Level 2: Uppercase Match & Sequence */
.clue-case-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.clue-big-uppercase {
  font-size: 4.8rem;
  font-weight: 900;
  color: #0984E3;
  text-shadow: 2px 3px 0 #74B9FF;
  padding: 6px 22px;
  background: #E8F4FD;
  border-radius: 20px;
  border: 4px solid #74B9FF;
}

.clue-arrow-down {
  font-size: 2.4rem;
}

.clue-mystery-slot {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  background: #FFEAA7;
  border: 5px dashed #F39C12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  font-weight: 900;
  color: #D35400;
}

.clue-support-illu {
  width: clamp(100px, 17vh, 160px);
  height: clamp(100px, 17vh, 160px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.clue-support-illu svg,
.clue-support-illu .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

/* Sequence trail in Level 2 */
.sequence-trail {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alphabet-stone {
  width: 72px;
  height: 72px;
  background: #FFFFFF;
  border: 4px solid #74B9FF;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 900;
  color: #0984E3;
  box-shadow: 0 8px 0 #0984E3;
}

.mystery-stone {
  background: #FFEAA7;
  border: 4px dashed #F39C12;
  color: #E67E22;
  box-shadow: 0 8px 0 #E67E22;
}

.trail-footprints {
  font-size: 1.6rem;
  display: flex;
  gap: 8px;
}

/* Level 3: Word Mystery Phonics */
.word-illu-box {
  width: 130px;
  height: 130px;
}

.word-puzzle-slots {
  display: flex;
  align-items: center;
  gap: 14px;
}

.word-letter-box {
  width: 80px;
  height: 90px;
  background: #FFFFFF;
  border: 4px solid #2ED573;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 900;
  color: #2D3436;
  box-shadow: 0 8px 0 #20BF6B;
}

.missing-letter-slot {
  background: #FFF275;
  border: 5px dashed #FFA502;
  color: #D35400;
  box-shadow: 0 8px 0 #E67E22;
  font-size: 2.6rem;
}

.slot-filled {
  background: #2ED573 !important;
  color: #FFFFFF !important;
  border-style: solid !important;
  box-shadow: 0 8px 0 #1B8A4C !important;
  font-size: 3.5rem !important;
  animation: bubblePop 0.4s ease-out;
}

/* ==========================================================================
   CHOICES GRID: Huge, Child-Friendly Tactile Buttons
   ========================================================================== */
.choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.2vw, 18px);
  width: 100%;
  flex-shrink: 0;
}

.choice-btn {
  background: #FFFFFF;
  border-radius: var(--border-radius-md);
  height: clamp(60px, 10.5vh, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.16s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: inherit;
  outline: none;
  border: clamp(2.5px, 0.3vw, 4px) solid #CBD5E1;
  box-shadow: 0 6px 0 #94A3B8, 0 10px 18px rgba(0, 0, 0, 0.08);
}

.choice-btn:nth-child(1) {
  border-color: #38BDF8;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F9FF 100%);
  box-shadow: 0 6px 0 #0284C7, 0 10px 18px rgba(2, 132, 199, 0.22);
}
.choice-btn:nth-child(1) .choice-char {
  color: #0284C7;
}

.choice-btn:nth-child(2) {
  border-color: #FB923C;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF7ED 100%);
  box-shadow: 0 6px 0 #EA580C, 0 10px 18px rgba(234, 88, 12, 0.22);
}
.choice-btn:nth-child(2) .choice-char {
  color: #EA580C;
}

.choice-btn:nth-child(3) {
  border-color: #4ADE80;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
  box-shadow: 0 6px 0 #16A34A, 0 10px 18px rgba(22, 163, 74, 0.22);
}
.choice-btn:nth-child(3) .choice-char {
  color: #16A34A;
}

.choice-btn:nth-child(4) {
  border-color: #C084FC;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF5FF 100%);
  box-shadow: 0 6px 0 #9333EA, 0 10px 18px rgba(147, 51, 234, 0.22);
}
.choice-btn:nth-child(4) .choice-char {
  color: #9333EA;
}

.choice-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.04);
}

.choice-btn:active {
  transform: translateY(4px);
}
.choice-btn:nth-child(1):active {
  box-shadow: 0 2px 0 #0284C7;
}
.choice-btn:nth-child(2):active {
  box-shadow: 0 2px 0 #EA580C;
}
.choice-btn:nth-child(3):active {
  box-shadow: 0 2px 0 #16A34A;
}
.choice-btn:nth-child(4):active {
  box-shadow: 0 2px 0 #9333EA;
}

.choice-char {
  font-size: clamp(2.2rem, 5.5vh, 4rem);
  font-weight: 900;
  color: #1E293B;
  text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.08);
}

/* Correct Answer Button */
.choice-btn.choice-correct {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%) !important;
  border-color: #86EFAC !important;
  box-shadow: 0 8px 0 #15803D, 0 16px 26px rgba(22, 163, 74, 0.45) !important;
  transform: scale(1.05);
}
.choice-btn.choice-correct .choice-char {
  color: #FFFFFF !important;
  text-shadow: 2px 3px 0 #15803D;
}

/* Wrong Answer Soft Wobble */
.choice-wrong-wobble {
  animation: softChoiceWobble 0.45s ease-in-out;
  border-color: #FFA502 !important;
}

.grid-wrong-wobble {
  animation: softChoiceWobble 0.45s ease-in-out;
}

.choice-btn.choice-tried {
  background: #F1F2F6;
  border-color: #FFA502;
  opacity: 0.85;
}

.choice-btn.choice-disabled {
  pointer-events: none;
  opacity: 0.55;
}

/* Visual Hint Finger Pointing to Choice */
.choice-finger-hint {
  position: absolute;
  top: -26px;
  right: 14px;
  font-size: 2.4rem;
  display: none;
}

.show-hint-finger {
  display: block !important;
  animation: hintFingerBounce 0.8s ease-in-out infinite;
}

/* ==========================================================================
   VISUAL FEEDBACK: Tick Overlay & Next Button
   ========================================================================== */
.feedback-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  max-width: 95%;
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.word-celebration-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.98);
  padding: 18px 30px 22px 30px;
  border-radius: 36px;
  border: 5px solid #FCD34D;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 0 0 8px rgba(255, 255, 255, 0.85);
  animation: wordCardEntrance 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  max-width: 95%;
}

.celebration-tick-badge {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(34, 197, 94, 0.5));
  animation: tickBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-tick-svg {
  width: 100%;
  height: 100%;
}

.celebration-word-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.celebration-char {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 84px;
  padding: 0 12px;
  background: #FFFFFF;
  color: var(--char-color, #0284C7);
  border: 4.5px solid var(--char-color, #0284C7);
  border-radius: 20px;
  box-shadow: 0 7px 0 var(--char-shadow, rgba(0, 0, 0, 0.18)), 0 10px 18px rgba(0, 0, 0, 0.1);
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  font-family: 'Comic Neue', 'Fredoka', 'Nunito', 'Arial Rounded MT Bold', sans-serif;
  transform-origin: center bottom;
  animation: celebrationCharPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
  animation-delay: var(--delay, 0s);
}

.celebration-word-row.word-row-compact .celebration-char {
  min-width: 46px;
  height: 68px;
  font-size: 3.1rem;
  padding: 0 8px;
  border-width: 3.5px;
  border-radius: 16px;
}

/* Clue Card Inline Word Reveal */
.clue-inline-revealed-word {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: #FFFFFF;
  border-radius: 24px;
  border: 4px solid #86EFAC;
  box-shadow: 0 8px 0 #15803D, 0 12px 20px rgba(34, 197, 94, 0.35);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  animation: bubblePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes wordCardEntrance {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(24px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes celebrationCharPop {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(28px) rotate(-8deg);
  }
  65% {
    transform: scale(1.15) translateY(-6px) rotate(4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

@keyframes tickBounce {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Floating score text (+5, -2) */
.floating-score-badge {
  position: fixed;
  font-size: 2.2rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 1000;
  text-shadow: 2px 2px 0 #FFFFFF, -2px -2px 0 #FFFFFF, 2px -2px 0 #FFFFFF, -2px 2px 0 #FFFFFF;
  animation: floatScoreUp 1.1s ease-out forwards;
}

.score-plus {
  color: #2ED573;
}
.score-minus {
  color: #FF4757;
}

/* Flying star token */
.flying-star-token {
  position: fixed;
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 1001;
  filter: drop-shadow(0 4px 8px rgba(255, 165, 2, 0.6));
}

/* Next Question Button (Large, bright green, flashing arrow) */
.next-btn-container {
  display: flex;
  justify-content: center;
  margin-top: clamp(2px, 0.4vh, 6px);
  flex-shrink: 0;
}

.btn-next-question {
  display: none;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: #FFFFFF;
  border: 3px solid #86EFAC;
  padding: clamp(6px, 0.9vh, 10px) clamp(18px, 2vw, 32px);
  border-radius: 50px;
  font-family: inherit;
  font-size: clamp(1rem, 1.25vw, 1.35rem);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #15803D, 0 8px 16px rgba(22, 163, 74, 0.35);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-next-question:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 11px 0 #15803D, 0 18px 28px rgba(22, 163, 74, 0.5);
}
.btn-next-question:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #15803D;
}

.btn-next-pulse {
  animation: pulseNextBtn 1.5s ease-in-out infinite;
}

.btn-arrow-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   MODALS: Visual Demo, Level Complete, Final Victory
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-active {
  display: flex !important;
}

.modal-window {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  padding: 30px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 6px solid #FECA57;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: bubblePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Big Play / Action Button */
.btn-huge-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #2ED573;
  color: #FFFFFF;
  border: none;
  padding: 14px 40px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 0 #1B8A4C, 0 12px 20px rgba(46, 213, 115, 0.35);
  transition: all 0.15s ease;
  width: 80%;
}

.btn-huge-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.btn-huge-action:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #1B8A4C;
}

.btn-secondary-action {
  background: #74B9FF;
  box-shadow: 0 6px 0 #0984E3;
}
.btn-secondary-action:active {
  box-shadow: 0 2px 0 #0984E3;
}

/* Visual Demo Animation Box */
.demo-animation-box {
  width: 100%;
  min-height: 220px;
  background: #F8F9FA;
  border-radius: var(--border-radius-md);
  border: 3px dashed #DFE4EA;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.demo-step-scene {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  width: 100%;
}

.demo-illu {
  width: 90px;
  height: 90px;
}

.demo-choices {
  display: flex;
  gap: 10px;
}

.demo-choice-card {
  width: 55px;
  height: 65px;
  background: #FFFFFF;
  border: 3px solid #CED6E0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: #2D3436;
  box-shadow: 0 4px 0 #BDC3C7;
}

.demo-choice-card.choice-correct {
  background: #2ED573 !important;
  color: #FFFFFF !important;
  border-color: #26AF61 !important;
  box-shadow: 0 4px 0 #1B8A4C !important;
}

.demo-hand-pointer {
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 10;
  transition: transform 0.6s ease-in-out, opacity 0.3s ease;
}

.demo-tick {
  position: absolute;
  top: -15px;
  right: 15px;
  width: 48px;
  height: 48px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.demo-star {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0;
}

.demo-case-clue {
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-big-letter {
  font-size: 3rem;
  font-weight: 900;
  color: #0984E3;
}
.demo-word-clue {
  display: flex;
  gap: 6px;
  font-size: 2.2rem;
  font-weight: 900;
}
.demo-slot {
  width: 38px;
  height: 48px;
  background: #FFEAA7;
  border: 2px dashed #E67E22;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Level Complete & Trophy Styles */
.modal-trophy-icon {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 8px 16px rgba(255, 165, 2, 0.4));
}

.modal-stat-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #FFF9E6;
  border: 3px solid #FFEAA7;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 2rem;
  font-weight: 900;
  color: #D35400;
}

.confirm-actions-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.btn-confirm-yes {
  flex: 1;
  background: #2ED573;
  color: #FFFFFF;
  border: none;
  padding: 12px;
  border-radius: 20px;
  font-size: 2.2rem;
  cursor: pointer;
  box-shadow: 0 6px 0 #1B8A4C;
}

.btn-confirm-no {
  flex: 1;
  background: #FF4757;
  color: #FFFFFF;
  border: none;
  padding: 12px;
  border-radius: 20px;
  font-size: 2.2rem;
  cursor: pointer;
  box-shadow: 0 6px 0 #C0392B;
}

/* ==========================================================================
   RESPONSIVE DESIGN (School Computers & Tablets)
   ========================================================================== */
@media (max-width: 860px) {
  .game-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detective-column {
    flex-direction: row;
    justify-content: center;
  }

  .detective-wrapper {
    width: 160px;
    height: 190px;
  }

  .main-question-panel {
    min-height: 380px;
    padding: 16px;
  }

  .choice-btn {
    height: 90px;
  }

  .choice-char {
    font-size: 3.4rem;
  }

  .clue-magnifier-frame {
    width: 110px;
    height: 110px;
  }

  .celebration-char {
    min-width: 56px;
    height: 72px;
    font-size: 3.4rem;
    border-width: 3.5px;
    border-radius: 16px;
  }
  .celebration-tick-badge {
    width: 54px;
    height: 54px;
  }
  .word-celebration-card {
    padding: 16px 24px;
    gap: 10px;
  }
}

@media (max-width: 580px) {
  .top-hud {
    padding: 8px 12px;
  }

  .progress-steps-markers {
    gap: 3px;
    padding: 0 2px;
  }

  .step-stone {
    padding: 3px 6px;
    font-size: 0.74rem;
    border-width: 1.5px;
  }

  .celebration-char {
    min-width: 44px;
    height: 58px;
    font-size: 2.6rem;
    padding: 0 8px;
    border-width: 3px;
    border-radius: 12px;
  }
  .celebration-word-row {
    gap: 6px;
  }
  .celebration-tick-badge {
    width: 44px;
    height: 44px;
  }
  .word-celebration-card {
    padding: 12px 18px;
  }

  .level-badge {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .stat-pill {
    padding: 4px 10px;
  }

  .choices-grid {
    gap: 10px;
  }

  .choice-btn {
    height: 80px;
  }

  .choice-char {
    font-size: 2.8rem;
  }

  .clue-card {
    padding: 12px 16px;
  }

  .clue-big-uppercase {
    font-size: 3.2rem;
  }

  .alphabet-stone {
    width: 48px;
    height: 48px;
    font-size: 2rem;
  }

  .word-letter-box {
    width: 52px;
    height: 60px;
    font-size: 2.4rem;
  }
}

/* ==========================================================================
   NEW PICTURE ACTIVITIES & SCREENSHOT STYLING (Levels 1, 2, 3)
   ========================================================================== */

/* Top HUD Speaker & Close Buttons (Screenshot 1, 2, 3) */
.speaker-btn {
  background: #FF793F !important;
  border-radius: 14px !important;
  padding: 6px !important;
  box-shadow: 0 4px 0 #D35400 !important;
}
.speaker-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #D35400 !important;
}

.close-btn {
  background: #EE5253 !important;
  border-radius: 14px !important;
  padding: 6px !important;
  box-shadow: 0 4px 0 #C0392B !important;
}
.close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #C0392B !important;
}

/* Activity Mode Tabs in HUD */
.hud-mode-tabs {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.4vw, 5px);
  background: linear-gradient(135deg, #E0F2FE 0%, #F0F9FF 100%);
  padding: 3px clamp(4px, 0.6vw, 8px);
  border-radius: 30px;
  border: 2px solid #BAE6FD;
  box-shadow: inset 0 2px 4px rgba(14, 165, 233, 0.1);
  flex-shrink: 0;
}

.mode-tab-btn {
  border: none;
  background: transparent;
  padding: clamp(3px, 0.5vh, 6px) clamp(8px, 1vw, 14px);
  border-radius: 20px;
  font-family: inherit;
  font-size: clamp(0.82rem, 0.95vw, 1rem);
  font-weight: 800;
  color: #0369A1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.mode-tab-btn:hover {
  color: #0284C7;
  background: rgba(255, 255, 255, 0.6);
}

.mode-tab-btn.active {
  background: linear-gradient(135deg, #0284C7 0%, #0EA5E9 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
  transform: scale(1.05);
}

/* Visual Question Prompt Banner */
.question-prompt-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 12px);
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: clamp(2px, 0.25vw, 3px) solid #F59E0B;
  border-radius: 50px;
  padding: clamp(4px, 0.6vh, 8px) clamp(10px, 1.4vw, 22px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.8);
  font-size: clamp(0.92rem, 1.2vw, 1.25rem);
  font-weight: 900;
  color: #78350F;
  margin-bottom: clamp(2px, 0.4vh, 4px);
  min-height: clamp(32px, 4.8vh, 46px);
}

.prompt-speaker-btn {
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  width: clamp(26px, 2.4vw, 36px);
  height: clamp(26px, 2.4vw, 36px);
  font-size: clamp(0.9rem, 1.1vw, 1.25rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #9A3412, 0 4px 8px rgba(234, 88, 12, 0.3);
  transition: transform 0.15s ease;
  color: #FFFFFF;
  flex-shrink: 0;
}

.prompt-speaker-btn:hover {
  transform: scale(1.12);
}

/* Level 1: Find the Picture (4 Large Cards in Separate Boxes) */
.pic-choices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: clamp(8px, 1.2vw, 16px);
  width: 100%;
}

.pic-choice-btn {
  background: #FFFFFF !important;
  border: 3.5px solid #0284C7 !important;
  border-radius: 20px !important;
  height: clamp(120px, 20vh, 185px) !important;
  box-shadow: 0 6px 0 #0369A1, 0 10px 18px rgba(2, 132, 199, 0.18) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  padding: 4px 6px !important;
  transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.pic-card-box svg,
.pic-card-box .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.pic-choice-btn:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #38BDF8 !important;
  box-shadow: 0 12px 0 #0369A1, 0 20px 28px rgba(14, 165, 233, 0.28) !important;
}

.pic-choice-btn:active {
  transform: translateY(3px) scale(0.98);
  box-shadow: 0 3px 0 #0369A1, 0 8px 14px rgba(2, 132, 199, 0.15) !important;
}

.pic-card-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checked Card State (Screenshot 2: Royal Blue with checkmark) */
.pic-card-checked {
  background: linear-gradient(135deg, #0369A1 0%, #075985 100%) !important;
  border-color: #38BDF8 !important;
  box-shadow: 0 8px 0 #0C4A6E, 0 14px 24px rgba(7, 89, 133, 0.4) !important;
}

.pic-card-checked .pic-card-box {
  display: none !important;
}

.pic-card-checkmark {
  display: none;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  border: 4px solid #FFFFFF;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
  animation: bubblePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pic-card-checked .pic-card-checkmark {
  display: flex !important;
}

/* Level 2: Match the Shapes (Screenshot 1) */
.shapes-objects-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.2vw, 16px);
  width: 100%;
}

.shape-obj-card {
  background: #FFFFFF;
  border: 3.5px solid #0284C7;
  border-radius: 20px;
  height: clamp(115px, 19vh, 175px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 #0369A1, 0 10px 18px rgba(2, 132, 199, 0.16);
  position: relative;
  padding: 4px 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shape-obj-card svg,
.shape-obj-card .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.shape-obj-card:hover, .shape-card-hover {
  transform: translateY(-5px);
  border-color: #38BDF8;
  box-shadow: 0 10px 0 #0369A1, 0 16px 24px rgba(56, 189, 248, 0.3);
}

.shape-obj-card.shape-card-matched {
  border-color: #22C55E;
  box-shadow: 0 6px 0 #15803D, 0 10px 16px rgba(34, 197, 94, 0.25);
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.shape-obj-illu-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shape-filled-pop {
  animation: bubblePop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.obj-match-tick {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: #2ECC71;
  color: #FFFFFF;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  animation: bubblePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Shapes Dark Olive Green Tray (Screenshot 1) */
.shapes-tray {
  background: linear-gradient(180deg, #3F6212 0%, #1A2E05 100%);
  border-radius: 20px;
  padding: clamp(6px, 1vh, 12px) clamp(12px, 2vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(10px, 1.5vw, 20px);
  width: 100%;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4), 0 6px 14px rgba(26, 46, 5, 0.3);
  border: 3.5px solid #4D7C0F;
  margin-top: clamp(4px, 0.6vh, 8px);
}

.shape-tray-item {
  width: clamp(42px, 5.5vw, 65px);
  height: clamp(42px, 5.5vw, 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.shape-tray-item:hover {
  transform: scale(1.18);
  filter: drop-shadow(0 6px 14px rgba(250, 204, 21, 0.6));
}

.shape-tray-item.shape-selected {
  transform: scale(1.25);
  filter: drop-shadow(0 0 16px #FDE047) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.shape-tray-item.shape-matched {
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0.8);
}

.shape-tray-item.shape-dragging {
  opacity: 0.5;
  transform: scale(1.1);
}

/* Level 3: Sort the Pictures into Baskets (Screenshot 3) */
.sort-items-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.2vw, 16px);
  width: 100%;
}

.sort-item-card {
  background: #FFFFFF;
  border: 3.5px solid #0284C7;
  border-radius: 18px;
  height: clamp(96px, 16vh, 145px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 #0369A1, 0 10px 18px rgba(2, 132, 199, 0.16);
  position: relative;
  padding: 4px;
  cursor: grab;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sort-card-content svg,
.sort-card-content .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.sort-item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 0 #0369A1, 0 14px 22px rgba(14, 165, 233, 0.25);
}

.sort-item-card.sort-card-selected {
  transform: translateY(-6px) scale(1.05);
  border-color: #F59E0B !important;
  box-shadow: 0 10px 0 #B45309, 0 0 20px rgba(245, 158, 11, 0.5) !important;
}

/* Empty Top Slot State (Screenshot 3) */
.sort-item-card.sort-card-empty {
  background: rgba(224, 242, 254, 0.3) !important;
  border: 3px dashed #38BDF8 !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

.sort-card-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Baskets Container */
.baskets-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.4vw, 18px);
  width: 100%;
  margin-top: clamp(3px, 0.5vh, 6px);
}

.basket-slot {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(240, 249, 255, 0.8) 100%);
  border-radius: 18px;
  padding: clamp(4px, 0.5vh, 8px) clamp(6px, 0.8vw, 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  border: 3px solid #BAE6FD;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.12);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-height: clamp(105px, 17vh, 155px);
}

.basket-graphic-wrap svg,
.basket-graphic-wrap .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

@keyframes basketCorrectBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.08) translateY(-6px); box-shadow: 0 0 20px rgba(34, 197, 94, 0.6); }
  100% { transform: scale(1); }
}

@keyframes basketWrongWobble {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px) rotate(-2deg); }
  75% { transform: translateX(6px) rotate(2deg); }
}

.basket-slot.basket-correct-bounce {
  animation: basketCorrectBounce 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-color: #22C55E !important;
}

.basket-slot.basket-wrong-wobble {
  animation: basketWrongWobble 0.42s ease-in-out;
  border-color: #EF4444 !important;
}

.basket-slot:hover, .basket-slot.basket-drag-hover {
  transform: translateY(-4px);
  border-color: #F59E0B;
  background: linear-gradient(180deg, #FFFFFF 0%, #FEF3C7 100%);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.25);
}

.basket-graphic-wrap {
  width: 100%;
  max-width: 160px;
  max-height: clamp(46px, 8vh, 76px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.basket-svg {
  width: 100%;
  height: auto;
  max-height: clamp(44px, 7.5vh, 72px);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
}

.basket-items-shelf {
  position: absolute;
  top: 12px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.basket-thumb-item {
  width: clamp(52px, 8.5vh, 68px);
  height: clamp(52px, 8.5vh, 68px);
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #38BDF8;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  animation: bubblePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.basket-thumb-item svg,
.basket-thumb-item .game-illu {
  width: 82%;
  height: 82%;
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
}

.basket-label-pill {
  margin-top: 8px;
  padding: 4px 18px;
  border-radius: 50px;
  background: #FFFFFF;
  border: 2.5px solid;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

/* Level Picker Modal */
.level-modal-window {
  max-width: 820px !important;
  max-height: 88vh;
  overflow-y: auto;
  width: 94% !important;
  text-align: center;
}

.level-modal-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #2D3748;
  margin-bottom: 8px;
}

.level-picker-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0 18px 0;
}

.picker-group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #4A5568;
  text-align: left;
  margin-bottom: 6px;
  padding-left: 4px;
}

.picker-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.level-pick-card {
  background: #FFFFFF;
  border: 3px solid #38BDF8;
  border-radius: 18px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 5px 0 #0284C7, 0 8px 14px rgba(2, 132, 199, 0.15);
  font-family: inherit;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-pick-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 0 #0284C7, 0 12px 18px rgba(2, 132, 199, 0.22);
}

.level-pick-card.pick-card-active {
  border-color: #22C55E;
  box-shadow: 0 5px 0 #15803D, 0 8px 14px rgba(34, 197, 94, 0.25);
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.level-pick-card.pick-card-locked {
  border-color: #CBD5E1;
  box-shadow: 0 5px 0 #94A3B8;
  background: #F8FAFC;
  opacity: 0.7;
}

.lvl-badge-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0284C7;
}

.lvl-badge-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.lvl-badge-state {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748B;
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ==========================================================================
   LEVEL 4 & LEVEL 5: MATCHING CHALLENGE BOARD
   Interactive SVG Line Drawing, 5 Alphabet Boxes & 5 Pictures (L4)
   4 Baby Animal Cards & 4 Mother Animals (L5)
   ========================================================================== */

/* Top-Left Wooden Level Sign Badge (Matching Reference Image) */
.question-prompt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  position: relative;
  margin-bottom: 4px;
}

.hud-wood-level-badge {
  background: linear-gradient(180deg, #A16207 0%, #854D0E 40%, #713F12 100%);
  border: 3.5px solid #451A03;
  border-radius: 12px;
  box-shadow: 0 4px 0 #361401, 0 8px 18px rgba(0, 0, 0, 0.25);
  color: #FEF3C7;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 900;
  text-shadow: 0 2px 0 #451A03, 0 -1px 0 #CA8A04;
  padding: 6px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  letter-spacing: 0.5px;
  user-select: none;
  flex-shrink: 0;
}

.main-question-panel.matching-mode-active {
  padding: 8px 16px !important;
  gap: 6px !important;
}

.main-question-panel.matching-mode-active .question-prompt-banner {
  background: #FFFFFF !important;
  border: 3px solid #38BDF8 !important;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.12) !important;
  padding: 4px 16px !important;
  margin-bottom: 2px !important;
}

.main-question-panel.matching-mode-active .question-prompt-banner .prompt-text {
  color: #1E3A8A !important;
  font-size: 1.15rem !important;
}

.hud-wood-level-badge::before,
.hud-wood-level-badge::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #FEF08A;
  border: 1.5px solid #451A03;
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.4);
}
.hud-wood-level-badge::before { left: 6px; }
.hud-wood-level-badge::after { right: 6px; }

/* Wooden Signpost Under Detective: Think Match Learn */
.detective-wooden-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -6px;
  user-select: none;
}

.wood-sign-board {
  background: linear-gradient(180deg, #FDE68A 0%, #F59E0B 50%, #D97706 100%);
  border: 3px solid #78350F;
  border-radius: 10px;
  box-shadow: 0 4px 0 #451A03, 0 8px 14px rgba(0, 0, 0, 0.18);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 110px;
}

.wood-sign-word {
  font-size: 1.05rem;
  font-weight: 900;
  color: #78350F;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #FEF3C7;
  line-height: 1.15;
}

.wood-sign-star {
  font-size: 0.95rem;
  color: #FACC15;
  filter: drop-shadow(0 1px 2px rgba(120, 53, 15, 0.4));
}

.wood-sign-stake {
  width: 14px;
  height: 26px;
  background: linear-gradient(90deg, #92400E, #78350F);
  border: 2px solid #451A03;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Circular Purple Home Button (Matching Reference Image) */
.purple-home-btn {
  position: fixed;
  bottom: 44px;
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, #A855F7 0%, #7E22CE 100%);
  border: 3.5px solid #FFFFFF;
  box-shadow: 0 5px 0 #581C87, 0 10px 20px rgba(126, 34, 206, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Creator Credits in Bottom Right Corner of Screen */
.game-credits {
  position: fixed;
  bottom: 10px;
  right: 14px;
  z-index: 90;
  pointer-events: none;
  user-select: none;
  font-family: 'Comic Neue', 'Fredoka', 'Nunito', 'Arial Rounded MT Bold', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E293B;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  letter-spacing: 0.25px;
  line-height: 1.4;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .game-credits {
    font-size: 0.72rem;
    padding: 3px 8px;
    bottom: 6px;
    right: 8px;
  }
  .purple-home-btn {
    bottom: 36px;
    right: 12px;
    width: 46px;
    height: 46px;
  }
}

.purple-home-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 7px 0 #581C87, 0 14px 24px rgba(126, 34, 206, 0.45);
}

.purple-home-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #581C87;
}

/* Main Matching Arena */
.matching-board-arena {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 3px solid #38BDF8;
  border-radius: 16px;
  box-shadow: 0 4px 0 #0284C7, 0 8px 18px rgba(2, 132, 199, 0.14);
  padding: clamp(4px, 0.6vh, 8px) clamp(8px, 1.2vw, 14px);
  position: relative;
  user-select: none;
  touch-action: none;
  min-height: clamp(270px, 42vh, 390px);
  display: flex;
  align-items: center;
}

.matching-board-flex {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  position: relative;
}

/* Left & Right Columns */
.matching-col-left,
.matching-col-right {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.7vh, 8px);
  width: clamp(115px, 14vw, 165px);
  z-index: 6;
  position: relative;
}

.matching-draw-spacer {
  flex: 1;
  min-width: 170px;
  position: relative;
  z-index: 2;
}

/* Dynamic Line Drawing Canvas */
.matching-canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

/* Connector Dots */
.match-connector-dot {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0284C7;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.6);
  transform: translateY(-50%);
  cursor: crosshair;
  z-index: 15;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  pointer-events: auto;
}

.match-dot-right {
  right: -9px;
}

.match-dot-left {
  left: -9px;
}

.match-connector-dot:hover,
.card-hover-target .match-connector-dot {
  transform: translateY(-50%) scale(1.35);
  background: #22C55E;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.85);
}

.card-selected-active .match-connector-dot {
  transform: translateY(-50%) scale(1.4);
  background: #F59E0B;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.9);
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  0% { transform: translateY(-50%) scale(1.2); }
  100% { transform: translateY(-50%) scale(1.5); }
}

/* Level 4: Alphabet Boxes (Left Column) */
.letter-box-card {
  height: clamp(72px, 11.2vh, 96px);
  width: 100%;
  border-radius: 14px;
  border: 2.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.letter-box-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.12), 0 8px 14px rgba(0, 0, 0, 0.08);
}

.letter-box-char {
  font-size: 2.3rem;
  font-weight: 900;
  color: #1E293B;
  line-height: 1;
  font-family: inherit;
  user-select: none;
}

/* Level 4: Picture Cards (Right Column) */
.pic-match-card {
  height: clamp(72px, 11.2vh, 96px);
  width: 100%;
  background: #FFFFFF;
  border: 2.5px solid #38BDF8;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 3px 0 #BAE6FD, 0 4px 8px rgba(2, 132, 199, 0.08);
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pic-match-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 0 #38BDF8, 0 8px 14px rgba(2, 132, 199, 0.15);
}

.pic-match-illu {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pic-match-illu svg,
.pic-match-illu .game-illu {
  width: 90%;
  height: 90%;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Level 5: Baby & Mother Animal Cards */
.baby-match-card,
.mother-match-card {
  height: clamp(88px, 14.5vh, 128px);
  width: 100%;
  background: #FFFFFF;
  border: 2.5px solid #38BDF8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 3px 0 #BAE6FD, 0 4px 8px rgba(2, 132, 199, 0.08);
  cursor: pointer;
  padding: 4px 6px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.baby-match-card:hover,
.mother-match-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 0 #38BDF8, 0 8px 14px rgba(2, 132, 199, 0.15);
}

.animal-illu-box {
  width: 100%;
  height: calc(100% - 22px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.animal-illu-box svg,
.animal-illu-box .game-illu {
  width: 88%;
  height: 88%;
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.animal-card-name {
  font-size: 0.84rem;
  font-weight: 900;
  color: #1E3A8A;
  margin-top: 1px;
  line-height: 1;
}

/* Interactive Match States */
.card-selected-active {
  border-color: #F59E0B !important;
  box-shadow: 0 0 0 3.5px #FDE047, 0 6px 16px rgba(245, 158, 11, 0.4) !important;
  transform: scale(1.04) translateY(-2px) !important;
}

.card-hover-target {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3.5px #A7F3D0, 0 6px 16px rgba(16, 185, 129, 0.4) !important;
  transform: scale(1.04) !important;
}

.card-matched {
  border-color: #22C55E !important;
  box-shadow: 0 4px 0 #15803D, 0 6px 14px rgba(34, 197, 94, 0.2) !important;
  pointer-events: none !important;
  opacity: 0.95;
}

.card-matched .match-connector-dot {
  background: #22C55E !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7) !important;
}

/* Green Tick Badge on Matched Cards */
.match-tick-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22C55E;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: tickBadgePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

@keyframes tickBadgePop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Stage Complete Toast / Banner */
.stage-complete-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: #FFFFFF;
  border: 4px solid #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(22, 163, 74, 0.45);
  padding: 16px 36px;
  font-size: 1.4rem;
  font-weight: 900;
  z-index: 60;
  text-align: center;
  pointer-events: none;
  animation: toastBannerPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.5px;
}

@keyframes toastBannerPop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ==========================================================================
   LEVEL 6: SPELL THE WORD
   ========================================================================== */
.spell-clue-card {
  background: #FFFFFF;
  border: 4px solid #EC4899;
  border-radius: 24px;
  box-shadow: 0 6px 0 #BE185D, 0 12px 24px rgba(236, 72, 153, 0.18);
  padding: 8px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: clamp(180px, 29vh, 265px);
  max-width: 460px;
  margin: 0 auto;
}

.spell-illu-box {
  width: 100%;
  max-width: clamp(160px, 24vw, 260px);
  height: clamp(110px, 18vh, 175px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spell-illu-box svg,
.spell-illu-box .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
}

.spell-slots-row {
  display: flex;
  gap: clamp(4px, 0.6vw, 8px);
  justify-content: center;
  align-items: center;
}

.spell-slot-box {
  width: clamp(34px, 3.8vw, 48px);
  height: clamp(38px, 5vh, 52px);
  background: #FFFFFF;
  border: 2.5px solid #CBD5E1;
  border-radius: 12px;
  box-shadow: 0 3px 0 #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.3rem, 1.8vw, 1.8rem);
  font-weight: 900;
  color: #1E293B;
  transition: all 0.18s ease;
  position: relative;
}

.spell-slot-box.spell-slot-active {
  border-color: #EC4899 !important;
  box-shadow: 0 3px 0 #BE185D, 0 0 12px rgba(236, 72, 153, 0.4) !important;
  transform: scale(1.05);
}

.spell-slot-box.spell-slot-filled {
  border-color: #0284C7;
  color: #0284C7;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F9FF 100%);
  box-shadow: 0 3px 0 #0369A1;
  animation: popLetter 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spell-slot-box.spell-slot-correct {
  border-color: #22C55E !important;
  background: #DCFCE7 !important;
  color: #15803D !important;
  box-shadow: 0 3px 0 #15803D !important;
}

.spell-slot-cursor {
  animation: cursorBlink 0.9s infinite;
  color: #EC4899;
  font-weight: 400;
  font-size: 1.5rem;
}

@keyframes cursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes popLetter {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.spell-wrong-wobble {
  animation: spellShake 0.45s ease-in-out;
  border-color: #EF4444 !important;
  background: #FEE2E2 !important;
  color: #B91C1C !important;
}

@keyframes spellShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* On-Screen Keyboard for Touch & Accessibility */
.spell-keyboard-tray {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.4vh, 4px);
  align-items: center;
  width: 100%;
  max-width: 580px;
  margin: clamp(2px, 0.4vh, 4px) auto 0 auto;
}

.spell-kb-row {
  display: flex;
  gap: clamp(2px, 0.4vw, 4px);
  justify-content: center;
  width: 100%;
}

.spell-kb-key {
  width: clamp(26px, 2.6vw, 36px);
  height: clamp(26px, 3.6vh, 36px);
  background: #FFFFFF;
  border: 1.5px solid #BAE6FD;
  border-radius: 8px;
  box-shadow: 0 2px 0 #7DD3FC;
  font-size: clamp(0.8rem, 0.95vw, 1.05rem);
  font-weight: 900;
  color: #0369A1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.12s ease;
}

.spell-kb-key:hover {
  transform: translateY(-2px);
  background: #E0F2FE;
  box-shadow: 0 4px 0 #7DD3FC;
}

.spell-kb-key:active {
  transform: translateY(2px);
  box-shadow: none;
}

.spell-kb-key-action {
  min-width: 65px;
  font-size: 0.95rem;
}

.spell-kb-delete {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  border-color: #B91C1C;
  color: #FFFFFF;
  box-shadow: 0 3px 0 #991B1B;
}

.spell-kb-delete:hover {
  background: #DC2626;
  box-shadow: 0 4px 0 #991B1B;
}

.spell-kb-clear {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-color: #B45309;
  color: #FFFFFF;
  box-shadow: 0 3px 0 #92400E;
}

.spell-kb-clear:hover {
  background: #D97706;
  box-shadow: 0 4px 0 #92400E;
}

/* Responsiveness for Picture Activities */
@media (max-width: 860px) {
  .pic-choices-grid,
  .shapes-objects-row,
  .sort-items-row,
  .babies-parents-row,
  .babies-tray-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .baskets-container {
    grid-template-columns: 1fr;
  }
  .spell-kb-key {
    width: 34px;
    height: 40px;
    font-size: 1.1rem;
  }
  .matching-board-arena {
    padding: 10px 12px;
  }
  .matching-col-left, .matching-col-right {
    width: 115px;
    gap: 8px;
  }
  .letter-box-card, .pic-match-card {
    height: 60px;
  }
  .letter-box-char {
    font-size: 2.4rem;
  }
  .baby-match-card, .mother-match-card {
    height: 78px;
  }
  .animal-illu-box {
    height: 44px;
  }
}

/* ========================================================
   LEVEL 4: FRUIT SORTING GAME (SCREENSHOT 1)
   ======================================================== */
.fruit-stand-game {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  gap: 8px;
  user-select: none;
}

/* 2-Tier Wooden Fruit Market Stand */
.fruit-stand-wrapper {
  position: relative;
  background: linear-gradient(180deg, #FDE68A 0%, #F59E0B 100%);
  border-radius: 20px;
  padding: 8px 14px 12px;
  border: 4px solid #B45309;
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

/* Striped Awning at Top */
.fruit-stand-awning {
  width: calc(100% + 16px);
  margin-left: -8px;
  height: 28px;
  background: repeating-linear-gradient(90deg, #38BDF8 0px, #38BDF8 28px, #FFFFFF 28px, #FFFFFF 56px);
  border-radius: 12px 12px 0 0;
  border: 3px solid #0284C7;
  border-bottom: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  position: relative;
  display: flex;
  justify-content: space-between;
}

.fruit-stand-scallops {
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 10px;
  background: radial-gradient(circle 7px at 14px 0px, #38BDF8 90%, transparent 95%),
              radial-gradient(circle 7px at 42px 0px, #FFFFFF 90%, transparent 95%);
  background-size: 56px 10px;
}

/* 2x2 Wooden Fruit Compartments */
.fruit-boxes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.fruit-market-box {
  position: relative;
  background: linear-gradient(180deg, #FBBF24 0%, #D97706 70%, #92400E 100%);
  border: 3px solid #78350F;
  border-radius: 16px;
  min-height: 84px;
  padding: 8px 12px;
  box-shadow: inset 0 6px 14px rgba(0, 0, 0, 0.25), 0 5px 10px rgba(120, 53, 15, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  cursor: pointer;
}

.fruit-market-box:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 6px 14px rgba(0, 0, 0, 0.2), 0 8px 18px rgba(120, 53, 15, 0.35);
}

.fruit-box-hover {
  border-color: #22C55E !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.4), inset 0 6px 14px rgba(0, 0, 0, 0.2) !important;
  transform: scale(1.02);
}

/* Circular Badge Medallion on rim */
.fruit-box-badge {
  position: absolute;
  top: -16px;
  left: 12px;
  width: clamp(46px, 7.5vh, 58px);
  height: clamp(46px, 7.5vh, 58px);
  background: #FFFFFF;
  border: 2.5px solid #78350F;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.fruit-box-badge svg,
.fruit-box-badge .game-illu {
  width: 82%;
  height: 82%;
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
}

.fruit-box-basket-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-top: 4px;
}

.sorted-fruit-piece {
  width: clamp(44px, 7vh, 56px);
  height: clamp(44px, 7vh, 56px);
  animation: fruitPopLand 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sorted-fruit-piece svg,
.sorted-fruit-piece .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

@keyframes fruitPopLand {
  0% { transform: scale(0.3) translateY(-20px); opacity: 0; }
  70% { transform: scale(1.2) translateY(2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); }
}

/* Bottom Lavender Tray */
.fruit-sorting-tray {
  background: linear-gradient(180deg, #DDD6FE 0%, #C4B5FD 100%);
  border: 3.5px solid #8B5CF6;
  border-radius: 18px;
  padding: 8px 14px;
  box-shadow: inset 0 3px 8px rgba(109, 40, 217, 0.2), 0 6px 14px rgba(0, 0, 0, 0.12);
  min-height: 66px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.fruit-tray-item {
  width: clamp(54px, 9vh, 76px);
  height: clamp(54px, 9vh, 76px);
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fruit-tray-item svg,
.fruit-tray-item .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.fruit-tray-item:hover {
  transform: scale(1.15) translateY(-3px);
}

.fruit-tray-item.fruit-item-selected {
  transform: scale(1.2) translateY(-6px);
  filter: drop-shadow(0 0 8px #F59E0B);
  animation: pulseFloat 1s infinite alternate ease-in-out;
}

.fruit-tray-item svg {
  width: 100%;
  height: 100%;
}

@keyframes pulseFloat {
  0% { transform: scale(1.18) translateY(-4px); }
  100% { transform: scale(1.24) translateY(-8px); }
}

/* ========================================================
   LEVEL 4: FRUIT STAGE COMPLETION OVERLAY & NEXT STAGE BUTTON
   ======================================================== */
.fruit-stage-complete-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--border-radius-lg, 24px);
  animation: fruitOverlayFadeIn 0.35s ease-out;
  padding: 16px;
}

@keyframes fruitOverlayFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.fruit-stage-complete-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFBEB 100%);
  border: 4px solid #F59E0B;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 6px rgba(251, 191, 36, 0.35);
  padding: 24px 32px;
  text-align: center;
  max-width: 440px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fruitCardPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fruit-stage-complete-card.final-stage-card {
  border-color: #EAB308;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 6px rgba(234, 179, 8, 0.4);
}

@keyframes fruitCardPop {
  0% { transform: scale(0.7); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.fruit-complete-star-anim {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2px;
}

.star-main-bounce {
  font-size: 3.8rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.5));
  animation: starBounce 1.2s infinite ease-in-out;
}

@keyframes starBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.15) rotate(6deg); }
}

.star-sparkle {
  font-size: 1.8rem;
  animation: sparkleTwinkle 1s infinite alternate;
}
.star-sparkle-1 { animation-delay: 0.2s; }
.star-sparkle-2 { animation-delay: 0.5s; }

@keyframes sparkleTwinkle {
  0% { transform: scale(0.7) rotate(-15deg); opacity: 0.4; }
  100% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

.fruit-complete-title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 900;
  color: #15803D;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8), 0 4px 12px rgba(34, 197, 94, 0.25);
  letter-spacing: 0.5px;
}

.fruit-complete-subtitle {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #475569;
}

.fruit-complete-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 10px;
}

.stat-pill {
  background: #FEF3C7;
  color: #B45309;
  border: 2px solid #FCD34D;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.12);
}

.btn-fruit-next-stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%);
  color: #FFFFFF;
  border: 3.5px solid #14532D;
  border-radius: 9999px;
  padding: 12px 34px;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
}

.btn-fruit-next-stage:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  background: linear-gradient(180deg, #4ADE80 0%, #22C55E 100%);
}

.btn-fruit-next-stage:active {
  transform: translateY(1px) scale(0.98);
}

.fruit-complete-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-fruit-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #F1F5F9 0%, #E2E8F0 100%);
  color: #334155;
  border: 3px solid #94A3B8;
  border-radius: 9999px;
  padding: 10px 24px;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-fruit-secondary:hover {
  transform: translateY(-2px);
  background: #FFFFFF;
}

/* ========================================================
   LEVEL 5: RING STACKING GAME (SCREENSHOT 2)
   ======================================================== */
.ring-stack-game {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  gap: 8px;
  user-select: none;
}

/* 3 Pole Stations Arena */
.ring-stations-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: flex-end;
  min-height: 200px;
  padding: 2px 6px 0;
}

.ring-pole-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Target Preview Bubble Above Pole */
.ring-target-bubble {
  background: #FFFFFF;
  border: 3px solid #38BDF8;
  border-radius: 16px;
  padding: 4px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  min-width: 72px;
  margin-bottom: 8px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

/* Bubble Downward Pointer Triangle */
.ring-target-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 9px solid #38BDF8;
}

.ring-target-bubble.target-completed {
  border-color: #22C55E;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
  animation: targetBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ring-target-bubble.target-completed::after {
  border-top-color: #22C55E;
}

@keyframes targetBounce {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.target-tick-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: #22C55E;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Mini preview stack inside target bubble */
.ring-target-preview {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  position: relative;
}

.mini-target-ring {
  width: 44px;
  height: 15px;
  margin-top: -5px;
}

.mini-target-base {
  width: 46px;
  height: 10px;
  background: linear-gradient(180deg, #FB923C 0%, #EA580C 100%);
  border: 1.5px solid #C2410C;
  border-radius: 8px;
}

/* Vertical Pole & Pedestal Base */
.ring-pole-column {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  width: 125px;
  height: 135px;
  cursor: pointer;
}

.ring-pole-rod {
  position: absolute;
  bottom: 8px;
  width: 18px;
  height: 115px;
  background: linear-gradient(90deg, #FB923C 0%, #F97316 40%, #EA580C 100%);
  border: 2px solid #C2410C;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  z-index: 1;
}

.ring-pole-base {
  width: 115px;
  height: 20px;
  background: linear-gradient(180deg, #FB923C 0%, #F97316 65%, #C2410C 100%);
  border: 2.5px solid #9A3412;
  border-radius: 50px;
  box-shadow: 0 4px 8px rgba(154, 52, 18, 0.35);
  z-index: 2;
}

.ring-stack-container {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  position: absolute;
  bottom: 12px;
  width: 100%;
  z-index: 3;
}

.stacked-ring-item {
  width: 96px;
  height: 34px;
  margin-top: -14px;
  position: relative;
  animation: ringDropSlide 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.stacked-ring-item svg {
  width: 100%;
  height: 100%;
}

@keyframes ringDropSlide {
  0% { transform: translateY(-40px) scale(1.1); opacity: 0.5; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Bottom Ring Palette Tray */
.ring-palette-tray {
  background: #FFFFFF;
  border: 3.5px solid #38BDF8;
  border-radius: 18px;
  padding: 6px 14px;
  box-shadow: inset 0 2px 6px rgba(2, 132, 199, 0.15), 0 6px 14px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-height: 64px;
}

.ring-choice-item {
  width: 76px;
  height: 38px;
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-choice-item:hover {
  transform: scale(1.15) translateY(-4px);
}

.ring-choice-item.ring-choice-selected {
  transform: scale(1.22) translateY(-6px);
  filter: drop-shadow(0 0 10px #F59E0B);
  animation: pulseFloat 1s infinite alternate ease-in-out;
}

.ring-choice-item svg {
  width: 100%;
  height: 100%;
}

/* ========================================================
   LEVEL 6: SHADOW MATCHING GAME (SCREENSHOT 3)
   ======================================================== */
.shadow-match-game {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  gap: 8px;
  user-select: none;
}

/* 2x3 Shadow Cards Grid */
.shadow-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.shadow-match-card {
  background: #FFFFFF;
  border: 3px solid #CBD5E1;
  border-radius: 16px;
  height: clamp(96px, 16vh, 142px);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.shadow-match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.12);
}

.shadow-match-card.shadow-hover {
  border-color: #22C55E !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35) !important;
  transform: scale(1.03);
}

.shadow-match-card.shadow-matched {
  border-color: #22C55E;
  background: #F0FDF4;
}

.shadow-silhouette-card-content {
  width: 85%;
  height: 85%;
  max-width: clamp(82px, 13.5vh, 122px);
  max-height: clamp(82px, 13.5vh, 122px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shadow-silhouette-card-content svg,
.shadow-silhouette-card-content .game-illu {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shadow-silhouette-card-content svg {
  width: 100%;
  height: 100%;
  filter: url(#exactDarkShadow);
}

.shadow-matched .shadow-silhouette-card-content svg {
  filter: none !important;
  animation: shadowMatchedPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes shadowMatchedPop {
  0% { transform: scale(0.6); opacity: 0.5; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.shadow-tick-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  background: #22C55E;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  animation: bubblePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Bottom Dark Green/Olive Tray */
.shadow-objects-tray {
  background: linear-gradient(180deg, #3A4722 0%, #252F14 100%);
  border: 3.5px solid #4D5E2A;
  border-radius: 18px;
  padding: 6px 14px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4), 0 6px 14px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-height: clamp(76px, 12vh, 100px);
}

.shadow-tray-item {
  width: clamp(62px, 9.8vh, 88px);
  height: clamp(62px, 9.8vh, 88px);
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shadow-tray-item svg,
.shadow-tray-item .game-illu {
  width: 85%;
  height: 85%;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.shadow-tray-item:hover {
  transform: scale(1.18) translateY(-4px);
}

.shadow-tray-item.shadow-item-selected {
  transform: scale(1.24) translateY(-6px);
  filter: drop-shadow(0 0 10px #FACC15);
  animation: pulseFloat 1s infinite alternate ease-in-out;
}

.shadow-tray-item.shadow-item-placed {
  opacity: 0.25;
  pointer-events: none;
  filter: grayscale(80%);
}

.shadow-tray-item svg {
  width: 100%;
  height: 100%;
}



