/* ===== BINGO BATTLE ROYALE - ENHANCED ANIMATIONS CSS ===== */
/* Premium mobile-game quality animations with theme support */

/* ==========================================
   CSS VARIABLES - Theme Defaults
   ========================================== */

:root {
  /* Colors - Defaults (overridden by theme) */
  --color-primary: #d6b25e;
  --color-primary-dark: #b8962f;
  --color-primary-light: #f0d080;
  --color-secondary: #3366ff;
  --color-accent: #ff4444;
  --color-bg-primary: #0d0d15;
  --color-bg-secondary: #1a1a2e;
  --color-bg-card: rgba(30, 30, 50, 0.95);
  --color-text-primary: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-text-gold: #d6b25e;
  --color-team-red: #ff4444;
  --color-team-white: #f0f0f0;
  --color-team-blue: #4488ff;
  --color-success: #44ff88;
  --color-warning: #ffbb44;
  --color-danger: #ff4444;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #d6b25e, #b8962f);
  --gradient-background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d15 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 35, 0.98));
  --gradient-gold-shine: linear-gradient(90deg, #d6b25e, #f0d080, #d6b25e);
  
  /* Shadows */
  --shadow-glow: 0 0 30px rgba(214, 178, 94, 0.4);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-button: 0 4px 20px rgba(214, 178, 94, 0.4);
  
  /* Fonts */
  --font-heading: 'Russo One', 'Impact', sans-serif;
  --font-body: 'Segoe UI', 'Roboto', sans-serif;
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  
  /* Ball Colors */
  --ball-B: #3366ff;
  --ball-I: #ff4444;
  --ball-N: #d6b25e;
  --ball-G: #44bb44;
  --ball-O: #ff8844;
  
  /* Effects */
  --effect-sparkle: #d6b25e;
  --effect-glow: rgba(214, 178, 94, 0.6);
  --effect-elimination: #ff4444;
}

/* ==========================================
   VICTORY OVERLAY
   ========================================== */

.victory-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: victoryFadeIn 0.5s ease-out;
  overflow: hidden;
}

.victory-overlay.fade-out {
  animation: victoryFadeOut 0.5s ease-in forwards;
}

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

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

/* Spotlight effects */
.victory-spotlight {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(214, 178, 94, 0.1) 10deg,
    transparent 20deg
  );
  background: conic-gradient(
    from 0deg,
    transparent,
    var(--color-primary) 5deg,
    transparent 10deg,
    transparent 20deg,
    var(--color-primary) 25deg,
    transparent 30deg,
    transparent 40deg,
    var(--color-primary) 45deg,
    transparent 50deg
  );
  opacity: 0.2;
  animation: spotlightRotate 10s linear infinite;
}

.victory-spotlight.spotlight-2 {
  animation-direction: reverse;
  animation-duration: 15s;
  opacity: 0.15;
}

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

/* Victory rays */
.victory-rays {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 5deg,
    rgba(255, 255, 255, 0.03) 5deg 10deg
  );
  animation: raysRotate 20s linear infinite;
}

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

/* Victory content */
.victory-content {
  position: relative;
  text-align: center;
  z-index: 10;
}

.victory-crown {
  font-size: 80px;
  animation: crownBounce 1s ease-in-out infinite;
  filter: drop-shadow(0 0 20px gold);
}

@keyframes crownBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.1); }
}

.victory-banner {
  position: relative;
  margin: 20px 0;
}

.banner-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse, var(--effect-glow), transparent 70%);
  animation: bannerGlow 2s ease-in-out infinite;
}

@keyframes bannerGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.victory-title {
  font-family: var(--font-display);
  font-size: clamp(60px, 15vw, 120px);
  color: var(--color-primary);
  text-shadow: 
    0 0 20px var(--color-primary),
    0 0 40px var(--color-primary),
    0 4px 0 var(--color-primary-dark),
    0 8px 0 rgba(0,0,0,0.3);
  letter-spacing: 10px;
  animation: victoryTitlePulse 0.5s ease-out, victoryTitleGlow 2s ease-in-out infinite 0.5s;
  margin: 0;
}

