:root {
  --bg: #141826;
  --red: #ff5d73;
  --blue: #3da5ff;
  --orange: #ffb020;
  --purple: #a77bff;
  --money: #3ccf7a;
  --bad: #ff3b3b;
  --gold: #ffd34d;
  --ink: #f4f1ea;
  --dim: #8a90a8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#c {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Overlay for menus/buttons (gameplay's game.js fills it). Clicks pass
   through to the canvas except on things marked .ui-hit. */
#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  text-align: center;
}
#ui:empty { display: none; }

.ui-hit { pointer-events: auto; }

.panel {
  background: rgba(20, 24, 38, 0.88);
  border: 2px solid rgba(244, 241, 234, 0.12);
  border-radius: 18px;
  padding: 22px 26px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.title {
  font-size: clamp(40px, 11vw, 72px);
  font-weight: 900;
  letter-spacing: 2px;
  margin: 0;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.title span { display: block; }
.title .t1 { color: var(--orange); font-size: 0.62em; letter-spacing: 1px; }
.title .t2 { color: var(--red); font-size: 0.78em; }

#join { display: flex; flex-direction: column; gap: 14px; align-items: center; }
#join .hint { line-height: 1.4; }
.bad { color: var(--bad); font-weight: 800; }
.gold { color: var(--gold); font-weight: 800; }

.hint { color: var(--dim); font-size: 15px; margin: 6px 0 0; }

.btn {
  pointer-events: auto;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
  background: var(--gold);
  border: none;
  border-radius: 999px;
  padding: 14px 34px;
  cursor: pointer;
  box-shadow: 0 5px 0 #b8922a;
  transition: transform 0.06s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #b8922a; }
.btn.red { background: var(--red); box-shadow: 0 5px 0 #a8303d; color: #fff; }
.btn.blue { background: var(--blue); box-shadow: 0 5px 0 #2269a8; color: #fff; }

input.name {
  pointer-events: auto;
  font: inherit;
  font-size: 20px;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(244, 241, 234, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  width: 100%;
  outline: none;
}
input.name:focus { border-color: var(--gold); }



.net-badge {
  position: fixed;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--dim);
  opacity: 0.8;
}

.mute {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(244, 241, 234, 0.2);
  background: rgba(20, 24, 38, 0.7);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.mute.off { color: var(--dim); text-decoration: line-through; }
