* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b0a09;
  color: #e8dcc8;
  font-family: "Segoe UI", system-ui, sans-serif;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
}

#overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(120, 70, 30, 0.35), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(30, 50, 40, 0.4), transparent 45%),
    #0b0a09;
  z-index: 10;
}

#overlay.hidden {
  display: none;
}

.panel {
  max-width: 480px;
  text-align: center;
  padding: 2rem;
}

.panel h1 {
  font-size: 2.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d4a574;
  margin-bottom: 0.5rem;
}

.panel p {
  margin-bottom: 1rem;
  opacity: 0.85;
}

.panel label {
  display: block;
  margin-bottom: 1rem;
}

.panel input {
  margin-left: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: #1a1612;
  border: 1px solid #5a4633;
  color: #e8dcc8;
}

.panel label.check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.panel label.check input {
  margin: 0;
  width: 1rem;
  height: 1rem;
  accent-color: #8b5a2b;
}

.panel button {
  padding: 0.7rem 1.4rem;
  background: #8b5a2b;
  border: none;
  color: #fff8ee;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
}

.panel button:hover {
  background: #a66b35;
}

.level-picker {
  text-align: left;
}

.level-picker select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  margin-left: 0;
  padding: 0.4rem 0.5rem;
  background: #1a1612;
  border: 1px solid #5a4633;
  color: #e8dcc8;
}

.hint {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

#hud.hidden {
  display: none;
}

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 240, 200, 0.85);
  font-size: 22px;
  text-shadow: 0 0 4px #000;
}

#vitals {
  position: absolute;
  left: 24px;
  bottom: 24px;
  font-size: 18px;
  text-shadow: 0 2px 6px #000;
}

#scoreboard {
  position: absolute;
  right: 24px;
  top: 24px;
  font-size: 14px;
  text-align: right;
  text-shadow: 0 2px 6px #000;
  line-height: 1.4;
}

#timer {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  font-size: 22px;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px #000;
}

#perf {
  position: absolute;
  left: 24px;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(520px, 70vw);
  pointer-events: none;
}

#fps {
  max-width: 100%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  opacity: 0.85;
  text-shadow: 0 2px 6px #000;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fps-plot {
  display: block;
  width: 160px;
  height: 36px;
  opacity: 0.9;
}

#feed {
  position: absolute;
  left: 50%;
  top: 48px;
  transform: translateX(-50%);
  width: min(720px, 72vw);
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  text-shadow: 0 2px 8px #000;
  pointer-events: none;
}

#weapon-help {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  width: min(420px, 86vw);
  padding: 14px 18px 12px;
  background: rgba(12, 10, 8, 0.78);
  border: 1px solid rgba(220, 190, 140, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  text-shadow: 0 2px 6px #000;
  text-align: left;
}

#weapon-help.hidden {
  display: none;
}

#weapon-help-name {
  font-size: 20px;
  letter-spacing: 0.04em;
  color: #f2e2c0;
  margin-bottom: 4px;
}

#weapon-help-short {
  font-size: 13px;
  color: #c9a86a;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

#weapon-help-long {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(235, 220, 195, 0.92);
}

#weapon-help-hint {
  margin-top: 10px;
  font-size: 11px;
  opacity: 0.55;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#feed .row {
  color: #f3e6cf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#feed .row.kill {
  color: #ffc48a;
}

#feed .row.pickup {
  color: #9fe8d4;
}

#feed .row.round {
  color: #f0c070;
  font-weight: 700;
}

#feed .row.join,
#feed .row.leave {
  color: #d7c4a8;
}

.anim-debug-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.anim-debug-label {
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(212, 160, 86, 0.45);
  background: rgba(8, 6, 5, 0.82);
  color: #f0dfc4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: pre;
  text-align: left;
  transform: translate(-50%, -100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.pause-banner {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(120, 40, 20, 0.85);
  border: 1px solid rgba(255, 170, 100, 0.45);
  color: #ffd8b0;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  pointer-events: none;
}

.pause-panel {
  position: absolute;
  top: 3.2rem;
  left: 1rem;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 160, 86, 0.35);
  background: rgba(8, 6, 5, 0.88);
  pointer-events: none;
}

.pause-panel-title {
  font-size: 0.82rem;
  color: #d4a056;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.pause-mode-bar {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.pause-mode {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(154, 136, 117, 0.45);
  color: #b9a995;
  font-size: 0.72rem;
}

.pause-mode.active {
  border-color: rgba(212, 160, 86, 0.75);
  color: #f0dfc4;
  background: rgba(212, 160, 86, 0.12);
}

.pause-mode.disabled {
  opacity: 0.55;
}

.introspection-body {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #e8dcc8;
  white-space: pre-wrap;
}

.hidden {
  display: none !important;
}

body.menu {
  overflow: auto;
  display: grid;
  place-items: center;
}

.menu-panel {
  max-width: 28rem;
}

.menu-panel a {
  color: #d4a574;
}

.menu-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.leaderboard-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 6, 5, 0.78);
  z-index: 20;
  pointer-events: none;
}

.leaderboard-panel {
  min-width: min(22rem, 90vw);
  padding: 1.4rem 1.6rem;
  text-align: center;
  background: rgba(12, 10, 8, 0.92);
  border: 1px solid rgba(212, 160, 86, 0.4);
  border-radius: 10px;
}

.leaderboard-panel h2 {
  color: #d4a574;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.leaderboard-panel ol {
  list-style: none;
  text-align: left;
  margin: 1rem 0;
  line-height: 1.55;
}

.leaderboard-panel li.you {
  color: #f0dfc4;
  font-weight: 700;
}

#leaderboard-countdown {
  letter-spacing: 0.04em;
  color: #e8dcc8;
}
