html, body {
  margin: 0;
  height: 100%;
  background: #070c16;
  overflow: hidden;
}
#arena {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  pointer-events: none;
}
.hud-top .timer {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
.hud-top .timer.low { color: var(--danger); }
.hud-actions { display: flex; gap: 8px; pointer-events: auto; }
.hud-actions .mute-btn { pointer-events: auto; }

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 18, 0.88);
  z-index: 20;
  padding: 20px;
}
.lobby-card {
  background: var(--bg2);
  border: 3px solid var(--line);
  border-radius: 20px;
  padding: 26px 30px;
  width: min(92vw, 430px);
  text-align: center;
  box-shadow: 0 0 60px rgba(84, 160, 255, 0.12);
}
.logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 16px;
  text-shadow: 0 0 18px rgba(84, 160, 255, 0.5);
}
.qr-box {
  width: 210px;
  height: 210px;
  margin: 0 auto 14px;
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-box img { width: 100%; height: 100%; image-rendering: pixelated; }
.room-code {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 12px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.join-hint {
  color: var(--dim);
  font-size: 12px;
  margin: 10px 0 6px;
  word-break: break-all;
}

.lineup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 8px;
}
.lineup-empty { color: var(--dim); font-size: 14px; padding: 8px; }
.lineup-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
.lineup-slot canvas { image-rendering: pixelated; }
.lineup-slot .ln-name { flex: 1; text-align: left; font-weight: 800; letter-spacing: 1px; }
.lineup-slot .ln-badge { color: var(--dim); font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.lineup-slot.ready { border-color: var(--ok); }
.lineup-slot.ready .ln-badge { color: var(--ok); }
.lineup-slot.wait { border-color: var(--accent); }
.lineup-slot.wait .ln-badge { color: var(--accent); }
.lineup-slot .ln-kick {
  margin-left: auto;
  background: rgba(255, 90, 95, 0.15);
  border: 1px solid rgba(255, 90, 95, 0.5);
  border-radius: 8px;
  color: var(--danger);
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  padding: 5px 9px;
  cursor: pointer;
}
.lineup-slot .ln-kick:hover { background: var(--danger); color: #fff; }

.host-controls {
  margin-top: 16px;
}
.host-controls .btn { width: 100%; }
#start-hint { color: var(--dim); font-size: 13px; }

.results-card {
  background: var(--bg2);
  border: 3px solid var(--line);
  border-radius: 20px;
  padding: 26px 30px;
  width: min(92vw, 460px);
  text-align: center;
}
.champ-banner {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(255, 217, 61, 0.5);
}
.round-label {
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.results-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.rs-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
}
.rs-entry.winner { border-color: var(--accent); box-shadow: 0 0 14px rgba(255, 217, 61, 0.25); }
.rs-entry .rs-name { display: flex; align-items: center; gap: 10px; }
.rs-entry .rs-dot { width: 12px; height: 12px; border-radius: 3px; }
.rs-entry .rs-crown { margin-left: 6px; }
.rs-entry .rs-shots { color: var(--dim); font-size: 13px; font-weight: 700; margin-left: auto; padding: 0 12px; }
.rs-entry .rs-score { color: var(--ink); }

.host-controls .btn + .btn { margin-left: 10px; }
.host-lost-card {
  background: var(--bg2);
  border: 3px solid var(--danger);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}
