* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #0d1526; color: #eee; font-family: system-ui, sans-serif; }
.hidden { display: none !important; }
.dim { color: #8a9ab8; font-weight: 400; }
.t { color: #e8a34a; } .ct { color: #4a9ae8; }

#status { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 50; font-size: 13px; color: #8ab4f8; background: rgba(13,21,38,.85); padding: 4px 14px; border-radius: 20px; border: 1px solid #0f3460; }

/* ---- 大厅 ---- */
#lobby { max-width: 620px; margin: 60px auto; background: #16213e; border: 1px solid #0f3460; border-radius: 12px; padding: 24px; }
#lobby h1 { color: #4ecca3; margin-bottom: 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
button { font: inherit; padding: 9px 16px; border-radius: 6px; border: 1px solid #0f3460; background: #0d1526; color: #eee; cursor: pointer; }
button.primary { background: #4ecca3; color: #06281f; border: none; font-weight: 600; }
button.ghost { background: transparent; }
button:disabled { opacity: .45; cursor: default; }
input { font: inherit; padding: 9px 12px; border-radius: 6px; border: 1px solid #0f3460; background: #0d1526; color: #eee; }
.room-item { display: flex; justify-content: space-between; align-items: center; background: #0d1526; border: 1px solid #0f3460; border-radius: 6px; padding: 8px 12px; margin-top: 6px; font-size: 13px; }
.room-item .meta { color: #8ab4f8; }
.hint { margin-top: 14px; font-size: 12px; color: #667; line-height: 1.6; }

/* ---- 游戏画布 ---- */
#game { position: fixed; inset: 0; }
#view { width: 100vw; height: 100vh; display: block; cursor: crosshair; }

/* ---- HUD ---- */
#hud > div { position: fixed; z-index: 10; user-select: none; pointer-events: none; }
#crosshair { top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; color: #4ecca3; text-shadow: 0 0 3px #000; }
#topbar { top: 16px; left: 50%; transform: translateX(-50%); font-size: 22px; font-weight: 700; background: rgba(13,21,38,.7); padding: 6px 20px; border-radius: 8px; }
#phase { margin-left: 12px; font-size: 14px; color: #8ab4f8; }
#roundNum { margin-left: 8px; font-size: 12px; }
#bombState { top: 60px; left: 50%; transform: translateX(-50%); color: #ff5544; font-weight: 700; font-size: 16px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .4; } }
#bottomLeft { bottom: 20px; left: 24px; font-size: 20px; }
#bottomRight { bottom: 20px; right: 24px; font-size: 18px; text-align: right; }
#ammo { font-size: 24px; font-weight: 700; }
#money { color: #4ecca3; font-weight: 600; }
#feed { top: 90px; right: 20px; font-size: 13px; text-align: right; }
#feed div { background: rgba(13,21,38,.75); padding: 4px 10px; border-radius: 4px; margin-bottom: 4px; }
#whoTag { bottom: 60px; left: 24px; font-size: 12px; color: #667; }
#teamTag { bottom: 44px; left: 24px; font-size: 12px; font-weight: 700; }

/* ---- 购买菜单 ---- */
#buyMenu { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 20; background: rgba(13,21,38,.95); border: 1px solid #0f3460; border-radius: 12px; padding: 20px 28px; min-width: 260px; }
#buyMenu h3 { color: #4ecca3; margin-bottom: 12px; }
.buy-item { padding: 8px 4px; font-size: 16px; border-bottom: 1px solid #0f3460; }
.buy-item b { color: #4ecca3; margin-right: 8px; }

/* ---- 覆盖层 ---- */
#dmgFlash { position: fixed; inset: 0; z-index: 15; background: radial-gradient(ellipse, transparent 40%, rgba(255,0,0,.45)); pointer-events: none; }
#deathOverlay { position: fixed; inset: 0; z-index: 15; background: rgba(120,0,0,.5); display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 800; color: #fff; pointer-events: none; }
#lockHint { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 12; color: #8ab4f8; font-size: 15px; background: rgba(13,21,38,.8); padding: 8px 20px; border-radius: 20px; pointer-events: none; }
body.locked #lockHint { display: none; }

/* ---- 记分板(Tab) ---- */
#scoreboard {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
#scoreboard.hidden { display: none; }
#sbContent {
  background: rgba(13,21,38,.95); border: 1px solid #2a3a5a;
  border-radius: 12px; padding: 20px 28px; min-width: 500px; max-width: 90vw;
  font-size: 14px;
}
#sbContent h3 { color: #4ecca3; margin-bottom: 12px; font-size: 16px; }
#sbContent table { width: 100%; border-collapse: collapse; }
#sbContent th { color: #8ab4f8; font-weight: 500; text-align: left; padding: 6px 10px; border-bottom: 1px solid #2a3a5a; font-size: 12px; }
#sbContent td { padding: 6px 10px; border-bottom: 1px solid #1a2a3a; }
#sbContent tr.me { background: rgba(78,204,163,.1); }
#sbContent .host-badge { color: #f5a623; font-weight: 700; font-size: 11px; }
#sbContent .t { color: #e8a34a; } .sb-ct { color: #4a9ae8; }
#sbContent .dead { opacity: .5; }
#sbContent .ping-good { color: #4ecca3; }
#sbContent .ping-ok { color: #f5a623; }
#sbContent .ping-bad { color: #e94560; }
#sbContent .score-line { color: #8ab4f8; font-size: 12px; margin-top: 10px; text-align: center; }
#sbContent .room-info { color: #667; font-size: 11px; margin-top: 6px; text-align: center; }
