#game-screen {
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 2rem;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #1e2430 0%, #0d0f14 55%, #080a0c 100%);
  color: #eee;
}

.game-viewport {
  width: 100%;
  max-width: calc(1024px + 24px);
  display: flex;
  justify-content: center;
}

.game-shell {
  position: relative;
  padding: 10px;
  border-radius: 6px;
  background: linear-gradient(145deg, #2a2038 0%, #120a18 50%, #1a1220 100%);
  box-shadow:
    0 0 0 3px #f8d868,
    0 0 0 6px #1a1018,
    0 16px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.35s ease, filter 0.35s ease;
}

.game-shell[data-world="1"] {
  box-shadow:
    0 0 0 3px #6ec0ff,
    0 0 0 6px #102030,
    0 16px 40px rgba(0, 40, 80, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.game-shell[data-world="2"] {
  box-shadow:
    0 0 0 3px #b898f8,
    0 0 0 6px #0c0818,
    0 16px 40px rgba(40, 20, 80, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-shell[data-world="3"] {
  box-shadow:
    0 0 0 3px #f8a848,
    0 0 0 6px #201008,
    0 16px 40px rgba(80, 40, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#game-canvas {
  display: block;
  width: min(100vw - 2rem, 1024px);
  height: auto;
  image-rendering: auto;
  border: 3px solid #0a060c;
  background: #000;
  vertical-align: top;
}

.hud-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 12px 16px 10px;
  pointer-events: none;
  font-family: "DM Sans", system-ui, sans-serif;
  background: linear-gradient(
    180deg,
    rgba(8, 10, 16, 0.82) 0%,
    rgba(8, 10, 16, 0.45) 70%,
    transparent 100%
  );
  border-radius: 4px 4px 0 0;
}

.hud-overlay__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem 1.25rem;
  align-items: start;
  max-width: 100%;
}

.hud-overlay__cell--left {
  text-align: left;
}

.hud-overlay__cell--center {
  text-align: center;
}

.hud-overlay__cell--right {
  text-align: right;
}

.hud-overlay__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.hud-overlay__label--coins {
  margin-top: 6px;
  font-size: 0.55rem;
}

.hud-overlay__name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.hud-overlay__score {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffd866;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  margin-top: 2px;
}

.hud-overlay__lives {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a8d4ff;
  margin-top: 4px;
}

.hud-overlay__world {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

.hud-overlay__coins {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffe08a;
  font-variant-numeric: tabular-nums;
}

.hud-overlay__time {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ff9a6b;
  margin-top: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.hud-overlay__label--gems {
  margin-top: 8px;
}

.hud-overlay__gems {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #4cffaa;
  margin-top: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.03em;
}

.game-help {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  max-width: 40rem;
  margin: 0.75rem 0 1rem;
  color: rgba(255, 255, 255, 0.55);
}

#btn-quit {
  min-width: auto;
  font-size: 0.45rem;
  padding: 0.65rem 1.2rem;
}