@keyframes victoryTitlePulse {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes victoryTitleGlow {
  0%, 100% { text-shadow: 0 0 20px var(--color-primary), 0 0 40px var(--color-primary), 0 4px 0 var(--color-primary-dark); }
  50% { text-shadow: 0 0 40px var(--color-primary), 0 0 80px var(--color-primary), 0 4px 0 var(--color-primary-dark); }
}

.victory-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(24px, 5vw, 40px);
  color: #fff;
  letter-spacing: 15px;
  text-transform: uppercase;
  margin-top: -10px;
  animation: subtitleSlide 0.6s ease-out 0.3s both;
}

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

.winner-name-container {
  position: relative;
  margin: 30px 0;
}

.winner-name-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse, var(--color-secondary), transparent 70%);
  opacity: 0.3;
  animation: nameGlow 2s ease-in-out infinite;
}

@keyframes nameGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

.winner-name {
  font-family: var(--font-heading);
  font-size: clamp(36px, 8vw, 64px);
  color: #fff;
  text-shadow: 0 0 30px var(--color-secondary);
  margin: 0;
  animation: nameAppear 0.5s ease-out 0.5s both;
}

@keyframes nameAppear {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.winner-card {
  font-family: var(--font-body);
  font-size: 24px;
  color: var(--color-text-secondary);
  margin-top: 10px;
  animation: cardAppear 0.4s ease-out 0.7s both;
}

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

.victory-tagline {
  font-family: var(--font-accent, 'Pacifico', cursive);
  font-size: clamp(20px, 4vw, 32px);
  color: var(--color-primary);
  font-style: italic;
  margin-top: 30px;
  animation: taglineAppear 0.5s ease-out 0.9s both;
}

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

.trophy-bounce {
  font-size: 60px;
  margin-top: 20px;
  animation: trophyBounce 0.6s ease infinite;
  filter: drop-shadow(0 0 15px gold);
}

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

/* ==========================================
   CONFETTI SYSTEM
   ========================================== */

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 15px;
  height: 15px;
  animation: confettiFall linear forwards;
}

.confetti-piece.square {
  border-radius: 2px;
}

.confetti-piece.circle {
  border-radius: 50%;
}

.confetti-piece.triangle {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 15px solid currentColor;
  background: none !important;
}

.confetti-piece.star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* ==========================================
   FIREWORKS SYSTEM
   ========================================== */

.firework-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.firework {
  position: absolute;
  width: 10px;
  height: 10px;
}

.firework-particle {
  position: absolute;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  transform-origin: center bottom;
  animation: fireworkExplode 1.5s ease-out forwards;
}

@keyframes fireworkExplode {
  0% {
    transform: rotate(var(--angle, 0deg)) translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotate(var(--angle, 0deg)) translateY(-100px) scale(0);
    opacity: 0;
  }
}

/* ==========================================
   ELIMINATION EFFECTS
   ========================================== */

/* Shatter effect */
.elimination-overlay {
  pointer-events: none;
}

.shatter-piece {
  position: absolute;
  animation: shatterFly 1s ease-out forwards;
  opacity: 0.9;
}

@keyframes shatterFly {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--fly-x, 50px), var(--fly-y, 50px)) rotate(var(--fly-rotate, 360deg)) scale(0);
    opacity: 0;
  }
}

.elimination-flash {
  animation: elimFlash 0.3s ease-out;
}

@keyframes elimFlash {
  0% { filter: brightness(1); }
  50% { filter: brightness(3) saturate(0); }
  100% { filter: brightness(1); }
}

/* Rip effect */
.elimination-rip {
  animation: ripShake 0.5s ease-in-out;
}

