* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #1e3555 0%, #0b1020 58%, #05070d 100%);
  color: #eaf2ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.game-shell {
  width: min(1160px, calc(100vw - 24px));
  margin: 18px auto;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0.02em;
}

.topbar p,
.help,
.small {
  color: #a9bbd4;
}

.status {
  min-width: 260px;
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  text-align: right;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.canvas-wrap {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  overflow: hidden;
  background: #0a1020;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
}

canvas {
  display: block;
  width: 100%;
  max-height: calc(100vh - 170px);
  image-rendering: pixelated;
  background: #50678a;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.68);
  backdrop-filter: blur(4px);
}

.overlay.hidden {
  display: none;
}

.card {
  width: min(560px, 92vw);
  padding: 26px;
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.card h2 {
  margin-bottom: 10px;
  font-size: 28px;
}

.card p {
  margin-bottom: 18px;
  line-height: 1.55;
  color: #c7d6ec;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  color: white;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.28);
}

button:hover {
  filter: brightness(1.08);
}

.help {
  padding: 12px 4px 0;
  font-size: 14px;
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .status {
    text-align: left;
  }
}
