* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: #1a1a2e;
  color: #eee;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}
#game { width: 100%; height: 100%; }
#overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 30, 0.85);
}
#overlay.hidden { display: none; }
#join-form {
  background: #16213e; padding: 1.5rem 2rem; border-radius: 12px;
  display: flex; flex-direction: column; gap: 0.75rem; min-width: 260px;
}
#join-form input, #chat-form input {
  width: 100%; padding: 0.5rem; border-radius: 6px; border: 1px solid #444;
  background: #0f3460; color: #fff;
}
#join-form button, #chat-form button {
  padding: 0.55rem 1rem; border: 0; border-radius: 6px;
  background: #e94560; color: #fff; cursor: pointer; font-weight: 600;
}
#chat-panel {
  position: fixed; top: 0; right: 0; width: 280px; height: 100%;
  background: rgba(22, 33, 62, 0.92); z-index: 10;
  display: flex; flex-direction: column; padding: 0.75rem;
  border-left: 1px solid #333;
}
#chat-panel h2 { margin: 0 0 0.5rem; font-size: 1rem; }
#chat-log {
  flex: 1; overflow-y: auto; font-size: 0.85rem; line-height: 1.35;
  display: flex; flex-direction: column; gap: 0.35rem;
}
#chat-log .entry { background: #0f3460; padding: 0.35rem 0.5rem; border-radius: 6px; }
#chat-log .from { color: #e94560; font-weight: 600; }
#chat-form { display: flex; gap: 0.35rem; margin-top: 0.5rem; }
#chat-form input { flex: 1; }
#hint { font-size: 0.7rem; opacity: 0.7; margin: 0.4rem 0 0; }
