/* iOS-style hero gallery (Supabase storage bucket `gallery`) */
.hero-gallery-root {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 340px;
  background: #000;
  pointer-events: none;
}
.hero-gallery-root.hidden {
  display: none;
}
.hero-gallery-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-gallery-strip {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: max-content;
  will-change: transform;
}
.hero-gallery-strip img {
  height: 100%;
  width: 75vw;
  min-width: 250px;
  object-fit: cover;
  flex-shrink: 0;
  background: #0f0f0f;
}
.hero-gallery-gradient-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: linear-gradient(
    to top,
    #000000 0%,
    rgba(0, 0, 0, 0.85) 35%,
    rgba(0, 0, 0, 0.4) 65%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
}
.hero-gallery-gradient-left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, #000000, transparent);
  pointer-events: none;
}
.hero-gallery-gradient-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to left, #000000, transparent);
  pointer-events: none;
}
#hero-section-inner.hero-with-gallery {
  padding-top: 17.5rem !important;
}

/* 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: #FFFFFF;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 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: #FFFFFF;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
  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 */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  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 — clean white brand line, no glow */
input:focus {
  box-shadow: none !important;
  outline: none !important;
  border-color: #FFFFFF !important;
  border-width: 1.5px !important;
}

/* 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;
}

/* Session card ticket border */
.ticket-border {
  border-left: 4px solid #FFFFFF;
}

/* Countdown bar */
.countdown-bar {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}
.countdown-bar .cd-unit {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.countdown-bar .cd-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.countdown-bar .cd-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666666;
}
.countdown-bar .cd-sep {
  color: #333333;
  font-size: 1.25rem;
  font-weight: 300;
}

/* Player list dividers */
.player-row {
  padding: 0.625rem 0;
  border-bottom: 1px solid #1A1A1A;
}
.player-row:last-child {
  border-bottom: none;
}

/* Hero fluid type */
.hero-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-size: clamp(2.5rem, 10vw, 5.5rem);
  color: #fff;
}
.hero-title .slash {
  color: #FFFFFF;
}

/* Brand wordmark */
.wordmark {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
}

/* Section heading style */
.section-label {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.6875rem;
  color: #666666;
}

/* How it works number */
.step-number {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #FFFFFF;
  line-height: 1;
}

/* Home page polish */
.hero-shell,
.hero-panel,
.quick-card,
.info-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid #1A1A1A;
  border-radius: 1rem;
}

.hero-shell {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
}

.hero-copy,
.hero-panel {
  padding: 0.4rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: #666666;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quick-grid,
.steps-row {
  display: grid;
  gap: 0.85rem;
}

.quick-card,
.info-card {
  padding: 1rem;
}

.quick-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.quick-label {
  margin-top: 0.35rem;
  color: #666666;
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    align-items: stretch;
    padding: 1.35rem;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-card-wide {
    grid-column: span 2;
  }

  .steps-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1.3fr) minmax(22rem, 0.7fr);
    padding: 1.75rem;
    gap: 1.5rem;
  }

  .hero-copy {
    padding: 0.75rem;
  }

  .steps-row {
    gap: 1.25rem;
  }

  .info-card {
    padding: 1.5rem;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  #cd-secs {
    animation: none !important;
    opacity: 1 !important;
  }
}
