/**
 * Animações — Cinematic Space Romance
 * Microinterações, glow, ripple, shimmer
 */

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.7; filter: blur(20px); }
  50% { opacity: 1; filter: blur(30px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(-8px) translateX(4px); }
  66% { transform: translateY(4px) translateX(-6px); }
}

@keyframes float-micro {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes twinkle-slow {
  0%, 100% { opacity: 0.02; }
  50% { opacity: 0.06; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}

/* Shimmer para botões */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Glow pulse para títulos */
@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.3)); }
  50% { filter: drop-shadow(0 0 32px rgba(124, 58, 237, 0.5)); }
}

/* Shooting star */
.shooting-star {
  position: relative;
  display: inline-block;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.shooting-star::before {
  content: '';
  position: absolute;
  top: -2.5em;
  left: 50%;
  width: 4px;
  height: 2.5em;
  background: linear-gradient(to bottom, transparent 0%, currentColor 40%, currentColor 100%);
  transform: translateX(-50%);
  opacity: 0.6;
  filter: blur(3px);
  pointer-events: none;
}

.shooting-star::after {
  content: '';
  position: absolute;
  top: -1.8em;
  left: 50%;
  width: 2px;
  height: 1.8em;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.5));
  transform: translateX(-50%);
  opacity: 0.5;
  filter: blur(1px);
  pointer-events: none;
}

/* Star explode — último casal */
.star-explode {
  background: linear-gradient(135deg, #F472B6 0%, #7C3AED 25%, #38BDF8 50%, #4dffea 75%, #FBBF24 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: star-explode-pulse 2s ease-in-out infinite, star-explode-gradient 4s ease infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(244, 114, 182, 0.6)) drop-shadow(0 0 24px rgba(124, 58, 237, 0.5)) drop-shadow(0 0 36px rgba(251, 191, 36, 0.4));
}

.star-explode::before {
  background: linear-gradient(to bottom, transparent 0%, #F472B6 30%, #7C3AED 60%, #FBBF24 100%);
  opacity: 0.9;
  filter: blur(4px);
  height: 3em;
  width: 6px;
  animation: star-explode-tail 1.5s ease-in-out infinite alternate;
}

.star-explode::after {
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.8));
  opacity: 0.8;
  filter: blur(2px);
}

@keyframes star-explode-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(244, 114, 182, 0.6)) drop-shadow(0 0 24px rgba(124, 58, 237, 0.5)) drop-shadow(0 0 36px rgba(251, 191, 36, 0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(244, 114, 182, 0.9)) drop-shadow(0 0 40px rgba(124, 58, 237, 0.7)) drop-shadow(0 0 60px rgba(251, 191, 36, 0.5));
    transform: scale(1.05);
  }
}

@keyframes star-explode-tail {
  0% { opacity: 0.7; transform: translateX(-50%) scaleY(0.9); }
  100% { opacity: 1; transform: translateX(-50%) scaleY(1.1); }
}

@keyframes star-explode-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

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

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

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

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

.animate-twinkle-slow {
  animation: twinkle-slow 4s ease-in-out infinite;
}

@keyframes icon-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(124, 58, 237, 0.3)); }
  50% { filter: drop-shadow(0 0 24px rgba(124, 58, 237, 0.5)); }
}

@keyframes slide-number-fade {
  0% { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

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

@media (prefers-reduced-motion: reduce) {
  .animate-twinkle-slow,
  .animate-icon-glow {
    animation: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

button:focus-visible,
[role="button"]:focus-visible,
.touch-target:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.5);
}

/* === Animações de fundo imersivas === */
@keyframes bg-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes aurora-wave {
  0%, 100% { opacity: 0.4; transform: scaleX(1) translateX(0); }
  33% { opacity: 0.6; transform: scaleX(1.05) translateX(2%); }
  66% { opacity: 0.5; transform: scaleX(0.98) translateX(-1%); }
}

@keyframes ambient-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(2%, -1%) scale(1.02); }
  50% { transform: translate(-1%, 2%) scale(0.99); }
  75% { transform: translate(1%, 1%) scale(1.01); }
}

@keyframes soft-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes star-drift {
  0% { transform: translateY(0) translateX(0); opacity: 0.03; }
  50% { transform: translateY(-2px) translateX(1px); opacity: 0.06; }
  100% { transform: translateY(0) translateX(0); opacity: 0.03; }
}

.animate-aurora { animation: aurora-wave 8s ease-in-out infinite; }
.animate-ambient-drift { animation: ambient-drift 12s ease-in-out infinite; }
.animate-soft-pulse { animation: soft-pulse 4s ease-in-out infinite; }
.animate-star-drift { animation: star-drift 6s ease-in-out infinite; }

.bg-animate-gradient {
  background-size: 200% 200%;
  animation: bg-gradient-shift 10s ease infinite;
}

/* Floating particles via CSS */
.floating-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: particle-float 8s ease-in-out infinite;
}

@keyframes particle-float {
  0% { opacity: 0; transform: translateY(100vh) scale(0.5); }
  10% { opacity: 0.4; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .animate-aurora,
  .animate-ambient-drift,
  .animate-soft-pulse,
  .animate-star-drift,
  .bg-animate-gradient,
  .floating-particle { animation: none; }
}
