/* ============================================================
   LUX2PLAY — ANIMATIONS STYLESHEET
   ============================================================ */

/* ===== KEYFRAMES ===== */

@keyframes ageGateIn {
  0% { opacity: 0; transform: scale(0.7) translateY(40px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes under18SlideIn {
  0% { opacity: 0; transform: scale(0.92) translateY(16px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.age-gate-box.under18-mode {
  animation: under18SlideIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  border-color: rgba(255, 68, 68, 0.4) !important;
  box-shadow:
    0 0 60px rgba(255, 68, 68, 0.18),
    0 0 120px rgba(255, 68, 68, 0.06),
    inset 0 1px 0 rgba(255, 68, 68, 0.12) !important;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.5); }
  50% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); }
}

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3), 0 0 0 0 rgba(255, 215, 0, 0.2); }
  50% { box-shadow: 0 8px 40px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.2); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

@keyframes slotPreviewSpin {
  0% { transform: translateY(0) rotateX(0deg); opacity: 1; }
  20% { transform: translateY(-6px) rotateX(-15deg); opacity: 0.8; }
  40% { transform: translateY(-12px) rotateX(-30deg); opacity: 0.4; }
  60% { transform: translateY(12px) rotateX(30deg); opacity: 0.4; }
  80% { transform: translateY(6px) rotateX(15deg); opacity: 0.8; }
  100% { transform: translateY(0) rotateX(0deg); opacity: 1; }
}

@keyframes cardFlip {
  0%, 60%, 100% { transform: rotateY(0deg); }
  30% { transform: rotateY(90deg); opacity: 0; }
  31% { transform: rotateY(-90deg); opacity: 0; }
  50% { transform: rotateY(0deg); opacity: 1; }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes spinReel {
  0% { transform: translateY(0); }
  100% { transform: translateY(-300px); }
}

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

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes winPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 20px rgba(255, 215, 0, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

@keyframes loseShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@keyframes coinBurst {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

@keyframes cardDeal {
  0% { transform: translateY(-100px) rotateZ(-10deg); opacity: 0; }
  100% { transform: translateY(0) rotateZ(0deg); opacity: 1; }
}

@keyframes reelSpin {
  0% { top: 0%; }
  100% { top: -900%; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.7), 0 0 80px rgba(255, 140, 0, 0.3); }
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

@keyframes progressBar {
  from { width: 0%; }
  to { width: 100%; }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes rotateGold {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 10px rgba(255,215,0,0.6), 0 0 20px rgba(255,215,0,0.4), 0 0 40px rgba(255,215,0,0.2);
    opacity: 1;
  }
  20%, 24%, 55% {
    text-shadow: none;
    opacity: 0.8;
  }
}

/* ===== SLOT MACHINE ANIMATIONS ===== */

.slot-reel-wrapper {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.slot-reel-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transition: top 0.4s cubic-bezier(0.17, 0.67, 0.35, 1);
}

.slot-reel-inner.spinning {
  animation: reelFastSpin 0.15s linear infinite;
}

@keyframes reelFastSpin {
  0% { top: 0; }
  100% { top: -100%; }
}

/* Win animation classes */
.win-animation {
  animation: winPulse 0.8s ease-in-out;
}

.lose-animation {
  animation: loseShake 0.5s ease-in-out;
}

.card-deal-animation {
  animation: cardDeal 0.4s ease-out both;
}

.coin-burst {
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255,215,0,0.9) 0%, rgba(255,140,0,0.5) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: coinBurst 0.8s ease-out forwards;
}

/* Floating casino elements in hero */
.hero-float-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.float-card {
  position: absolute;
  font-size: 3rem;
  opacity: 0.06;
  animation: floatSlow linear infinite;
  user-select: none;
}

.float-card:nth-child(1) { top: 15%; left: 8%; animation-duration: 8s; font-size: 2.5rem; }
.float-card:nth-child(2) { top: 60%; left: 5%; animation-duration: 11s; animation-delay: -2s; font-size: 4rem; }
.float-card:nth-child(3) { top: 20%; right: 8%; animation-duration: 9s; animation-delay: -3s; }
.float-card:nth-child(4) { top: 70%; right: 6%; animation-duration: 12s; animation-delay: -5s; font-size: 2rem; }
.float-card:nth-child(5) { top: 40%; left: 15%; animation-duration: 10s; animation-delay: -7s; font-size: 1.8rem; }
.float-card:nth-child(6) { top: 30%; right: 15%; animation-duration: 7s; animation-delay: -1s; font-size: 3.5rem; }

/* Gold shimmer text effect */
.gold-shimmer {
  background: linear-gradient(90deg, #FFD700 0%, #FFF0A0 25%, #FFD700 50%, #FF8C00 75%, #FFD700 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 3s linear infinite;
}

/* Progress bars with animation */
.animated-progress {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.animated-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFD700, #FF8C00);
  border-radius: 3px;
  animation: progressBar 1.5s ease-out both;
}

/* Slot machine glow ring */
.slot-glow-ring {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Bounce in for results */
.bounce-in { animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.fade-in-up { animation: fadeInUp 0.6s ease both; }
.fade-in-left { animation: fadeInLeft 0.6s ease both; }
.fade-in-right { animation: fadeInRight 0.6s ease both; }
.scale-in { animation: scaleIn 0.5s ease both; }

/* Delay helpers */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ===== WIN OVERLAY ===== */
.win-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-overlay-inner {
  text-align: center;
  animation: bounceIn 0.5s ease both;
}

.win-overlay-text {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  background: linear-gradient(135deg, #FFD700, #FFF0A0, #FF8C00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: goldShimmer 1s linear infinite;
  background-size: 200% auto;
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.8));
}

/* ===== RESULT MESSAGES ===== */
.result-message {
  text-align: center;
  padding: 20px;
  border-radius: 16px;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.result-win {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: #00E676;
  animation: winPulse 0.6s ease;
}

.result-lose {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #FF4444;
  animation: loseShake 0.4s ease;
}

.result-neutral {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  color: #FFD700;
}

/* ===== COIN PARTICLES ===== */
.coin-particle {
  position: absolute;
  font-size: 1.5rem;
  pointer-events: none;
  animation: particleFloat linear forwards;
}

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

/* ===== NOTIFICATION TOAST ===== */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 8000;
  background: rgba(13, 10, 30, 0.95);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: fadeInUp 0.3s ease both;
  max-width: 320px;
  backdrop-filter: blur(10px);
}

.toast-notification.toast-win {
  border-color: rgba(0, 230, 118, 0.4);
}

.toast-notification.toast-lose {
  border-color: rgba(255, 68, 68, 0.3);
}

.toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
