* {
  margin: 0;
  padding: 0;
}

html, body, #game-container {
  height: 100%;
}

/* No flex centering here: Phaser's CENTER_BOTH positions the canvas AND its
   DOM overlay (the name form) with the same math. A CSS-centered canvas makes
   the overlay drift as the window resizes. */

body {
  margin: 0;
  padding: 0;
  background: #1b1b1b;
  color: #eee;
  font: caption;
  overflow: hidden;
}

/* Decorative frame around the canvas; positioned by positionCanvasFrame()
   in app.js so its black window always coincides with the canvas. */
#canvas-frame {
  position: fixed;
  pointer-events: none;
  display: none;
  z-index: 0;
}

/* Keep the game (and Phaser's DOM overlay) above the frame image. */
#game-container {
  position: relative;
  z-index: 1;
}

.name-form input {
  display: block;
  width: 260px;
  padding: 10px 14px;
  border: 2px solid #555;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font: 18px Arial, sans-serif;
  text-align: center;
  outline: none;
}

.name-form input:focus {
  border-color: #41a4f5;
}

.name-form button,
.game-button {
  display: block;
  margin: 14px auto 0;
  padding: 10px 40px;
  border: 0;
  border-radius: 6px;
  background: #41a4f5;
  color: #fff;
  font: bold 18px Arial, sans-serif;
  cursor: pointer;
}

.game-button {
  margin: 0;
}

.lobby-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.lobby-modal {
  width: 380px;
  padding: 18px 22px;
  background: #1b1b1b;
  border: 1px solid #444;
  border-radius: 10px;
  font: 14px Arial, sans-serif;
  color: #eee;
  box-shadow: 4px 4px 5px rgba(0,0,0,0.5);
}

.lobby-modal h2 {
  font: bold 22px Arial, sans-serif;
  text-align: center;
  margin-bottom: 2px;
}

.lobby-modal .player-count {
  text-align: center;
  color: #aaa;
  margin-bottom: 10px;
}

.lobby-panel {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.lobby-panel h3 {
  font: bold 14px Arial, sans-serif;
  margin-bottom: 8px;
}

.player-row {
  padding: 3px 0;
}

.player-row.me {
  color: #ffff00;
}

.host-settings label {
  display: block;
  margin-bottom: 10px;
}

.host-settings input[type=range] {
  display: block;
  width: 100%;
  margin-top: 4px;
  accent-color: #41a4f5;
}

.slider-value {
  float: right;
  color: #41a4f5;
  font-weight: bold;
}

.waiting-note {
  text-align: center;
  color: #aaa;
  margin-bottom: 12px;
  font-style: italic;
}

.name-form button:hover,
.game-button:hover {
  background: #2b8fe0;
}

.change-name-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  font: 13px Arial, sans-serif;
  color: #41a4f5;
  cursor: pointer;
}

.change-name-link:hover {
  text-decoration: underline;
}
