* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #14141c;
  color: #f0f0f5;
  margin: 0;
  display: flex;
  justify-content: center;
}
#app {
  width: 100%;
  max-width: 460px;
  padding: 20px;
  min-height: 100vh;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
h1 { font-size: 1.3rem; margin: 0; }
h2 { margin-top: 0; }
.hidden { display: none !important; }
label { display: block; margin-bottom: 12px; font-size: .9rem; color: #aaa; }
input {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #1f1f2b;
  color: #fff;
  font-size: 1rem;
}
.row { display: flex; gap: 8px; margin-bottom: 10px; }
.join-row input { flex: 1; }
button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #e63946;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}
button:hover { background: #ff4d5e; }
.error { color: #ff8080; min-height: 1.2em; font-size: .9rem; }
#roomBadge { font-size: .9rem; color: #aaa; }
#playerList { list-style: none; padding: 0; margin: 12px 0; }
#playerList li {
  padding: 8px 10px;
  background: #1f1f2b;
  border-radius: 8px;
  margin-bottom: 6px;
}
#canvas {
  width: 100%;
  background: #2b2b1f;
  border-radius: 8px;
  display: block;
  image-rendering: pixelated;
}
.hint { text-align: center; color: #999; font-size: .85rem; margin-top: 8px; }
