:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #020617, #2563eb);
  color: #f8fafc;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.game-shell {
  width: min(94vw, 840px);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.38);
}

.hud,
.sub-hud {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.sub-hud {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.game-area {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(to bottom, #38bdf8 0%, #0f172a 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.basket,
.catcher,
.launcher,
.projectile {
  position: absolute;
}

.basket {
  bottom: 16px;
  width: 130px;
  height: 30px;
  background: linear-gradient(180deg, #f59e0b, #b45309);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.basket::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: -8px;
  height: 12px;
  background: #fb923c;
  border-radius: 999px;
}

.catcher {
  right: 24px;
  top: 120px;
  width: 96px;
  height: 70px;
  border-radius: 16px;
  background: linear-gradient(180deg, #22c55e, #15803d);
  box-shadow: 0 10px 30px rgba(21, 128, 61, 0.35);
}

.catcher::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
}

.launcher {
  left: 22px;
  top: 180px;
  width: 70px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e2e8f0, #64748b);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.25);
}

.projectile {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7ed 0%, #f97316 70%);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

.ball {
  position: absolute;
  border-radius: 50%;
  box-shadow: inset -4px -4px 8px rgba(255, 255, 255, 0.3);
}

.pull-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  width: min(78%, 360px);
  height: 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.pull-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #facc15, #fb923c);
}

.pull-handle {
  position: absolute;
  top: -4px;
  left: 0;
  width: 24px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.3);
  backdrop-filter: blur(3px);
}

.hidden {
  display: none !important;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  background: #facc15;
  color: #111827;
}

button:hover {
  transform: translateY(-1px);
}

.controls p {
  margin: 0;
  color: #cbd5e1;
}
