/**
 * GuideUniverse - Keyframe Animations & Micro-Interactions
 */

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* ==========================================================================
   CINEMATIC CHARACTER SWITCH TRANSITIONS (Blade Slash & Energy Zoom)
   ========================================================================== */
@keyframes charCinematicOutDown {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px) brightness(1);
  }
  40% {
    filter: brightness(1.4) blur(4px);
  }
  100% {
    opacity: 0;
    transform: translateY(60px) scale(0.92);
    filter: blur(12px) brightness(0.6);
  }
}

@keyframes charCinematicInDown {
  0% {
    opacity: 0;
    transform: translateY(-60px) scale(1.08);
    filter: blur(14px) brightness(1.6);
  }
  60% {
    filter: brightness(1.2) blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px) brightness(1);
  }
}

@keyframes charCinematicOutUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px) brightness(1);
  }
  40% {
    filter: brightness(1.4) blur(4px);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(0.92);
    filter: blur(12px) brightness(0.6);
  }
}

@keyframes charCinematicInUp {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(1.08);
    filter: blur(14px) brightness(1.6);
  }
  60% {
    filter: brightness(1.2) blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px) brightness(1);
  }
}

.char-cinematic-out-down {
  animation: charCinematicOutDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.char-cinematic-in-down {
  animation: charCinematicInDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.char-cinematic-out-up {
  animation: charCinematicOutUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.char-cinematic-in-up {
  animation: charCinematicInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered Text & UI Re-animation */
.ui-stagger-in {
  animation: fadeInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cards-stagger-in {
  animation: fadeInRight 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 59, 92, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 59, 92, 0.7);
  }
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   MARVEL CHARACTER SHOWCASE KEYFRAMES (Smart Animate & Levitation)
   ========================================================================== */
@keyframes marvelLevitate {
  0% {
    transform: translateY(-8px) scale(1.0);
  }
  50% {
    transform: translateY(-20px) scale(1.015);
  }
  100% {
    transform: translateY(-8px) scale(1.0);
  }
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

@keyframes marvelCharSwitchOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px) brightness(1);
  }
  100% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
    filter: blur(10px) brightness(1.5);
  }
}

@keyframes marvelCharSwitchIn {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(1.06);
    filter: blur(12px) brightness(1.6);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px) brightness(1);
  }
}

.marvel-char-out {
  animation: marvelCharSwitchOut 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.marvel-char-in {
  animation: marvelCharSwitchIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Atmospheric Background Art Ambient Breathing & Fade Switch */
@keyframes bgArtBreathing {
  0% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.05) translateY(-8px);
  }
  100% {
    transform: scale(1.02) translateY(6px);
  }
}

@keyframes bgArtFadeSwitch {
  0% {
    opacity: 0;
    transform: scale(1.22);
  }
  100% {
    opacity: var(--bg-art-opacity, 0.16);
    transform: scale(1.15);
  }
}

.bg-art-switch {
  animation: bgArtFadeSwitch 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