@keyframes ripShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px) rotate(-2deg); }
  40% { transform: translateX(10px) rotate(2deg); }
  60% { transform: translateX(-5px) rotate(-1deg); }
  80% { transform: translateX(5px) rotate(1deg); }
}

.rip-effect-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 100;
}

.rip-left, .rip-right {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: inherit;
  animation: ripApart 1s ease-in-out forwards;
}

.rip-left {
  left: 0;
  transform-origin: right center;
  animation-name: ripLeft;
}

.rip-right {
  right: 0;
  transform-origin: left center;
  animation-name: ripRight;
}

@keyframes ripLeft {
  0% { transform: translateX(0) rotate(0); }
  100% { transform: translateX(-100%) rotate(-30deg); opacity: 0; }
}

@keyframes ripRight {
  0% { transform: translateX(0) rotate(0); }
  100% { transform: translateX(100%) rotate(30deg); opacity: 0; }
}

/* Glow out effect */
.elimination-glow-out {
  animation: glowOutPulse 1.5s ease-out forwards;
}

@keyframes glowOutPulse {
  0% { 
    filter: brightness(1);
    transform: scale(1);
  }
  30% { 
    filter: brightness(2) saturate(2);
    transform: scale(1.05);
  }
  100% { 
    filter: brightness(0) saturate(0);
    transform: scale(0.9);
    opacity: 0.5;
  }
}

.glow-out-ring {
  position: absolute;
  inset: -20px;
  border: 3px solid var(--effect-elimination);
  border-radius: 10px;
  animation: glowRingExpand 1s ease-out forwards;
}

@keyframes glowRingExpand {
  0% { 
    transform: scale(0.8);
    opacity: 1;
  }
  100% { 
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Elimination banner */
.elimination-banner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  animation: elimBannerAppear 0.3s ease-out;
}

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

.elim-icon {
  font-size: 48px;
  animation: elimIconPulse 0.5s ease-in-out infinite;
}

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

.elim-text {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--color-danger);
  text-shadow: 0 0 20px var(--color-danger);
  letter-spacing: 3px;
}

/* Row elimination */
.row-eliminated {
  animation: rowElimStrike 0.5s ease-out forwards;
}

@keyframes rowElimStrike {
  0% { background: inherit; }
  50% { background: var(--color-danger); }
  100% { background: rgba(255, 68, 68, 0.3); }
}

.row-x-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--color-danger);
  animation: xMarkAppear 0.3s ease-out;
}

@keyframes xMarkAppear {
  from { transform: scale(0) rotate(-180deg); }
  to { transform: scale(1) rotate(0deg); }
}

/* ==========================================
   SPIN MOMENT OVERLAY
   ========================================== */

.spin-moment-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spinMomentIn 0.3s ease-out;
}

.spin-moment-overlay.fade-out {
  animation: spinMomentOut 0.5s ease-in forwards;
}

@keyframes spinMomentIn {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1); }
}

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

.spin-moment-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%);
}

.spin-moment-content {
  position: relative;
  text-align: center;
  z-index: 10;
}

.spin-icon-container {
  position: relative;
  display: inline-block;
  width: 150px;
  height: 150px;
  margin: 20px 0;
}

.spin-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--color-primary);
  border-radius: 50%;
  border-top-color: transparent;
  border-right-color: transparent;
}

.spin-ring.ring-1 {
  animation: spinRing 1s linear infinite;
}

.spin-ring.ring-2 {
  inset: 15px;
  border-color: var(--color-secondary);
  border-top-color: transparent;
  border-right-color: transparent;
  animation: spinRing 0.8s linear infinite reverse;
}

.spin-ring.ring-3 {
  inset: 30px;
  border-color: var(--color-accent);
  border-top-color: transparent;
  border-right-color: transparent;
  animation: spinRing 0.6s linear infinite;
}

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

.spin-icon {
  position: absolute;
  inset: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  animation: spinIconPulse 0.5s ease-in-out infinite;
}

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

