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

:root {
  --bg: #11151c;
  --panel: #1c232e;
  --accent: #f1c40f;
  --text: #e8edf2;
  --muted: #8a97a6;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

#app {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hidden { display: none !important; }

/* ---- Overlay / lobby ---- */
#overlay {
  width: 100%;
  display: flex;
  justify-content: center;
}

.panel {
  background: var(--panel);
  border: 1px solid #2c3644;
  border-radius: 14px;
  padding: 32px 36px;
  width: 440px;
  max-width: 100%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

h1 {
  font-size: 34px;
  letter-spacing: 4px;
  margin-bottom: 22px;
  text-align: center;
}
h1 span { color: var(--accent); }

h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 10px;
}

#join { display: flex; gap: 10px; }

input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #36424f;
  background: #141a22;
  color: var(--text);
  font-size: 15px;
}
input[type="text"]:focus { outline: 2px solid var(--accent); }

button {
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #20160a;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.05s ease, filter 0.15s ease;
}
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }

#lobby { margin-top: 22px; }
#startBtn { width: 100%; margin-top: 8px; }

#players { list-style: none; margin-bottom: 16px; }
#players li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #141a22;
  margin-bottom: 6px;
}
#players .dot {
  width: 14px; height: 14px; border-radius: 50%;
  flex: 0 0 auto;
}
#players .pname { flex: 1; }
#players .pscore { color: var(--accent); font-weight: 700; }

.status { margin-top: 16px; color: var(--accent); min-height: 18px; text-align: center; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; text-align: center; }

.controls-help {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #2c3644;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.controls-help b { color: var(--text); }

/* ---- Game ---- */
#game { display: flex; justify-content: center; }
#canvas {
  background: #0c0f14;
  border-radius: 10px;
  border: 1px solid #2c3644;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  height: auto;
}
