/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */

/* ---- Cursor blink ---- */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---- Float (gentle bobbing) ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---- Pulse ring ---- */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- Pulse glow ---- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 105, 180, 0.2); }
  50% { box-shadow: 0 0 40px rgba(255, 105, 180, 0.4); }
}

/* ---- Sparkle ---- */
@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ---- Shake (wrong answer) ---- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-5px); }
  30%, 70% { transform: translateX(5px); }
}

/* ---- Bounce in ---- */
@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

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

/* ---- Float heart ---- */
@keyframes float-heart {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(0.5) rotate(20deg);
  }
}

/* ---- Drift left to right ---- */
@keyframes drift {
  0% { transform: translateX(-10px) rotate(0deg); }
  50% { transform: translateX(10px) rotate(180deg); }
  100% { transform: translateX(-10px) rotate(360deg); }
}

/* ---- Star twinkle (for intro) ---- */
@keyframes twinkle {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 1; }
}

/* ---- Gift box glow pulse ---- */
@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 10px 30px rgba(255, 105, 180, 0.2)); }
  50% { filter: drop-shadow(0 10px 40px rgba(255, 105, 180, 0.5)); }
}

/* ---- Ribbon shimmer ---- */
@keyframes shimmer {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

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

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

.animate-bounce-in {
  animation: bounce-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

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

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

  .tap-circle {
    animation: none;
    border-color: rgba(255, 182, 193, 0.8);
  }

  .envelope-hint,
  .gift-hint {
    animation: none;
  }
}
