/* =============================================
   VIP YONO GAMES — Animations
   ============================================= */

/* --- Float Coin (Hero) --- */
@keyframes float-coin {
  0%   { transform: translateY(0px) rotate(0deg); }
  25%  { transform: translateY(-18px) rotate(5deg); }
  50%  { transform: translateY(-10px) rotate(-3deg); }
  75%  { transform: translateY(-22px) rotate(4deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* --- Shimmer (Skeleton) --- */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --- Pulse Gold (CTA button) --- */
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4); }
  50%       { box-shadow: 0 4px 35px rgba(255, 215, 0, 0.7), 0 0 0 6px rgba(255, 215, 0, 0.1); }
}

/* --- Slide In Left (Nav Drawer) --- */
@keyframes slide-in-left {
  0%   { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* --- Fade Up (Card Reveal) --- */
@keyframes fade-up {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Glow Border (Card Hover) --- */
@keyframes glow-border {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.3), 0 4px 24px rgba(0, 0, 0, 0.5); }
  50%       { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 8px 32px rgba(0, 0, 0, 0.6); }
}

/* --- Ticker Scroll (Top Bar) --- */
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Pulse Glow (Hero BG) --- */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.08); }
}

/* --- Spin (Loading) --- */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Count Up (Stats) --- */
@keyframes count-up {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Bounce (New Badge) --- */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-6px); }
  60%       { transform: translateY(-3px); }
}

/* --- Gradient Shift (Hero) --- */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Scale In (Modal) --- */
@keyframes scale-in {
  0%   { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

/* --- Fade In (General) --- */
@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* --- Twinkle (Stars) --- */
@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.3); }
}

/* --- Card Reveal with stagger delay (applied via JS data-delay) --- */
.card-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.card-animate.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.card-animate:nth-child(1)  { transition-delay: 0.05s; }
.card-animate:nth-child(2)  { transition-delay: 0.10s; }
.card-animate:nth-child(3)  { transition-delay: 0.15s; }
.card-animate:nth-child(4)  { transition-delay: 0.20s; }
.card-animate:nth-child(5)  { transition-delay: 0.25s; }
.card-animate:nth-child(6)  { transition-delay: 0.30s; }
.card-animate:nth-child(7)  { transition-delay: 0.05s; }
.card-animate:nth-child(8)  { transition-delay: 0.10s; }
.card-animate:nth-child(9)  { transition-delay: 0.15s; }
.card-animate:nth-child(10) { transition-delay: 0.20s; }
.card-animate:nth-child(11) { transition-delay: 0.25s; }
.card-animate:nth-child(12) { transition-delay: 0.30s; }

/* Star particle field */
.stars-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

/* Hover state for stats number */
.stat-item:hover .stat-number {
  animation: count-up 0.4s ease;
  color: #FFF3A3;
}

/* NEW badge bounce */
.card-new-badge {
  animation: bounce 2s ease-in-out infinite;
}

/* Header shrink transition */
#header.scrolled .nav-logo-text {
  font-size: 22px;
}

/* Smooth height transition for FAQ answers */
.faq-answer {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s ease;
}

/* Ripple effect on buttons */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.2s ease;
}

.btn:active::after {
  opacity: 1;
}

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 215, 0, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--dark-bg);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Hero content animation on load */
.hero-content > * {
  animation: fade-up 0.7s ease forwards;
  opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }
.hero-content > *:nth-child(5) { animation-delay: 0.7s; }
