/* ==========================================================================
   Keyframe Animations & Transitions
   ========================================================================== */

@keyframes floatRainbow {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0.5);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(var(--color-primary-rgb), 0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Animation Utility Classes */
.animate-float {
  animation: floatRainbow 3.5s ease-in-out infinite;
}

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

.animate-bounce-in {
  animation: bounceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-slide-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.animate-slide-left {
  animation: slideInLeft 0.3s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.25s ease forwards;
}

.animate-shake {
  animation: shake 0.4s ease-in-out;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
