/**
 * Nova Academy - Animations
 * Gold & Black Theme - Smooth Transitions & Effects
 */

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page-enter {
  animation: fadeIn 0.5s ease-out;
}

.page-enter-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   FADE ANIMATIONS
   ============================================ */
.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

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

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out forwards;
}

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-gold);
}

.hover-glow {
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.hover-glow:hover {
  box-shadow: var(--gold-glow);
  border-color: var(--gold-primary);
}

.hover-scale {
  transition: transform var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* ============================================
   BUTTON SHIMMER EFFECT
   ============================================ */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-shimmer:hover::before {
  left: 100%;
}

/* ============================================
   GOLD PULSE GLOW
   ============================================ */
.gold-pulse {
  animation: goldPulse 2s ease-in-out infinite;
}

/* ============================================
   LOADING SPINNER (GOLD)
   ============================================ */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-dark);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: rotate 1s linear infinite;
}

.spinner-sm {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.spinner-lg {
  width: 64px;
  height: 64px;
  border-width: 4px;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-light) 25%,
    var(--bg-lighter) 50%,
    var(--bg-light) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: var(--space-3);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   STAGGERED ANIMATION CHILDREN
   ============================================ */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 100ms; }
.stagger-children > *:nth-child(3) { animation-delay: 200ms; }
.stagger-children > *:nth-child(4) { animation-delay: 300ms; }
.stagger-children > *:nth-child(5) { animation-delay: 400ms; }
.stagger-children > *:nth-child(6) { animation-delay: 500ms; }

/* ============================================
   FLOAT ANIMATION (for decorative elements)
   ============================================ */
.float {
  animation: float 3s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 0.5s; }
.float-delay-2 { animation-delay: 1s; }
.float-delay-3 { animation-delay: 1.5s; }

/* ============================================
   BOUNCE ANIMATIONS
   ============================================ */
.bounce {
  animation: bounce 2s ease-in-out infinite;
}

.bounce-subtle {
  animation: bounce 3s ease-in-out infinite;
}

/* ============================================
   PULSE ANIMATIONS
   ============================================ */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.pulse-ring {
  position: relative;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gold-primary);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.5;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* ============================================
   SHINE EFFECT (for buttons/cards)
   ============================================ */
.shine {
  position: relative;
  overflow: hidden;
}

.shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.6s;
}

.shine:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* ============================================
   TILT EFFECT (3D hover)
   ============================================ */
.tilt {
  transition: transform var(--transition-base);
  transform-style: preserve-3d;
}

.tilt:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* ============================================
   UNDERLINE ANIMATION (for links)
   ============================================ */
.underline-animation {
  position: relative;
  display: inline-block;
}

.underline-animation::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: width var(--transition-base);
}

.underline-animation:hover::after {
  width: 100%;
}

/* ============================================
   GLASSMORPHISM
   ============================================ */
.glass {
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.glass-light {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   GRADIENT BORDERS
   ============================================ */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--gold-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ============================================
   TEXT GRADIENT ANIMATION
   ============================================ */
.text-gradient-animated {
  background: var(--gold-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ============================================
   LOADING DOTS
   ============================================ */
.loading-dots {
  display: inline-flex;
  gap: var(--space-1);
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--gold-primary);
  border-radius: 50%;
  animation: loading-dots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-dots {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ============================================
   HEARTBEAT ANIMATION
   ============================================ */
.heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.1); }
  20% { transform: scale(1); }
  30% { transform: scale(1.1); }
  40% { transform: scale(1); }
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ============================================
   FOCUS RING ANIMATION
   ============================================ */
.focus-ring-animate:focus {
  animation: focus-pulse 1s ease;
}

@keyframes focus-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.1); }
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gold-gradient);
  z-index: 9999;
  transition: width 0.1s;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  * {
    animation: none !important;
    transition: none !important;
  }
}
