/* ══════════════════════════════════════════════════════════════════
   EARLY WIN — Animations
   ══════════════════════════════════════════════════════════════════ */

/* ── Core keyframes ──────────────────────────────────────────────── */

@keyframes spin-ball {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

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

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

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

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

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

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

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 10px var(--primary-glow); }
  50%       { box-shadow: 0 0 25px var(--primary-glow), 0 0 50px rgba(0,208,132,0.1); }
}

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

@keyframes barFill {
  from { width: 0%; }
}

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

/* ── Animation classes ───────────────────────────────────────────── */
.animate-fade-in   { animation: fadeIn 0.4s ease forwards; }
.animate-slide-up  { animation: slideInUp 0.4s ease forwards; }
.animate-slide-left { animation: slideInLeft 0.35s ease forwards; }
.animate-glow      { animation: glow-pulse 2s ease-in-out infinite; }

/* Staggered card animations */
.stagger > *:nth-child(1)  { animation-delay: 0.05s; }
.stagger > *:nth-child(2)  { animation-delay: 0.10s; }
.stagger > *:nth-child(3)  { animation-delay: 0.15s; }
.stagger > *:nth-child(4)  { animation-delay: 0.20s; }
.stagger > *:nth-child(5)  { animation-delay: 0.25s; }
.stagger > *:nth-child(6)  { animation-delay: 0.30s; }

/* Cards slide in from bottom on load */
.match-cards-grid > .match-card {
  opacity: 0;
  animation: slideInUp 0.4s ease forwards;
}

/* Probability bar fills on trigger */
.prob-bar-fill.animate {
  animation: barFill 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Number count-up animation */
.count-up {
  display: inline-block;
  animation: countUp 0.5s ease forwards;
}

/* Live dot pulse */
.live-dot { animation: pulse-dot 1.8s ease-in-out infinite; }

/* Sidebar nav items hover glow */
.nav-item.active {
  position: relative;
}
.nav-item.active::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Hover glow on match cards */
.match-card.sur:hover  { box-shadow: 0 4px 20px rgba(0, 208, 132, 0.15); }
.match-card.risque:hover { box-shadow: 0 4px 20px rgba(245, 166, 35, 0.15); }
.match-card.fun:hover    { box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15); }

/* Topbar title transition */
.topbar-title {
  transition: opacity 0.2s ease;
}

/* Page transition */
.page-enter {
  animation: fadeIn 0.3s ease forwards;
}

/* Recommendation header glow */
.rec-header:not(.no-bet) {
  animation: glow-pulse 4s ease-in-out infinite;
}

/* Value badge pop */
.value-badge.positive {
  animation: countUp 0.5s ease 0.3s both;
}

/* Skeleton shimmer gradient */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--card)       25%,
    var(--card-hover) 50%,
    var(--card)       75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* Logo Animations */
@keyframes logo-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-8px) scale(1.02); }
}

@keyframes logo-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.4); opacity: 1; filter: drop-shadow(0 0 15px rgba(0, 208, 132, 0.4)); }
}

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