:root {
  --bg: #141826;
  --red: #ff4d5e;
  --blue: #3da5ff;
  --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 .r { color: var(--red); }
.title .b { color: var(--blue); }

.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); }

.red-text { color: var(--red); }
.blue-text { color: var(--blue); }
.gold-text { 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;
}
