* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Courier New", monospace;
  color: #fdf6d8;
  background:
    radial-gradient(circle at top, rgba(255, 198, 109, 0.28), transparent 30%),
    linear-gradient(180deg, #0a1833 0%, #16325c 55%, #224d79 100%);
  display: grid;
  place-items: center;
}

.game-shell {
  width: min(100%, 1040px);
  padding: 20px;
}

.game-header {
  margin-bottom: 12px;
  text-align: center;
}

.game-header h1 {
  margin: 0 0 6px;
  letter-spacing: 4px;
  font-size: clamp(28px, 5vw, 42px);
}

.game-header p {
  margin: 0;
  color: #d9e7ff;
  font-size: 14px;
}

.game-frame {
  position: relative;
  border: 4px solid #f7d66a;
  background: #6dc8f2;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
  pointer-events: none;
}

.hud-item {
  min-width: 132px;
  padding: 8px 10px;
  border: 2px solid #0b1630;
  background: rgba(11, 22, 48, 0.72);
  color: #fff8d6;
  font-size: 18px;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 10, 20, 0.44);
}

.overlay.hidden {
  display: none;
}

.overlay-panel {
  max-width: 560px;
  padding: 22px 24px;
  border: 4px solid #f7d66a;
  background: rgba(15, 27, 56, 0.96);
  text-align: center;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06) inset;
}

.overlay-panel h2 {
  margin: 0 0 12px;
  font-size: 34px;
  letter-spacing: 3px;
}

.overlay-panel p {
  margin: 8px 0;
  line-height: 1.6;
}