.spin-lightning {
  position: absolute;
  font-size: 60px;
  top: 50%;
  transform: translateY(-50%);
  animation: lightningFlash 0.3s ease-in-out infinite;
}

.spin-lightning.left {
  left: -100px;
}

.spin-lightning.right {
  right: -100px;
  transform: translateY(-50%) scaleX(-1);
}

@keyframes lightningFlash {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.5; filter: brightness(2); }
}

.spin-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 80px);
  color: var(--color-primary);
  text-shadow: 0 0 30px var(--color-primary);
  letter-spacing: 10px;
  margin: 20px 0 10px;
  animation: spinTitlePulse 1s ease-in-out infinite;
}

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

.spin-subtitle {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--color-text-secondary);
}

/* ==========================================
   HALFTIME OVERLAY
   ========================================== */

.halftime-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: halftimeIn 0.5s ease-out;
}

.halftime-overlay.fade-out {
  animation: halftimeOut 0.5s ease-in forwards;
}

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

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

.halftime-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, var(--color-team-red) 0%, transparent 30%),
    radial-gradient(circle at 80% 70%, var(--color-team-blue) 0%, transparent 30%),
    var(--color-bg-primary);
  opacity: 0.3;
}

.halftime-content {
  position: relative;
  text-align: center;
  z-index: 10;
}

.halftime-icon {
  font-size: 80px;
  animation: halftimeIconPulse 1s ease-in-out infinite;
}

@keyframes halftimeIconPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-10deg); }
  75% { transform: scale(1.1) rotate(10deg); }
}

.halftime-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 12vw, 100px);
  color: var(--color-primary);
  text-shadow: 0 0 30px var(--color-primary);
  letter-spacing: 15px;
  margin: 20px 0;
  animation: halftimeTitleIn 0.5s ease-out 0.2s both;
}

@keyframes halftimeTitleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.halftime-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.halftime-divider span {
  height: 2px;
  width: 100px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.divider-icon {
  font-size: 30px;
  animation: dividerPulse 1s ease-in-out infinite;
}

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

.halftime-message {
  font-family: var(--font-heading);
  font-size: 28px;
  color: #fff;
  margin: 10px 0;
}

.halftime-sub {
  font-family: var(--font-body);
  font-size: 22px;
  color: var(--color-success);
}

.halftime-corners {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 40px;
  animation: cornersAppear 0.5s ease-out 0.5s both;
}

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

.halftime-corners span {
  animation: cornerBounce 0.5s ease-in-out infinite;
}

.halftime-corners span:nth-child(1) { animation-delay: 0s; }
.halftime-corners span:nth-child(2) { animation-delay: 0.1s; }
.halftime-corners span:nth-child(3) { animation-delay: 0.2s; }
.halftime-corners span:nth-child(4) { animation-delay: 0.3s; }

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

/* ==========================================
   BALL CALL OVERLAY
   ========================================== */

.ball-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: ballCallIn 0.3s ease-out;
}

.ball-call-overlay.fade-out {
  animation: ballCallOut 0.4s ease-in forwards;
}

@keyframes ballCallIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ballCallOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.5); }
}

.ball-call-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.ball-call-glow {
  position: absolute;
  inset: -50px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  animation: ballGlowPulse 0.5s ease-in-out infinite;
}

@keyframes ballGlowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.ball-call-ring {
  position: absolute;
  inset: -20px;
  border: 4px solid;
  border-radius: 50%;
  animation: ballRingExpand 1.5s ease-out infinite;
}

@keyframes ballRingExpand {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ball-call-ball {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset -10px -10px 30px rgba(0,0,0,0.3),
    0 10px 30px rgba(0,0,0,0.5);
  animation: ballBounce 0.5s ease-out;
}

@keyframes ballBounce {
  0% { transform: translateY(-100px) scale(0.5); }
  60% { transform: translateY(10px) scale(1.1); }
  80% { transform: translateY(-5px) scale(0.95); }
  100% { transform: translateY(0) scale(1); }
}

.ball-letter {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  line-height: 1;
}

.ball-number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  line-height: 1;
}

