/* ========================================
   Keyframe Animations
   ======================================== */

/* Sparkle effect for decorations */
@keyframes sparkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* Bounce for loading */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Sway for lanterns */
@keyframes sway {
  0%, 100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

/* Fall for peach blossoms */
@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.3;
  }
}

/* Celebrate for result icon */
@keyframes celebrate {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Confetti fall */
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Pulse glow */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 
      0 0 20px rgba(255, 193, 7, 0.4),
      0 0 40px rgba(255, 193, 7, 0.2);
  }
  50% {
    box-shadow: 
      0 0 30px rgba(255, 193, 7, 0.6),
      0 0 60px rgba(255, 193, 7, 0.3);
  }
}

/* Wheel spin - this will be controlled by JS */
@keyframes wheel-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(var(--spin-angle, 1800deg));
  }
}

/* Shake for error */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Scale pop for buttons */
@keyframes pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Fade slide up */
@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Animation Utilities
   ======================================== */

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

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

.animate-pop {
  animation: pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-fade-up {
  animation: fade-slide-up 0.5s ease-out forwards;
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .blossom {
    display: none;
  }
}
