/* ============================================
   ANIMATIONS CSS - Transitions, Keyframes
   ============================================ */

/* ============================================
   Page Transitions
   ============================================ */

.page-container {
  transition: opacity 300ms ease, transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.page-exit {
  opacity: 0;
  transform: translateY(20px);
}

.page-enter {
  opacity: 0;
  transform: translateY(30px);
}

.page-active {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Loading Overlay
   ============================================ */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================
   Fade In Animations
   ============================================ */

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-delay-1 {
  animation: fadeIn 0.6s ease 0.1s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 0.6s ease 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 0.6s ease 0.3s forwards;
  opacity: 0;
}

/* ============================================
   Slide Animations
   ============================================ */

.slide-up {
  animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   Hover Effects
   ============================================ */

.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-scale {
  transition: transform var(--transition-normal);
}

.hover-scale:hover {
  transform: scale(1.03);
}

.hover-glow {
  transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(255, 0, 153, 0.4);
}

/* ============================================
   Neon Glow Effect
   ============================================ */

.neon-text {
  animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
  from {
    text-shadow: 0 0 10px #ff0099, 0 0 20px #ff0099, 0 0 30px #ff0099;
  }
  to {
    text-shadow: 0 0 20px #ff0099, 0 0 30px #ff0099, 0 0 40px #ff0099, 0 0 50px #ff0099;
  }
}

.neon-border {
  animation: neonBorderGlow 2s ease-in-out infinite alternate;
}

@keyframes neonBorderGlow {
  from {
    box-shadow: 0 0 5px #ff0099, 0 0 10px #ff0099, inset 0 0 5px #ff0099;
  }
  to {
    box-shadow: 0 0 10px #ff0099, 0 0 20px #ff0099, 0 0 30px #ff0099, inset 0 0 10px #ff0099;
  }
}

/* ============================================
   Pulse Animation
   ============================================ */

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* ============================================
   Gradient Animation
   ============================================ */

.gradient-animate {
  background: linear-gradient(270deg, #ff0099, #9933ff, #00ccff, #ff0099);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ============================================
   Typing Effect
   ============================================ */

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--brand-pink);
  margin-left: 0.1em;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ============================================
   Intersection Observer Animations
   ============================================ */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Stagger Animations
   ============================================ */

.stagger-item {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-item:nth-child(1) {
  animation: fadeIn 0.6s ease 0.1s forwards;
}

.stagger-item:nth-child(2) {
  animation: fadeIn 0.6s ease 0.2s forwards;
}

.stagger-item:nth-child(3) {
  animation: fadeIn 0.6s ease 0.3s forwards;
}

.stagger-item:nth-child(4) {
  animation: fadeIn 0.6s ease 0.4s forwards;
}

.stagger-item:nth-child(5) {
  animation: fadeIn 0.6s ease 0.5s forwards;
}

.stagger-item:nth-child(6) {
  animation: fadeIn 0.6s ease 0.6s forwards;
}

/* ============================================
   Modal Animations
   ============================================ */

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: scale(0.8);
}

.modal.show .modal-dialog {
  transform: scale(1);
}

/* ============================================
   Success Animation
   ============================================ */

.success-icon {
  animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}