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

body {
  background: #1a0a00;
  overflow: hidden;
  font-family: 'Georgia', serif;
  color: #f5e6c8;
}

#gameCanvas {
  display: block;
  position: absolute;
  top: 0; left: 0;
}

#ui-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Connect / Lobby UI panels */
.panel {
  background: rgba(40, 20, 5, 0.92);
  border: 3px solid #8b5e1a;
  border-radius: 8px;
  padding: 28px 36px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  min-width: 360px;
  pointer-events: all;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}

.panel h1 {
  font-size: 2rem;
  color: #FFD700;
  text-align: center;
  text-shadow: 2px 2px 6px #000;
  margin-bottom: 6px;
}

.panel h2 {
  font-size: 1.2rem;
  color: #c8a45a;
  text-align: center;
  margin-bottom: 20px;
  font-weight: normal;
}

.panel label {
  display: block;
  margin-bottom: 6px;
  color: #d4b483;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.panel input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  background: #2a1500;
  border: 2px solid #6b4410;
  border-radius: 4px;
  color: #f5e6c8;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 14px;
  outline: none;
}

.panel input[type="text"]:focus { border-color: #FFD700; }

.btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: #8b5e1a;
  border: 2px solid #FFD700;
  border-radius: 4px;
  color: #FFD700;
  font-size: 1.05rem;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
  transition: background 0.15s;
}

.btn:hover { background: #a87020; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.secondary { background: #3a1f05; border-color: #8b5e1a; color: #c8a45a; }
.btn.secondary:hover { background: #4a2a08; }
.btn.danger { background: #6b1a1a; border-color: #e05050; color: #f5a0a0; }

.hat-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  justify-content: center;
}

.hat-option {
  width: 52px; height: 52px;
  border: 2px solid #6b4410;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  background: #2a1500;
  transition: border-color 0.1s;
}

.hat-option.selected { border-color: #FFD700; background: #3a2000; }

.colour-picker {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}

.colour-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.colour-swatch.selected { border-color: #FFD700; transform: scale(1.2); }

.room-code {
  font-size: 2.4rem;
  text-align: center;
  letter-spacing: 0.25em;
  color: #FFD700;
  font-weight: bold;
  margin: 10px 0 18px;
  text-shadow: 0 0 12px rgba(255,215,0,0.4);
}

.player-list { list-style: none; margin-bottom: 16px; }

.player-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #3a2000;
  font-size: 0.95rem;
}

.player-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.error-msg {
  color: #f06060;
  font-size: 0.85rem;
  text-align: center;
  margin-top: -8px;
  margin-bottom: 10px;
}

.hint { font-size: 0.8rem; color: #8a6a40; text-align: center; margin-top: 4px; }

/* Divider */
.divider { border: none; border-top: 1px solid #4a2e0a; margin: 14px 0; }
