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

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

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

@keyframes float {
  0%, 100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(30px, -30px);
  }
  66% {
    transform: translate(-20px, 20px);
  }
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes gridMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(80px);
  }
}

@keyframes gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes float-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(120px) scale(0.5);
  }
}

.animate-scale-in {
  animation: scaleIn 1s ease-out;
}

.animate-fade-in {
  animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-up {
  animation: fadeInUp 1s ease-out 0.5s backwards;
}

.animate-fade-in-up-delayed {
  animation: fadeInUp 1s ease-out 0.7s backwards;
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 8s ease-in-out 2s infinite;
}

.animate-float-slow {
  animation: float 10s ease-in-out 4s infinite;
}

.animate-loading {
  animation: loading 2s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

/* Court Filling Animation Keyframes - Slower 8 second cycle */
@keyframes pulse-ring {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
  }
}

/* Search Glow Animation - simulates active searching */
@keyframes search-glow {
  0% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.1), 0 0 10px rgba(59, 130, 246, 0.05);
  }
  25% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.9), 0 0 100px rgba(59, 130, 246, 0.6), 0 0 150px rgba(59, 130, 246, 0.4);
  }
  75% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.2);
  }
  100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.1), 0 0 10px rgba(59, 130, 246, 0.05);
  }
}

/* Section Pulse Animation */
@keyframes section-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), 0 0 40px rgba(59, 130, 246, 0.1);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.8), 0 0 100px rgba(59, 130, 246, 0.5), inset 0 0 40px rgba(59, 130, 246, 0.2);
  }
}

/* Player 1 - joins at 25% of cycle (2s out of 8s) */
@keyframes player-joins {
  0%, 23% {
    opacity: 0;
    transform: translate(60px, -60px) scale(0.5);
  }
  27% {
    opacity: 1;
    transform: translate(45px, -45px) scale(0.7);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

/* Player 2 - joins at 40% of cycle (3.2s out of 8s) */
@keyframes player-joins-2 {
  0%, 38% {
    opacity: 0;
    transform: translate(60px, 60px) scale(0.5);
  }
  42% {
    opacity: 1;
    transform: translate(45px, 45px) scale(0.7);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

/* Player 3 - joins at 55% of cycle (4.4s out of 8s) */
@keyframes player-joins-3 {
  0%, 53% {
    opacity: 0;
    transform: translate(-60px, 60px) scale(0.5);
  }
  57% {
    opacity: 1;
    transform: translate(-45px, 45px) scale(0.7);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes notification-float {
  0% {
    top: -50px;
    opacity: 1;
  }
  100% {
    top: 150px;
    opacity: 0;
  }
}

@keyframes notification-float-left {
  0% {
    left: -50px;
    opacity: 1;
  }
  100% {
    left: 150px;
    opacity: 0;
  }
}

@keyframes completion-show {
  0%, 85% {
    opacity: 0;
  }
  95% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }

@keyframes notification-float {
  0% {
    top: -50px;
    opacity: 1;
  }
  100% {
    top: 150px;
    opacity: 0;
  }
}

@keyframes notification-float-left {
  0% {
    left: -50px;
    opacity: 1;
  }
  100% {
    left: 150px;
    opacity: 0;
  }
}

@keyframes completion-show {
  0%, 85% {
    opacity: 0;
  }
  95% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

@keyframes vacancy-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.8);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 30px 15px rgba(59, 130, 246, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    transform: scale(1);
  }
}

@keyframes completion-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.vacancy-glow {
  animation: vacancy-glow 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.completion-glow {
  animation: completion-pulse 1.2s ease-out;
}
