/* Jasmin's Teaching Materials - Global Styles & Animations */

@keyframes chestShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-8deg) scale(1.05); }
  40% { transform: rotate(8deg) scale(1.08); }
  60% { transform: rotate(-6deg) scale(1.05); }
  80% { transform: rotate(6deg) scale(1.08); }
}

.animate-chest-shake {
  animation: chestShake 0.6s infinite ease-in-out;
}

@keyframes jellyBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.22, 0.78); }
  40% { transform: scale(0.82, 1.18); }
  50% { transform: scale(1.12, 0.88); }
  65% { transform: scale(0.96, 1.04); }
  75% { transform: scale(1.04, 0.96); }
  100% { transform: scale(1); }
}

.animate-jelly {
  animation: jellyBounce 0.7s ease-in-out;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: gentleFloat 3.5s infinite ease-in-out;
}

@keyframes popIn {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pop-in {
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4)); }
  50% { filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.9)); }
}

.animate-glow {
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes swayLeaf {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(5deg); }
}

.animate-sway {
  animation: swayLeaf 4s infinite ease-in-out;
  transform-origin: top left;
}

@keyframes keyUnlockBurst {
  0% { transform: scale(0.6); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-key-burst {
  animation: keyUnlockBurst 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Preschool Explorer Wallpaper for Body */
body.app-preschool-body {
  background-color: #FDFBF7;
  background-image: url('../images/body_pattern.svg');
  background-repeat: repeat;
  background-size: 140px 140px;
}

/* Enhanced Preschool Stage Frame */
#ppt-stage {
  position: relative !important;
  box-shadow: 0 20px 45px -12px rgba(180, 83, 9, 0.18), 0 0 0 4px #FDE68A !important;
  transition: all 0.3s ease;
}

/* Stage Canvas Background Themes (Paths relative to common/css/) */
.stage-theme-island {
  background-color: #BAE6FD !important;
  background-image: url('../../lessons/01-treasure-hunt/assets/images/stage_island_bg.svg') !important;
  background-size: cover !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
}

.stage-theme-map {
  background-color: #FEF3C7 !important;
  background-image: url('../../lessons/01-treasure-hunt/assets/images/stage_map_bg.svg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.stage-theme-kenney {
  background-color: #D4F0FC !important;
  background-image: url('../../lessons/01-treasure-hunt/assets/images/kenney_bg.png') !important;
  background-size: cover !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
}

.stage-theme-minimal {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.5) 0%, rgba(254, 249, 195, 0.25) 60%, rgba(255, 237, 213, 0.45) 100%) !important;
}

/* Fullscreen Presentation Stage (Clean 100vw x 100vh) */
#ppt-stage:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
  background-color: #FFFDF9 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  z-index: 99999 !important;
}

#ppt-stage:fullscreen #ppt-canvas {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 1.5rem !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
