html, body {
  margin: 0; padding: 0;
  background: #161019;
  width: 100vw; height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #f8f8f8;
  user-select: none;
  overflow: hidden;
}

#game-root {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
#game-canvas {
  display: block;
  margin: auto;
  background: #191319;
  border-radius: 18px;
  box-shadow: 0 0 64px #11051a88, 0 2px 12px #000d  ;
  outline: 2px solid #b01340;
}

#game-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  width: 100vw; height: 100vh;
}
.hud-topleft {
  position: absolute; top: 26px; left: 30px; z-index: 2;
}
.hud-topright {
  position: absolute; top: 26px; right: 30px; z-index: 2;
}
.hud-bottomleft {
  position: absolute; bottom: 34px; left: 34px; z-index: 2;
}
.hud-bottomright {
  position: absolute; bottom: 34px; right: 34px; z-index: 2;
}
.hud-bottomcenter {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2;
}
.hud-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(28,12,32,0.93);
  border-radius: 18px;
  padding: 9px 19px 8px 19px;
  box-shadow: 0 0 14px #b0134088 inset, 0 0 3px #000a;
  min-width: 62px;
  min-height: 30px;
}
.life-block {
  border: 2.7px solid #e2275d;
}
.ammo-block {
  border: 2.7px solid #f3ce46;
}
.floor-block {
  border: 2.7px solid #63e2e8;
}
#minimap {
  border-radius: 18px;
  border: 2.7px solid #b01340;
  background: #120710;
  box-shadow: 0 0 12px #b01340bb, 0 0 4px #0007;
  width: 90px; height: 90px;
  display: block;
}

.hud-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.6px;
  margin-top: 1px;
  color: #fc8c99;
  text-shadow: 0 0 6px #88001a55;
}

#health-val, #ammo-val, #floor-val {
  font-size: 1.4em;
  font-weight: bold;
  color: #fafaff;
  letter-spacing: 1px;
}

.weapon-select {
  display: flex;
  gap: 16px;
}
.weapon-btn {
  pointer-events: auto;
  padding: 8px 15px;
  border-radius: 12px;
  border: 2px solid #502158;
  background: #222124;
  color: #fafaff;
  font-size: 1em;
  font-weight: 500;
  transition: 0.15s;
  cursor: pointer;
  box-shadow: 0 0 8px #c90d3a33;
  margin-top: 6px;
}
.weapon-btn.active, .weapon-btn:hover {
  border-color: #e2275d;
  background: #370d1a;
  color: #fff1f7;
  box-shadow: 0 0 10px #e2275d77;
}

.hud-btn {
  pointer-events: auto;
  position: absolute;
  top: 26px;
  padding: 7px 15px;
  border-radius: 14px;
  border: 2.2px solid #ae2655;
  background: #1a1022e9;
  color: #f7cde9;
  font-size: 1.7em;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 0 8px #e2275d45;
}
.hud-btn-menu {
  left: 50%; transform: translateX(-180px);
}
.hud-btn-skill {
  right: 50%; transform: translateX(180px);
}

/* Overlays (menus) */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(22,16,25,0.91);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay.hidden { display: none; }
.menu-content {
  background: #200819;
  border-radius: 22px;
  box-shadow: 0 0 44px #000c, 0 0 12px #b0134077 inset;
  padding: 44px 38px 32px 38px;
  min-width: 300px;
  color: #f8eaff;
  text-align: center;
}
.menu-content h2 {
  margin: 0 0 16px 0;
  font-size: 2em;
  color: #fc7e97;
  letter-spacing: 1.5px;
}
.menu-content button {
  pointer-events: auto;
  margin: 10px 10px 0 10px;
  padding: 10px 26px;
  font-size: 1.05em;
  border-radius: 12px;
  border: 2px solid #ae2655;
  background: #23031f;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: 0.13s;
}
.menu-content button:hover {
  background: #310718;
  color: #faebf6;
  border-color: #e2275d;
}
