body { overflow: hidden; }

/* ── Accueil ──────────────────────────────────────────────────────────────── */

.lobby { max-width: 520px; margin: 60px auto; }
.lobby h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.5px; }
.lobby p { margin: 0 0 20px; }
.lobby .small { margin: 18px 0 0; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.small { font-size: 13px; }

kbd {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 5px;
  padding: 1px 5px;
}

.codeInput {
  width: 110px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--mono);
}

/* ── Jeu ──────────────────────────────────────────────────────────────────── */

#view {
  position: fixed;
  inset: 52px 0 0 0;
  width: 100%;
  height: calc(100vh - 52px);
  display: block;
  touch-action: none;
  cursor: none;
  background: #070a10;
}

.minimap {
  position: fixed;
  z-index: 6;
  left: 14px;
  bottom: 62px;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.hud { position: fixed; z-index: 5; }
.hud-tl { top: 66px; left: 14px; }
.hud-tr { top: 66px; right: 14px; width: 220px; padding: 12px 14px; }
.hud-bl { bottom: 16px; left: 14px; display: flex; gap: 8px; }
.hud-br { bottom: 16px; right: 14px; padding: 10px 14px; min-width: 148px; }
.hud-bc { bottom: 16px; left: 50%; transform: translateX(-50%); pointer-events: none; }
.hud-feed {
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
  min-width: 180px;
  max-width: min(360px, 70vw);
}

.feedRow {
  font-size: 12.5px;
  color: var(--text);
  background: rgba(22, 27, 36, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  text-align: center;
  animation: feedIn 0.2s ease;
  transition: opacity 0.35s, transform 0.35s;
}
.feedRow span { color: var(--muted); margin: 0 4px; }
.feedRow.out { opacity: 0; transform: translateY(-6px); }
@keyframes feedIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.meStats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.meStats b { font-variant-numeric: tabular-nums; float: right; margin-left: 14px; }

.hudTitle {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.hudNote { font-size: 11.5px; line-height: 1.4; margin-top: 11px; }
.hudNote code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}

.scores { display: flex; flex-direction: column; gap: 6px; }
.scoreRow {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}
.scoreRow .dot { width: 10px; height: 10px; border-radius: 50%; }
.scoreRow .n, .scoreRow .k { font-variant-numeric: tabular-nums; color: var(--muted); }
.scoreRow .k { font-size: 12px; min-width: 1.2em; text-align: right; }
.scoreRow.me .who { font-weight: 600; }
.scoreRow.bot .who { color: var(--muted); font-style: italic; }
.scoreRow .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#banner {
  font-size: 14px;
  color: var(--muted);
  background: rgba(22, 27, 36, 0.9);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 14px;
  opacity: 0;
  transition: opacity 0.2s;
}
#banner.on { opacity: 1; }

.death {
  position: fixed;
  inset: 52px 0 0 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: rgba(7, 10, 16, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.death.on { opacity: 1; }
.deathCard {
  text-align: center;
  padding: 22px 28px;
  min-width: 220px;
  transform: translateY(8px);
  transition: transform 0.25s;
}
.death.on .deathCard { transform: none; }
.deathLabel {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.deathMsg {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

@media (max-width: 700px) {
  .hud-tr { width: 150px; padding: 10px 11px; }
  .hudNote { display: none; }
  .hud-br { display: none; }
  .minimap { width: 110px !important; height: 110px !important; bottom: 58px; }
  .hud-feed { top: auto; bottom: 70px; }
}
