* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #14161c;
  color: #f5f5f5;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

h2 {
  font-size: 1rem;
  font-weight: 400;
  color: #9aa0ae;
}

.spinner {
  width: 48px;
  height: 48px;
  margin-top: 1rem;
  border: 5px solid #2c303b;
  border-top-color: #ff7a1a;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.court {
  position: relative;
  width: 100px;
  height: 160px;
  margin-top: 1.5rem;
}

.basketball {
  position: absolute;
  top: 0;
  left: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ff9a4d, #e2620f 70%);
  border: 2px solid #3a1a05;
  overflow: hidden;
  animation: bounce 0.9s cubic-bezier(0.3, 0, 0.7, 1) infinite;
}

/* basketball seam lines */
.basketball::before,
.basketball::after {
  content: "";
  position: absolute;
  background: #3a1a05;
}

.basketball::before {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  margin-left: -1px;
}

.basketball::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  margin-top: -1px;
}

.shadow {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60px;
  height: 10px;
  margin-left: -30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  animation: shadow 0.9s cubic-bezier(0.3, 0, 0.7, 1) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { top: 0; transform: scale(1, 1); animation-timing-function: cubic-bezier(0.3, 0, 0.7, 1); }
  50%      { top: 90px; }
  55%      { top: 100px; transform: scale(1.1, 0.9); }
  60%      { top: 90px; transform: scale(1, 1); }
}

@keyframes shadow {
  0%, 100% { transform: scale(0.5); opacity: 0.3; }
  55%      { transform: scale(1); opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner, .basketball, .shadow {
    animation-duration: 3s;
  }
}