/* ==========================================
   BALL SLIDE ANIMATION (Restored classic)
   ========================================== */

.ball-slide-overlay {
  position: fixed;
  top: 50%;
  left: -200px;
  transform: translateY(-50%);
  z-index: 99999;
  pointer-events: none;
  transition: none;
}

.ball-slide-overlay.sliding {
  animation: ballSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ball-slide-overlay.fade-out {
  animation: ballSlideOut 0.4s ease-in forwards;
}

@keyframes ballSlideIn {
  0% { 
    left: -200px; 
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% { 
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

@keyframes ballSlideOut {
  0% { 
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
  }
  100% { 
    left: calc(100% + 200px);
    transform: translate(0, -50%);
    opacity: 0;
  }
}

.ball-slide-container {
  position: relative;
}

.ball-slide-ball {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset -15px -15px 40px rgba(0,0,0,0.4),
    inset 10px 10px 20px rgba(255,255,255,0.2),
    0 15px 50px rgba(0,0,0,0.6),
    0 0 80px rgba(214, 178, 94, 0.4);
  animation: ballPulseGlow 1s ease-in-out infinite;
}

@keyframes ballPulseGlow {
  0%, 100% { box-shadow: 
    inset -15px -15px 40px rgba(0,0,0,0.4),
    inset 10px 10px 20px rgba(255,255,255,0.2),
    0 15px 50px rgba(0,0,0,0.6),
    0 0 80px rgba(214, 178, 94, 0.4);
  }
  50% { box-shadow: 
    inset -15px -15px 40px rgba(0,0,0,0.4),
    inset 10px 10px 20px rgba(255,255,255,0.2),
    0 15px 50px rgba(0,0,0,0.6),
    0 0 120px rgba(214, 178, 94, 0.6);
  }
}

.ball-slide-letter {
  font-family: var(--font-display), 'Impact', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 3px 6px rgba(0,0,0,0.4);
  line-height: 1;
}

.ball-slide-number {
  font-family: var(--font-display), 'Impact', sans-serif;
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 3px 6px rgba(0,0,0,0.4);
  line-height: 1;
  margin-top: -4px;
}

/* ==========================================
   CRY WOLF OVERLAY
   ========================================== */

.cry-wolf-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(20, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cryWolfIn 0.3s ease-out;
}

.cry-wolf-overlay.fade-out {
  animation: cryWolfOut 0.5s ease-in forwards;
}

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

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

.cry-wolf-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.2) 0%, transparent 70%);
  animation: cryWolfBgPulse 0.5s ease-in-out infinite;
}

@keyframes cryWolfBgPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.cry-wolf-content {
  position: relative;
  text-align: center;
  z-index: 10;
}

.wolf-icon {
  font-size: 100px;
  animation: wolfHowl 1s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 100, 100, 0.5));
}

@keyframes wolfHowl {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  75% { transform: scale(1.1) rotate(5deg); }
}

.cry-wolf-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 12vw, 90px);
  color: #ff4444;
  text-shadow: 0 0 30px #ff4444, 0 0 60px #ff0000;
  letter-spacing: 10px;
  margin: 20px 0;
  animation: cryWolfShake 0.3s ease-in-out infinite;
}

@keyframes cryWolfShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.cry-wolf-banner {
  font-family: var(--font-heading);
  font-size: 32px;
  color: #fff;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.3), transparent);
  padding: 10px 40px;
  margin: 10px 0;
}

.cry-wolf-player {
  font-family: var(--font-heading);
  font-size: 28px;
  color: #fff;
  margin: 20px 0 5px;
}

.cry-wolf-card {
  font-family: var(--font-body);
  font-size: 20px;
  color: #ff8888;
}

.cry-wolf-effect {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  font-size: 40px;
}

.cry-wolf-effect span {
  animation: xPulse 0.5s ease-in-out infinite;
}

