/* ==============================================================================
   Rossaland 2026 - Organic Motion & Game Physics Keyframes
   Eliminates stiff CSS; delivers tactile, spring-damped micro-interactions.
   ============================================================================== */

@keyframes floatBob {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(0.6deg);
  }
}

@keyframes floatMascot {
  0%, 100% {
    transform: translateY(0px) scale(1) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) scale(1.03) rotate(-1.5deg);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.8;
    filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.45));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 28px rgba(147, 51, 234, 0.85));
  }
}

@keyframes cloudDrift {
  0% {
    transform: translateX(-4%);
  }
  50% {
    transform: translateX(4%);
  }
  100% {
    transform: translateX(-4%);
  }
}

@keyframes crystalSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Organic Floating Numbers with dynamic arc & fade */
@keyframes floatDamageArc {
  0% {
    transform: translate(-50%, -50%) scale(0.6) translateY(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    transform: translate(-50%, -50%) scale(1.25) translateY(-15px) rotate(-4deg);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.05) translateY(-55px) rotate(3deg);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.85) translateY(-85px) rotate(6deg);
    opacity: 0;
  }
}

@keyframes floatCritArc {
  0% {
    transform: translate(-50%, -50%) scale(0.5) translateY(0);
    opacity: 0;
    filter: drop-shadow(0 0 4px gold);
  }
  20% {
    transform: translate(-50%, -50%) scale(1.6) translateY(-25px) rotate(-8deg);
    opacity: 1;
    filter: drop-shadow(0 0 20px #fbbf24);
  }
  80% {
    transform: translate(-50%, -50%) scale(1.2) translateY(-75px) rotate(5deg);
    opacity: 0.95;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.9) translateY(-110px) rotate(10deg);
    opacity: 0;
  }
}

/* Elastic Tap Squish on Island Mining */
@keyframes tapSquish {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.92, 0.96) translateY(6px);
  }
  60% {
    transform: scale(1.04, 1.02) translateY(-4px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes rippleWave {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.65);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 22px rgba(6, 182, 212, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
  }
}

@keyframes energyBarGleam {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Ambient Radial Aurora Breathing */
@keyframes auroraPulse {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.45;
  }
  50% {
    transform: translate(10px, -15px) scale(1.08);
    opacity: 0.7;
  }
}

/* Helper Animation Utility Classes */
.animate-float {
  animation: floatBob 6s ease-in-out infinite;
}

.animate-mascot {
  animation: floatMascot 4.5s ease-in-out infinite;
}

.animate-glow {
  animation: glowPulse 3s ease-in-out infinite;
}

.animate-cloud {
  animation: cloudDrift 14s ease-in-out infinite;
}

.animate-crystal {
  animation: crystalSpin 8s linear infinite;
}

.animate-ripple {
  animation: rippleWave 2.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
