/* =========================================
   PIN-UP CASINO AZ — Animations & Effects
   ========================================= */

/* --- Intersection Observer Animations --- */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}
[data-animate="left"] { transform: translateX(-24px); }
[data-animate="left"].visible { transform: translateX(0); }
[data-animate="right"] { transform: translateX(24px); }
[data-animate="right"].visible { transform: translateX(0); }
[data-animate="scale"] { transform: scale(0.92); }
[data-animate="scale"].visible { transform: scale(1); }

[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }
[data-delay="6"] { transition-delay: 0.6s; }

/* --- Particle Canvas --- */
#particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* --- Glitter / Shimmer effect on gold text --- */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.text-shimmer {
  background: linear-gradient(90deg,
    var(--color-gold) 0%,
    #fff 40%,
    var(--color-gold) 60%,
    var(--color-gold-dark) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* --- Neon pulse border --- */
@keyframes neonBorder {
  0%, 100% { box-shadow: 0 0 8px rgba(255,45,85,0.4), inset 0 0 8px rgba(255,45,85,0.1); }
  50%       { box-shadow: 0 0 20px rgba(255,45,85,0.7), inset 0 0 16px rgba(255,45,85,0.2); }
}
.neon-border { animation: neonBorder 2.5s ease-in-out infinite; }

/* --- Spin animation for casino chip --- */
@keyframes spinY {
  0%   { transform: perspective(600px) rotateY(0deg); }
  100% { transform: perspective(600px) rotateY(360deg); }
}
.spin-y { animation: spinY 4s linear infinite; }

/* --- Bounce for CTA --- */
@keyframes bounce-cta {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.bounce-cta { animation: bounce-cta 1.5s ease-in-out infinite; }

/* --- Typewriter cursor --- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--color-red);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

/* --- Card shine sweep on hover --- */
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.08) 50%,
    transparent 60%
  );
  z-index: 3;
  pointer-events: none;
  transition: left 0.5s ease;
}
.game-card:hover::before { left: 150%; }

/* --- Loading shimmer for images --- */
@keyframes skeleton {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface2) 37%, var(--color-surface) 63%);
  background-size: 400px 100%;
  animation: skeleton 1.4s ease infinite;
}

/* --- Confetti burst (JS triggered) --- */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 12px;
  top: -20px;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  animation: confettiFall 3s ease-in forwards;
}
@keyframes confettiFall {
  0%   { opacity: 1; transform: translateY(0) rotateZ(0); }
  100% { opacity: 0; transform: translateY(100vh) rotateZ(720deg); }
}

/* --- Ripple button effect --- */
.btn-ripple {
  overflow: hidden;
  position: relative;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* --- Slot machine reel spin --- */
@keyframes reelSpin {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}

/* --- Glow text pulse for hero heading --- */
@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(255,45,85,0.4); }
  50%       { text-shadow: 0 0 40px rgba(255,45,85,0.7), 0 0 60px rgba(255,45,85,0.3); }
}
.glow-pulse { animation: glowPulse 2.5s ease-in-out infinite; }

/* --- Progress bar animation --- */
@keyframes progressFill {
  from { width: 0; }
}
.progress-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--color-red), var(--color-orange));
  border-radius: 2px;
  animation: progressFill 1.5s ease forwards;
}

/* --- Hero section entrance --- */
.hero-content > * {
  animation: fadeInUp 0.8s ease both;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }
.hero-content > *:nth-child(6) { animation-delay: 0.6s; }
.hero-visual { animation: fadeInRight 0.9s 0.3s ease both; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