.cry-wolf-effect span:nth-child(1) { animation-delay: 0s; }
.cry-wolf-effect span:nth-child(2) { animation-delay: 0.1s; }
.cry-wolf-effect span:nth-child(3) { animation-delay: 0.2s; }

@keyframes xPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

/* ==========================================
   BATTLE EFFECT TOAST
   ========================================== */

.battle-effect-toast {
  position: fixed;
  top: 100px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--gradient-card);
  border: var(--border-card);
  border-radius: 15px;
  padding: 15px 25px;
  box-shadow: var(--shadow-card);
  z-index: 99990;
  animation: toastSlideIn 0.5s ease-out;
}

.battle-effect-toast.slide-out {
  animation: toastSlideOut 0.5s ease-in forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.effect-toast-icon {
  font-size: 40px;
  animation: toastIconPulse 1s ease-in-out infinite;
}

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

.effect-toast-name {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-primary);
}

.effect-toast-team {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: bold;
}

/* ==========================================
   UTILITY ANIMATIONS
   ========================================== */

.anim-pulse {
  animation: utilPulse 0.6s ease-out;
}

@keyframes utilPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 var(--pulse-color, var(--color-primary)); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 15px transparent; }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}

.anim-shake {
  animation: utilShake 0.5s ease-in-out;
}

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

.anim-bounce {
  animation: utilBounce 0.6s ease-out;
}

@keyframes utilBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  50% { transform: scale(0.9); }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.anim-glow {
  animation: utilGlow 1s ease-in-out;
}

@keyframes utilGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--glow-color, var(--effect-glow)); }
  50% { box-shadow: 0 0 30px 10px var(--glow-color, var(--effect-glow)); }
}

.anim-pop-in {
  animation: utilPopIn 0.4s ease-out;
}

@keyframes utilPopIn {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.anim-slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

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

.anim-slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

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

.anim-slide-in-up {
  animation: slideInUp 0.5s ease-out;
}

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

.anim-slide-in-down {
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================
   THEME-SPECIFIC ADJUSTMENTS
   ========================================== */

/* Halloween theme particles */
.theme-halloween .confetti-piece {
  box-shadow: 0 0 10px currentColor;
}

/* Christmas theme - add snow effect */
.theme-christmas .victory-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle, #fff 1px, transparent 1px),
    radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 50px 50px, 30px 30px;
  background-position: 0 0, 25px 25px;
  animation: snowFall 10s linear infinite;
  opacity: 0.3;
}

@keyframes snowFall {
  from { background-position: 0 0, 25px 25px; }
  to { background-position: 0 100vh, 25px calc(100vh + 25px); }
}

/* Neon theme extra glow */
.theme-neonRave .victory-title,
.theme-neonRave .spin-title,
.theme-neonRave .halftime-title {
  animation: neonFlicker 2s ease-in-out infinite;
}

@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  95% { opacity: 0.9; }
  96% { opacity: 1; }
}

/* Summer theme wave effect */
.theme-summer .victory-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(transparent, rgba(0, 204, 204, 0.2));
  animation: waveMotion 3s ease-in-out infinite;
}

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

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
  .victory-crown { font-size: 60px; }
  .trophy-bounce { font-size: 40px; }
  .wolf-icon { font-size: 70px; }
  .halftime-icon { font-size: 60px; }
  .spin-icon-container { width: 100px; height: 100px; }
  .spin-icon { font-size: 35px; inset: 30px; }
  .spin-lightning { display: none; }
  .ball-call-container { width: 150px; height: 150px; }
  .ball-letter { font-size: 28px; }
  .ball-number { font-size: 42px; }
}

@media (max-width: 480px) {
  .battle-effect-toast {
    right: 10px;
    left: 10px;
    padding: 10px 15px;
  }
  
  .effect-toast-icon { font-size: 30px; }
  .effect-toast-name { font-size: 14px; }
}
