:root {
  --bg-top: #08111f;
  --bg-bottom: #02050d;
  --panel: rgba(7, 13, 25, 0.85);
  --panel-border: rgba(142, 190, 255, 0.2);
  --text: #eaf4ff;
  --accent: #71f0c2;
  --danger: #ff7c7c;
  --glow: rgba(113, 240, 194, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(68, 129, 235, 0.2), transparent 35%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 35%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1px),
    radial-gradient(circle at 55% 80%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 32% 60%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px);
  background-size: 220px 220px, 280px 280px, 340px 340px, 180px 180px;
  opacity: 0.7;
}

.game-shell {
  width: min(100%, 780px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(8, 14, 30, 0.92), rgba(4, 8, 18, 0.94));
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(78, 134, 220, 0.12);
  backdrop-filter: blur(10px);
}

.hud,
.controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hud {
  margin-bottom: 16px;
}

.hud div,
.controls p {
  margin: 0;
  flex: 1;
}

.label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(234, 244, 255, 0.7);
}

#game {
  display: block;
  flex: 1;
  min-height: 0;
  width: auto;
  max-width: 100%;
  aspect-ratio: 720 / 840;
  align-self: center;
  border: 1px solid rgba(113, 240, 194, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(7, 14, 28, 0.9), rgba(3, 6, 14, 0.95)),
    radial-gradient(circle at top, rgba(48, 80, 150, 0.22), transparent 45%);
  box-shadow:
    inset 0 0 30px rgba(113, 240, 194, 0.05),
    0 0 30px rgba(113, 240, 194, 0.08);
}

.controls {
  margin-top: 14px;
  color: rgba(234, 244, 255, 0.78);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .game-shell {
    max-height: calc(100vh - 24px);
    padding: 14px;
    border-radius: 18px;
  }

  .hud,
  .controls {
    flex-direction: column;
  }
}
