/* Menus de escolha, fundo da tela e posição dos botões de toque. Carregado depois de hud.css. */
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070d;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: system-ui, sans-serif;
}

#stage {
  position: fixed;
  inset: 0;
}
#stage canvas {
  display: block;
}

.hud {
  z-index: 10;
}

/* Mensagens de abate e de morte, no topo. */
.banner {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 6px;
  background: var(--panel);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.banner.show {
  opacity: 1;
}

/* Mira fica vermelha por um instante quando o tiro acerta. */
.crosshair.hit::before,
.crosshair.hit::after {
  background: #ff4040;
}

/* Borda vermelha quando o jogador toma dano. */
.damage {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  background: radial-gradient(ellipse at center, rgba(255, 0, 0, 0) 45%, rgba(200, 0, 0, 0.55) 100%);
}
.damage.on {
  opacity: 1;
}

/* Painel central das telas de menu. */
.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: min(96vw, 820px);
  max-height: 100%;
  overflow-y: auto;
  padding: 14px;
}
.panel .title.small {
  font-size: 30px;
}
.label {
  margin-top: 4px;
  font-size: 14px;
  opacity: 0.85;
  text-align: center;
}
.group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.opt {
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.opt.sel {
  border-color: var(--gold);
  background: rgba(255, 208, 0, 0.22);
}
.row {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.menu-btn {
  width: min(320px, 80vw);
}
#sens {
  width: min(320px, 80vw);
}

/* Posição dos botões de toque, no canto inferior direito (paisagem). */
.btn {
  font-size: 12px;
}
.btn.aim {
  right: 26px;
  top: 38%;
}
.btn.fire {
  right: 20px;
  bottom: 20px;
}
.btn.crouch {
  right: 128px;
  bottom: 40px;
}
.btn.jump {
  right: 128px;
  bottom: 124px;
}
.btn.reload {
  right: 214px;
  bottom: 40px;
}
.btn.swap {
  right: 214px;
  bottom: 124px;
}
