html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #171714;
  color: #f4f2ea;
  font-family: Arial, Helvetica, sans-serif;
}

#game-root,
#game {
  width: 100%;
  height: 100%;
}

#game {
  display: block;
}

#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#crosshair::before,
#crosshair::after {
  content: "";
  position: absolute;
  background: rgba(245, 245, 230, 0.9);
}

#crosshair::before {
  left: 8px;
  top: 0;
  width: 2px;
  height: 18px;
}

#crosshair::after {
  left: 0;
  top: 8px;
  width: 18px;
  height: 2px;
}

#hud {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 2px 6px #000;
}

#interact-prompt {
  position: fixed;
  left: 50%;
  bottom: 118px;
  z-index: 2;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 212, 120, 0.5);
  border-radius: 8px;
  background: rgba(18, 15, 10, 0.86);
  color: #ffe6a3;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 4px #000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

#interact-prompt.visible {
  opacity: 1;
}

#hud-main {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hud-card {
  min-width: 92px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 26, 22, 0.82), rgba(8, 9, 8, 0.72));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hud-label {
  display: block;
  color: #c9c0a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-value {
  display: block;
  margin-top: 2px;
  color: #fff5d6;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.health-card {
  min-width: 132px;
}

.ammo-card {
  min-width: 150px;
}

.money-card .hud-value {
  color: #ffd46f;
}

#health-meter {
  width: 100%;
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(85, 20, 18, 0.9);
}

#health-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d93426, #ffe46d);
  transition: width 0.16s ease, background 0.16s ease;
}

#hud-status {
  margin-top: 8px;
  max-width: min(760px, calc(100vw - 32px));
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(5, 5, 5, 0.46);
  color: #d9d2bf;
  font-size: 13px;
  font-weight: 400;
}

#minimap {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 2;
  width: 176px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 9, 8, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.minimap-title {
  margin-bottom: 5px;
  color: #c9c0a8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#minimap-canvas {
  display: block;
  width: 176px;
  height: 176px;
  border-radius: 6px;
  background: #141711;
}

#scoreboard {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

#scoreboard.visible {
  display: flex;
}

.scoreboard-panel {
  width: min(780px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow: auto;
  border: 1px solid rgba(255, 222, 150, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(23, 25, 22, 0.94), rgba(8, 9, 8, 0.9));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.scoreboard-title {
  padding: 14px 16px 10px;
  color: #ffe3a3;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#scoreboard table {
  width: 100%;
  border-collapse: collapse;
}

#scoreboard th,
#scoreboard td {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #f7efd9;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}

#scoreboard th {
  color: #c9c0a8;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#scoreboard tr.local-player td {
  background: rgba(255, 207, 106, 0.1);
  color: #fff4cb;
}

#mute {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.55);
  color: #f4f2ea;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
  background: radial-gradient(circle at center, rgba(35, 13, 13, 0.72), rgba(0, 0, 0, 0.88));
  text-align: center;
}

#overlay h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 7vw, 82px);
  letter-spacing: 0;
}

#overlay p {
  margin: 0 0 24px;
  color: #c9c3b2;
}

#play {
  border: 0;
  background: #b83424;
  color: #fff;
  border-radius: 6px;
  padding: 12px 22px;
  font-weight: 800;
  cursor: pointer;
}

#damage-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, transparent 45%, rgba(150, 0, 0, 0.55));
  transition: opacity 0.18s ease;
}

@media (max-width: 720px) {
  #hud {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  #hud-main {
    gap: 7px;
  }

  .hud-card {
    min-width: 70px;
    padding: 7px 8px;
  }

  .hud-value {
    font-size: 14px;
  }

  .health-card,
  .ammo-card {
    min-width: 118px;
  }

  #hud-status {
    display: none;
  }

  #minimap {
    width: 126px;
    padding: 6px;
  }

  #minimap-canvas {
    width: 126px;
    height: 126px;
  }

  #interact-prompt {
    bottom: 112px;
    font-size: 13px;
  }

  .scoreboard-panel {
    width: calc(100vw - 20px);
  }

  #scoreboard th,
  #scoreboard td {
    padding: 8px 9px;
    font-size: 12px;
  }
}
