/* ═══════════════════════════════════════════════════════════════════════════
   KODEK STUDIO TACTILE MOTION & BENTO ANIMATION SYSTEM (100dvh Minimalist)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Staggered Bento Card Entrance (bentoFadeUp) */
@keyframes bentoFadeUp {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.bento-enter {
  animation: bentoFadeUp 280ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.bento-stagger-1 { animation-delay: 40ms; }
.bento-stagger-2 { animation-delay: 80ms; }
.bento-stagger-3 { animation-delay: 120ms; }
.bento-stagger-4 { animation-delay: 160ms; }
.bento-stagger-5 { animation-delay: 200ms; }

/* 2. Floating AI Idle Pulse & Laser Shimmer Scan */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}
.float-slow {
  animation: floatSlow 3s ease-in-out infinite;
}

@keyframes laserShimmerScan {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  30% {
    opacity: 0.9;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}
.laser-shimmer-active {
  position: relative;
  overflow: hidden;
}
.laser-shimmer-active::after {
  content: '';
  position: absolute;
  inset-x: 0;
  top: 0;
  height: 48px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 10, 0.12), transparent);
  animation: laserShimmerScan 450ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
  z-index: 30;
}

/* 3. Flame Streak Flicker & Animated Number Pop */
@keyframes flameFlicker {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.15) rotate(-4deg);
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.6));
  }
  75% {
    transform: scale(1.08) rotate(4deg);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
  }
}
.flame-animated {
  animation: flameFlicker 2.2s ease-in-out infinite;
  display: inline-block;
  transform-origin: bottom center;
}

@keyframes floatUpFadeOut {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1.05);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -18px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -26px) scale(0.95);
  }
}
.xp-toast-pop {
  animation: floatUpFadeOut 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

/* 4. Sonar Ripple & Vertical Waveform Bar Animation */
@keyframes sonarRipple {
  0% {
    box-shadow: 0 0 0 0 rgba(10, 10, 10, 0.35);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(10, 10, 10, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(10, 10, 10, 0);
  }
}
.btn-sonar-ripple {
  animation: sonarRipple 0.6s ease-out;
}

@keyframes waveOscillate {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}
.wave-bar-active {
  animation: waveOscillate 0.6s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
.wave-bar-active:nth-child(2) { animation-delay: 0.12s; }
.wave-bar-active:nth-child(3) { animation-delay: 0.24s; }
.wave-bar-active:nth-child(4) { animation-delay: 0.36s; }

/* Token Karaoke Highlight while TTS plays */
.word-spoken-active {
  background-color: #F59E0B !important;
  color: #0A0A0A !important;
  font-weight: 800 !important;
  transform: scale(1.08);
  transition: all 0.1s ease;
}

/* 5. Tactile Keycap Press */
.keycap-pressed {
  transform: scale(0.92) !important;
  background-color: #0A0A0A !important;
  color: #FFFFFF !important;
  border-color: #0A0A0A !important;
  box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.2) !important;
  transition: transform 60ms ease, background-color 60ms ease;
}

/* Hint Chip Click Physics */
@keyframes chipPopFly {
  0% { transform: scale(1); }
  50% { transform: scale(0.88); }
  100% { transform: scale(1); }
}
.chip-pop {
  animation: chipPopFly 0.22s cubic-bezier(0.2, 0.8, 0.4, 1);
}

/* 6. Irregular Verbs Row Highlight & Morph */
.irregular-row-active {
  background-color: #FFFFFF !important;
  border-left: 3px solid #0A0A0A !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.inspector-morph {
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
