/* ====================================
   ANIMATIONS.CSS - Premium Keyframes
   ==================================== */

/* Page Transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide Animations */
@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes slideLeftOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

@keyframes slideRightIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale Animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleUp {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

/* Glow Animations */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 5px rgba(212, 175, 105, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(212, 175, 105, 0.5);
  }
  100% {
    box-shadow: 0 0 5px rgba(212, 175, 105, 0.2);
  }
}

@keyframes goldGlow {
  0% {
    text-shadow: 0 0 10px rgba(212, 175, 105, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(212, 175, 105, 0.8);
  }
  100% {
    text-shadow: 0 0 10px rgba(212, 175, 105, 0.3);
  }
}

@keyframes glowBorder {
  0% {
    border-color: rgba(212, 175, 105, 0.3);
    box-shadow: inset 0 0 10px rgba(212, 175, 105, 0.1);
  }
  50% {
    border-color: rgba(212, 175, 105, 0.8);
    box-shadow: inset 0 0 15px rgba(212, 175, 105, 0.3);
  }
  100% {
    border-color: rgba(212, 175, 105, 0.3);
    box-shadow: inset 0 0 10px rgba(212, 175, 105, 0.1);
  }
}

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

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Rotate Animations */
@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 10px rgba(212, 175, 105, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(212, 175, 105, 0.6);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 10px rgba(212, 175, 105, 0.3);
  }
}

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

/* Button Ripple */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Hover Animations */
@keyframes lift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

@keyframes underlineExpand {
  from {
    transform: scaleX(0);
    transform-origin: right;
  }
  to {
    transform: scaleX(1);
    transform-origin: right;
  }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Loading Spinner */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Modal Animations */
@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes backdropFade {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

/* Card Stagger */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Text Animations */
@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes textShadowGlow {
  0% {
    text-shadow: 0 0 10px rgba(212, 175, 105, 0.3);
  }
  50% {
    text-shadow: 0 0 30px rgba(212, 175, 105, 0.8);
  }
  100% {
    text-shadow: 0 0 10px rgba(212, 175, 105, 0.3);
  }
}

/* Gradient Animations */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Border Animations */
@keyframes borderGlow {
  0% {
    border-color: rgba(212, 175, 105, 0.3);
    box-shadow: 0 0 5px rgba(212, 175, 105, 0.1);
  }
  50% {
    border-color: rgba(212, 175, 105, 1);
    box-shadow: 0 0 15px rgba(212, 175, 105, 0.4);
  }
  100% {
    border-color: rgba(212, 175, 105, 0.3);
    box-shadow: 0 0 5px rgba(212, 175, 105, 0.1);
  }
}

/* Backdrop Animation */
@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Stagger Animation Classes */
.stagger-item-1 { animation-delay: 0.1s; }
.stagger-item-2 { animation-delay: 0.2s; }
.stagger-item-3 { animation-delay: 0.3s; }
.stagger-item-4 { animation-delay: 0.4s; }
.stagger-item-5 { animation-delay: 0.5s; }
.stagger-item-6 { animation-delay: 0.6s; }
.stagger-item-7 { animation-delay: 0.7s; }
.stagger-item-8 { animation-delay: 0.8s; }

/* Scroll Animations */
.fade-in-on-scroll {
  animation: fadeUp 0.8s ease-out forwards;
  opacity: 0;
}

.slide-in-left {
  animation: slideLeft 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slideRight 0.8s ease-out forwards;
}

.scale-in-animation {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Smooth Transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, 
              border-color 0.3s ease, opacity 0.3s ease;
}

a, button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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