* { box-sizing: border-box; }
/* The `hidden` attribute must beat ID-level `display` rules below, or #lobby /
   #game / #overlay never actually hide. */
[hidden] { display: none !important; }
html, body {
  margin: 0;
  height: 100%;
  background: #10141c;
  color: #e6ebf2;
  font-family: system-ui, Segoe UI, Roboto, sans-serif;
}
main {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#lobby {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 320px;
  text-align: center;
}
h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: 1px; }
input {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #2b3242;
  background: #1a1f2b;
  color: #e6ebf2;
  font-size: 16px;
  text-align: center;
}
button {
  padding: 12px 14px;
  border-radius: 8px;
  border: 0;
  background: #4dabf7;
  color: #08131f;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: #74c0fc; }
#message { color: #93a1b5; font-size: 14px; min-height: 20px; }
#game { display: flex; flex-direction: column; gap: 10px; }
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
}
#status { color: #93a1b5; font-weight: 400; }
canvas {
  background: #171d28;
  border: 1px solid #2b3242;
  border-radius: 8px;
  cursor: crosshair;
  max-width: 100%;
  height: auto;
  display: block;
}
#controls { color: #93a1b5; font-size: 13px; text-align: center; }
#ammo { color: #cbd3df; font-weight: 600; letter-spacing: 0.5px; }

/* arena wraps the canvas so the win overlay can sit on top of it */
#arena { position: relative; display: inline-block; }
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(8, 11, 16, 0.72);
  border-radius: 8px;
}
#winText { font-size: 32px; font-weight: 700; text-align: center; }
#overlay button { font-size: 18px; padding: 12px 22px; }
