/* =============================================
   GAME HUB — ANIMATIONS.CSS
   ============================================= */

/* ---- REVEAL ON SCROLL ---- */
.reveal-up {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0s),
    transform 0.65s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0s);
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0s),
    transform 0.65s cubic-bezier(0.4, 0, 0.2, 1) var(--delay, 0s);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ---- GLOW PULSE ---- */
@keyframes glow-pulse-cyan {
  0%, 100% {
    box-shadow: 0 0 8px rgba(0,212,255,0.4), 0 0 20px rgba(0,212,255,0.15);
  }
  50% {
    box-shadow: 0 0 16px rgba(0,212,255,0.7), 0 0 40px rgba(0,212,255,0.3);
  }
}
@keyframes glow-pulse-magenta {
  0%, 100% {
    box-shadow: 0 0 8px rgba(255,0,110,0.4), 0 0 20px rgba(255,0,110,0.15);
  }
  50% {
    box-shadow: 0 0 16px rgba(255,0,110,0.7), 0 0 40px rgba(255,0,110,0.3);
  }
}

/* ---- NEON FLICKER ---- */
@keyframes neon-flicker {
  0%, 94%, 96%, 98%, 100% { opacity: 1; }
  95%, 97%, 99% { opacity: 0.85; }
}

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

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

/* ---- SHIMMER ---- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--cyan) 0%,
    #ffffff 25%,
    var(--cyan) 50%,
    var(--magenta) 75%,
    var(--cyan) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ---- BORDER ROTATE ---- */
@keyframes border-rotate {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}

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

/* ---- BUTTON RIPPLE ---- */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0,212,255,0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ---- TYPING CURSOR ---- */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.typing-cursor::after {
  content: '▋';
  color: var(--cyan);
  animation: blink 0.75s step-end infinite;
  margin-left: 2px;
}

/* ---- NUMBER COUNTER ---- */
.counting { animation: count-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes count-pop {
  0% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ---- HERO ENTRANCE ---- */
.hero-content .hero-badge { animation: reveal-hero 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both; }
.hero-content .hero-title  { animation: reveal-hero 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both; }
.hero-content .hero-sub    { animation: reveal-hero 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both; }
.hero-content .hero-cta    { animation: reveal-hero 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.45s both; }
.hero-content .hero-stats  { animation: reveal-hero 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.55s both; }

@keyframes reveal-hero {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- SCANLINE ANIMATION ---- */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.scanline-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.15), transparent);
  animation: scanline 8s linear infinite;
  pointer-events: none;
  z-index: 9999;
}

/* ---- STAR PARTICLES ---- */
@keyframes particle-float {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ---- CARD HOVER GLOW EFFECT ---- */
.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(
    ellipse at var(--mx, 50%) var(--my, 50%),
    rgba(0,212,255,0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.game-card:hover::after { opacity: 1; }

/* ---- GRADIENT BORDER ANIMATION ---- */
@keyframes gradient-border {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- ACTIVE NAV INDICATOR ---- */
.nav-link.active {
  animation: nav-active 0.3s ease;
}
@keyframes nav-active {
  from { transform: translateY(-2px); }
  to   { transform: translateY(0); }
}

/* ---- LOADING SPINNER ---- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(0,212,255,0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ---- NOTIFICATION BADGE PULSE ---- */
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(0,212,255,0); }
}

/* ---- FILTER TRANSITION ---- */
.game-card.filtering-out {
  animation: filter-out 0.2s ease forwards;
}
@keyframes filter-out {
  to { opacity: 0; transform: scale(0.95); }
}
.game-card.filtering-in {
  animation: card-in 0.35s cubic-bezier(0.4,0,0.2,1) both;
}
