/* ====================================
   Whale Analyzer — Animations
   ==================================== */

/* ── Keyframes ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 53, 0.1); }
  50% { box-shadow: 0 0 40px rgba(255, 107, 53, 0.25); }
}

/* ── Animation Classes ── */
.anim-fade-in-up {
  animation: fadeInUp 0.5s var(--ease-out) forwards;
  opacity: 0;
}

.anim-fade-in {
  animation: fadeIn 0.4s var(--ease-out) forwards;
  opacity: 0;
}

.anim-slide-in {
  animation: slideInRight 0.5s var(--ease-out) forwards;
  opacity: 0;
}

/* Stagger delays for card grid */
.stagger-1 { animation-delay: 0.03s; }
.stagger-2 { animation-delay: 0.06s; }
.stagger-3 { animation-delay: 0.09s; }
.stagger-4 { animation-delay: 0.12s; }
.stagger-5 { animation-delay: 0.15s; }
.stagger-6 { animation-delay: 0.18s; }
.stagger-7 { animation-delay: 0.21s; }
.stagger-8 { animation-delay: 0.24s; }
.stagger-9 { animation-delay: 0.27s; }
.stagger-10 { animation-delay: 0.30s; }
.stagger-11 { animation-delay: 0.33s; }
.stagger-12 { animation-delay: 0.36s; }
.stagger-13 { animation-delay: 0.39s; }
.stagger-14 { animation-delay: 0.42s; }
.stagger-15 { animation-delay: 0.45s; }
.stagger-16 { animation-delay: 0.48s; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* Number count animation */
.count-anim {
  animation: countUp 0.6s var(--ease-out) forwards;
  opacity: 0;
}

/* Glow effect for highlighted cards */
.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

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