:root {
  color-scheme: dark;
  font-family: Inter, Avenir, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #171d31;
  color: #f4f7ff;
}

body {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(0.8rem, env(safe-area-inset-top)) 0.8rem max(1rem, env(safe-area-inset-bottom));
}

.game-shell {
  width: min(100%, 430px);
  display: grid;
  gap: 0.35rem;
  text-align: center;
}

.arena {
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 0.6rem;
  position: relative;
  overflow: hidden;
  min-height: min(74svh, 520px);
}

.sphere-wrap {
  width: min(64vw, 280px);
  max-width: 82vw;
  aspect-ratio: 1;
  cursor: grab;
  position: relative;
  touch-action: none;
  align-self: center;
  margin-top: -8%;
}

.sphere-wrap:active {
  cursor: grabbing;
}

.sphere-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.projectile {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffe4f7 0 18%, #f7a6ff 40%, #b25fff 72%, #693de9 100%);
  border: 2px solid rgba(41, 18, 84, 0.85);
  box-shadow:
    inset -6px -7px 12px rgba(34, 11, 72, 0.46),
    inset 4px 4px 8px rgba(255, 255, 255, 0.32),
    0 6px 0 rgba(23, 11, 54, 0.4),
    0 10px 16px rgba(0, 0, 0, 0.35);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
}

.launch {
  border: 3px solid #13445c;
  border-radius: 999px;
  padding: 0.62rem 2rem;
  min-width: 240px;
  min-height: 40px;
  font-weight: 700;
  font-size: 1rem;
  color: #143246;
  background: #75f6de;
  box-shadow: 0 5px 0 #1f8cb7, 0 10px 18px rgba(23, 69, 155, 0.36);
  touch-action: manipulation;
}

.launch:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #1f8cb7, 0 7px 12px rgba(23, 69, 155, 0.3);
}

@media (max-width: 480px) {
  .arena {
    min-height: 70svh;
  }

  .sphere-wrap {
    width: min(72vw, 250px);
  }
}
