/* Progress bar animation */
.progress-fill {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #f97316;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Subtle background glow */
body {
  background-image: radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.04) 0%, transparent 50%);
}

/* Player list fade in */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.player-item {
  animation: fadeInUp 0.3s ease forwards;
}

/* Court dots */
.court-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
  transform: translate(-50%, -50%) scale(0);
  animation: dotPop 0.4s ease forwards;
}
@keyframes dotPop {
  0% { transform: translate(-50%, -50%) scale(0); }
  60% { transform: translate(-50%, -50%) scale(1.3); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Countdown pulse on seconds */
#cd-secs {
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Toast notification — bottom center on mobile */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
  z-index: 50;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-success { background-color: rgba(22, 163, 74, 0.9); }
.toast-error { background-color: rgba(220, 38, 38, 0.9); }

/* Input focus glow */
input:focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Tap highlight for buttons */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent zoom on iOS when focusing inputs */
@supports (-webkit-touch-callout: none) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}
