* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #0d0f17;
  color: #e8ecf5;
  font-family: "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

#game canvas { display: block; }

/* ---- Overlay / menu ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #1a2030, #0d0f17 70%);
  z-index: 10;
}
.overlay.hidden { display: none; }

.panel {
  background: #161b29;
  border: 1px solid #2a3245;
  border-radius: 14px;
  padding: 32px 36px;
  width: 340px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.panel h1 { font-size: 28px; margin-bottom: 6px; }
.panel .sub { color: #8b95ad; font-size: 13px; margin-bottom: 22px; }

#nameInput {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #2a3245;
  background: #0d0f17;
  color: #e8ecf5;
  outline: none;
  margin-bottom: 12px;
}
#nameInput:focus { border-color: #40c4ff; }

#playButton {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: #40c4ff;
  color: #06121b;
  cursor: pointer;
  transition: background 0.15s;
}
#playButton:hover { background: #6fd4ff; }
#playButton:disabled { background: #33445a; color: #6c7894; cursor: not-allowed; }

.controls {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #8b95ad;
}
.controls b { color: #c9d2e3; }

.conn { margin-top: 16px; font-size: 12px; color: #6c7894; }
.conn.ok { color: #69f0ae; }
.conn.err { color: #ff5252; }
