* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #000; color: #e8ecf2;
  font-family: -apple-system, "PingFang SC", "Microsoft Yahei", sans-serif;
}
canvas#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ===== Auth overlay (login / register) ===== */
.auth-overlay { z-index: 200; }
.auth-panel { width: min(400px, 92%); padding: 26px 28px 22px; text-align: left;
  background: linear-gradient(160deg,#141d2e,#090c14);
  border: 1px solid #2a3850; border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.75); }
.auth-brand { font-size: 26px; font-weight: 900; letter-spacing: 3px; color: #ffd84a;
  text-align: center; margin-bottom: 14px;
  text-shadow: 0 0 12px rgba(255,200,60,0.5); }
.auth-brand span { color: #ff5a5a; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid #2a3850; }
.auth-tabs .tab { flex: 1; background: transparent; color: #9fb0c8; border: none;
  padding: 10px 0; font-size: 14px; letter-spacing: 2px; cursor: pointer; box-shadow: none;
  border-bottom: 2px solid transparent; border-radius: 0; margin: 0; }
.auth-tabs .tab.active { color: #ffd84a; border-bottom-color: #ffd84a; }
#authForm label { display: block; margin-bottom: 12px; }
#authForm label > span { display: block; font-size: 12px; color: #9fb0c8; margin-bottom: 4px; letter-spacing: 1px; }
#authForm input { width: 100%; background: #0b1220; color: #e8ecf2;
  border: 1px solid #2a3850; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; outline: none; transition: border-color .15s; }
#authForm input:focus { border-color: #ffd84a; }
.auth-err { min-height: 18px; color: #ff6b6b; font-size: 12px; margin: 4px 0 10px; letter-spacing: 0.5px; }
.auth-submit { width: 100%; margin: 0 0 6px; }
.auth-tip { text-align: center; color: #6e7b91; font-size: 11px; margin: 10px 0 0; }

/* ===== User badge (top-right chip in hub) ===== */
.user-badge { position: fixed; top: 12px; right: 16px; z-index: 60;
  display: flex; gap: 8px; align-items: center;
  background: rgba(10, 16, 25, 0.75); backdrop-filter: blur(6px);
  border: 1px solid #2a3850; border-radius: 999px; padding: 4px 4px 4px 14px;
  font-size: 12px; color: #c9d4e6; letter-spacing: 1px; }
.user-badge .uname { color: #ffd84a; font-weight: 700; }
.user-badge .logout-btn { background: transparent; color: #9fb0c8; border: 1px solid #36465f;
  border-radius: 999px; padding: 3px 10px; font-size: 11px; margin: 0;
  box-shadow: none; letter-spacing: 1px; }
.user-badge .logout-btn:hover { color: #ff6b6b; border-color: #ff6b6b; transform: none; }

/* ===== Lobby strip (top centered: online count + marquee) ===== */
.lobby-strip { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 55;
  display: flex; align-items: center; gap: 10px; max-width: min(680px, 78%);
  background: rgba(10, 16, 25, 0.78); backdrop-filter: blur(8px);
  border: 1px solid #2a3850; border-radius: 999px;
  padding: 6px 16px; font-size: 12px; color: #c9d4e6; letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45); }
.lobby-strip.hide { display: none; }
.lobby-strip .ls-online b { color: #4dffa0; margin-left: 4px; }
.lobby-strip .ls-queue b  { color: #ffd84a; margin-left: 4px; }
.lobby-strip .ls-queue.hide { display: none; }
.lobby-strip .ls-sep { color: #36465f; }
.lobby-strip .ls-marquee { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #e8ecf2; }
.lobby-strip .ls-marquee #lsAnnounce.pulse { animation: ls-pulse 0.9s ease; }
.lobby-strip .ls-marquee #lsAnnounce[data-level="warn"]  { color: #ff9a4a; }
.lobby-strip .ls-marquee #lsAnnounce[data-level="event"] { color: #ffd84a; }
@keyframes ls-pulse { 0% { text-shadow: 0 0 0 rgba(255,216,74,0); } 50% { text-shadow: 0 0 14px rgba(255,216,74,0.9); } 100% { text-shadow: 0 0 0 rgba(255,216,74,0); } }

/* ===== Match overlay (matchmaking panel) ===== */
.match-panel { max-width: 460px; }
.match-panel .match-status { padding: 10px 0; color: #c9d4e6; }
.match-panel .match-dot { display: flex; justify-content: center; gap: 8px; margin: 8px 0 14px; }
.match-panel .match-dot span { width: 10px; height: 10px; border-radius: 50%; background: #ffd84a;
  opacity: 0.35; animation: mm-dot 1.1s ease-in-out infinite; }
.match-panel .match-dot span:nth-child(2) { animation-delay: 0.2s; }
.match-panel .match-dot span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mm-dot { 0%,100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 1; transform: scale(1.4); } }
.match-panel .match-line { font-size: 14px; margin: 4px 0; }
.match-panel .match-line b { color: #4dffa0; font-size: 16px; }
.match-panel .match-hint { color: #6e7b91; font-size: 12px; margin-top: 8px; }
.match-panel .match-found { margin-top: 16px; padding: 14px; border: 1px dashed #4dffa0; border-radius: 12px; }
.match-panel .match-found.hide { display: none; }
.match-panel .match-found h2 { margin: 0 0 10px; color: #4dffa0; }
.match-panel .match-faction b { color: #ffd84a; }
.match-panel .match-countdown { margin-top: 6px; color: #ff9a4a; font-size: 18px; }
.match-panel .match-countdown b { font-size: 28px; color: #ff6b6b; margin-right: 4px; }

/* ===== Overlays ===== */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 20%, rgba(30,60,90,0.4) 0%, rgba(5,7,12,0.92) 80%);
  backdrop-filter: blur(4px); transition: opacity .25s ease; z-index: 50;
}
.overlay.hide { opacity: 0; pointer-events: none; }
.overlay.show { opacity: 1; }
.panel { width: min(560px, 92%); background: linear-gradient(160deg,#141d2e,#0a1019);
  border: 1px solid #2a3850; border-radius: 14px; padding: 28px; text-align: center;
  box-shadow: 0 14px 40px rgba(0,0,0,0.6); }
.panel h1 { margin: 0 0 10px; color: #ffd84a; letter-spacing: 1px; }
.panel h1.red { color: #ff5a5a; }
.panel p { color: #a5b3c8; margin: 4px 0 14px; }

button { background: linear-gradient(180deg,#ffb84a,#d67a22); color: #1a1105;
  border: none; padding: 10px 26px; border-radius: 8px; font-weight: 800;
  font-size: 14px; letter-spacing: 1px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(255,150,40,0.35); margin: 4px; }
button:hover { transform: translateY(-1px); }
button:disabled { background: #444; color: #999; box-shadow: none; cursor: not-allowed; }
button.ghost { background: transparent; color: #a5b3c8; border: 1px solid #36465f; box-shadow: none; }

/* ===== Hub ===== */
.hub-panel { width: min(1100px, 96%); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(160deg,#111a2b,#07090f);
  border: 1px solid #2a3850; border-radius: 16px; padding: 22px 28px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.8); }
.hub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.brand { font-size: 28px; font-weight: 900; letter-spacing: 3px; color: #ffd84a;
  text-shadow: 0 0 12px rgba(255,200,60,0.6); }
.brand span { color: #ff5a5a; }
.hub-panel h2 { margin: 18px 0 10px; color: #fff; font-size: 15px;
  border-left: 3px solid #ffd84a; padding-left: 10px; letter-spacing: 2px; }
.chip { background: #151d2c; border: 1px solid #36465f; padding: 4px 10px; border-radius: 14px;
  font-size: 12px; color: #c9d4e6; margin-left: 6px; }
.chip b { color: #fff; }
.chip.gold { color: #ffd84a; border-color: #7a5a18; }

.map-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.map-card { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  border: 1px solid #2a3850; cursor: pointer; transition: transform .15s, border-color .15s; }
.map-card:hover { transform: translateY(-2px); border-color: #ffd84a; }
.map-card img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8); }
.map-card .meta { position: absolute; inset: auto 0 0 0; padding: 10px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent); text-align: left; }
.map-card .name { font-weight: 800; color: #ffd84a; font-size: 16px; }
.map-card .risk { font-size: 11px; }
.risk.low { color: #6bd16a; }
.risk.mid { color: #ffb84a; }
.risk.high { color: #ff5a5a; }
.map-card .drops { font-size: 11px; color: #c9d4e6; margin-top: 2px; }
.map-card .cost { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.7);
  padding: 3px 8px; border-radius: 12px; color: #ffd84a; font-size: 12px; font-weight: 700; }
.map-card.locked { opacity: .45; cursor: not-allowed; }

.shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.shop-item { background: #111827; border: 1px solid #2a3850; border-radius: 10px;
  padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.shop-item img { width: 100px; height: 60px; object-fit: contain; }
.shop-item .name { font-weight: 700; color: #fff; font-size: 13px; }
.shop-item .desc { font-size: 11px; color: #93a3bc; min-height: 28px; text-align: center; }
.shop-item .price { color: #ffd84a; font-weight: 700; font-size: 13px; }
.shop-item.owned button { background: #2a6a3a; color: #fff; cursor: default; }

.tip { margin-top: 10px; font-size: 12px; color: #6f8099; text-align: center; }

/* ===== In-game HUD ===== */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.hud.hide { display: none; }
.hud-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; align-items: center; font-size: 13px; color: #fff;
  background: rgba(0,0,0,0.5); padding: 4px 12px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1); }
.extract-dir { color: #6bffb0; font-weight: 700; }

.crosshair { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px;
  transform: translate(-50%, -50%); }
.crosshair .cross { position: absolute; background: #fff; opacity: 0.85; }
.crosshair .v { left: 50%; top: 0; width: 2px; height: 6px; transform: translateX(-50%); }
.crosshair .v::after { content: ""; position: absolute; bottom: -22px; left: 0; width: 2px; height: 6px; background: #fff; }
.crosshair .h { top: 50%; left: 0; width: 6px; height: 2px; transform: translateY(-50%); }
.crosshair .h::after { content: ""; position: absolute; right: -22px; top: 0; width: 6px; height: 2px; background: #fff; }
.crosshair .dot { position: absolute; top: 50%; left: 50%; width: 2px; height: 2px;
  background: #ffd84a; transform: translate(-50%, -50%); border-radius: 50%; }

.hud-left { position: absolute; left: 18px; bottom: 18px; }
.hp-wrap { position: relative; width: 220px; height: 18px; background: #1a1010;
  border: 1px solid #50201a; border-radius: 9px; overflow: hidden; }
.hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg,#ff4d4d,#ff8a4d); transition: width 0.2s; }
.hp-wrap span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }

/* Armor bar: slim shield strip right under the HP bar. */
.armor-wrap { margin-top: 4px; position: relative; width: 220px; height: 14px;
  background: #0f1520; border: 1px solid #3a6a9a; border-radius: 7px;
  overflow: visible; display: flex; align-items: center; }
.armor-wrap.hide { display: none; }
.armor-fill { position: absolute; inset: 0; width: 100%;
  background: linear-gradient(90deg,#6bd0ff,#9fe9ff);
  border-radius: 7px; transition: width 0.2s; }
.armor-wrap .armor-label { position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: 1px; z-index: 2; }
.armor-wrap .armor-num { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; z-index: 2; }
.armor-wrap .armor-tier { position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  margin-left: 6px; padding: 1px 6px; background: rgba(0,0,0,0.6); border: 1px solid #3a6a9a;
  border-radius: 5px; font-size: 10px; color: #cfe6ff; white-space: nowrap; }
.inv-mini { margin-top: 8px; display: grid; grid-template-columns: repeat(8, 28px); gap: 3px; }
.inv-mini .slot { width: 28px; height: 28px; background: rgba(0,0,0,0.55); border: 1px solid #36465f;
  border-radius: 4px; position: relative; }
.inv-mini .slot img { width: 100%; height: 100%; object-fit: contain; }
.inv-mini .slot b { position: absolute; bottom: -1px; right: 2px; font-size: 10px;
  color: #ffd84a; text-shadow: 0 1px 2px #000; }

.hud-right { position: absolute; right: 18px; bottom: 18px; text-align: right; }
.weapon-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.55);
  border: 1px solid #36465f; border-radius: 10px; padding: 6px 12px; }
.weapon-chip img { width: 56px; height: 28px; object-fit: contain; }
.weapon-chip span { color: #fff; font-size: 13px; }
.weapon-chip b { color: #ffd84a; font-size: 15px; margin-left: 4px; }
.hint { margin-top: 8px; background: rgba(0,0,0,0.55); padding: 4px 10px;
  border-radius: 8px; font-size: 12px; color: #6bffb0; min-height: 22px; display: inline-block; }
.hint:empty { display: none; }

.extract-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 120px; height: 120px; }
.extract-ring.hide { display: none; }
.extract-label { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #6bffb0; font-weight: 800; font-size: 13px; }

.damage-vignette { position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 180px 40px rgba(255,0,0,0); transition: box-shadow 0.1s; }

/* medkit HUD row */
.medkit-row { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.55); border: 1px solid #2a5040; border-radius: 8px;
  padding: 3px 10px; color: #b6ffd6; font-size: 12px; }
.medkit-row .mk-ico { color: #4dffa0; font-weight: 900; }
.medkit-row b { color: #fff; font-size: 14px; }
.medkit-row .mk-key { margin-left: 4px; padding: 0 6px; background: #1a2a22; color: #6bffb0;
  border: 1px solid #2a5040; border-radius: 4px; font-size: 10px; }

/* Radiation HUD (savanna only) */
.rad-wrap { margin-top: 6px; position: relative; width: 220px; height: 18px;
  background: #0b1230; border: 1px solid #3a5acc; border-radius: 9px;
  overflow: visible; display: flex; align-items: center; }
.rad-wrap.hide { display: none; }
.rad-fill { position: absolute; inset: 0; width: 100%;
  background: linear-gradient(90deg, #ff4d4d 0%, #ffd84a 35%, #4dffa0 75%, #6bd0ff 100%);
  border-radius: 9px; transition: width 0.2s; }
.rad-wrap .rad-label { position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: 1px; z-index: 2; }
.rad-wrap .rad-num { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; z-index: 2; }
.rad-wrap .rad-chip { position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  margin-left: 8px; padding: 2px 8px; background: rgba(0,0,0,0.6); border: 1px solid #3a5acc;
  border-radius: 6px; font-size: 11px; color: #9fb7ff; white-space: nowrap; }
.rad-wrap .rad-chip b { color: #fff; margin: 0 2px; }
.rad-wrap .rad-chip .mk-key { margin-left: 4px; padding: 0 5px; background: #1a224a;
  color: #9fb7ff; border: 1px solid #3a5acc; border-radius: 3px; font-size: 10px; }
.rad-wrap .rad-plate { position: absolute; right: -78px; top: 50%; transform: translateY(-50%);
  padding: 2px 8px; background: rgba(20,60,30,0.75); border: 1px solid #3dd06a;
  border-radius: 6px; font-size: 11px; color: #a2ffc8; white-space: nowrap; }

/* Radiation edge vignette when the rad bar is low */
.rad-vignette { position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 180px 40px rgba(60,110,255,0); transition: box-shadow 0.2s; }
.rad-vignette.hide { display: none; }

/* healing channel bar (bottom-center) */
.heal-bar { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%);
  width: 260px; height: 14px; background: rgba(0,0,0,0.65); border: 1px solid #2a5040;
  border-radius: 7px; overflow: hidden; }
.heal-bar.hide { display: none; }
.heal-fill { height: 100%; width: 0%; background: linear-gradient(90deg,#4dffa0,#b6ffd6); transition: width 0.08s; }
.heal-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: 2px; }

/* medkit shop row (hub) */
.med-shop { display: flex; gap: 10px; align-items: stretch; }
.med-shop .med-item { flex: 1; background: #111827; border: 1px solid #2a3850; border-radius: 10px;
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.med-shop .med-item .title { color: #fff; font-weight: 700; }
.med-shop .med-item .desc { color: #93a3bc; font-size: 12px; margin-top: 2px; }
.med-shop .med-item .price { color: #ffd84a; font-weight: 700; margin-right: 6px; }
.med-shop .med-item button { margin: 0; padding: 8px 18px; }

/* summary / death */
.sum-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.sum-item { background: #0f1726; border: 1px solid #2a3850; border-radius: 8px; padding: 8px; }
.sum-item img { width: 40px; height: 40px; object-fit: contain; }
.sum-item .n { color: #ffd84a; font-weight: 700; }
.sum-total { margin: 10px 0; font-size: 16px; color: #ffd84a; }
.sum-total b { font-size: 22px; }

/* ===== Brand GOLD easter egg ===== */
#brandGold { cursor: pointer; user-select: none; transition: text-shadow .2s, transform .15s; }
#brandGold:hover { text-shadow: 0 0 18px rgba(255,200,60,0.9); }
#brandGold.armed { color: #fff8c0; text-shadow: 0 0 22px #ffe066, 0 0 10px #fff; transform: scale(1.05); }
#brandGold.unlocked { color: #ff9aa0; text-shadow: 0 0 22px #ff4444; animation: goldPulse 1.2s infinite; }
@keyframes goldPulse { 0%,100% { text-shadow: 0 0 10px #ff4444; } 50% { text-shadow: 0 0 22px #ff8888, 0 0 8px #fff; } }

.hub-toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(20,0,0,0.88); border: 1px solid #ff5555; color: #ffd2d2;
  padding: 8px 18px; border-radius: 10px; font-size: 13px; z-index: 200;
  box-shadow: 0 0 24px rgba(255,60,60,0.5); letter-spacing: 1px; }

/* ===== Bag panel ===== */
.bag-panel { width: min(640px, 92%); }
.bag-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  margin: 14px 0; max-height: 46vh; overflow-y: auto; padding: 4px; }
.bag-grid .cell { aspect-ratio: 1/1; background: #0f1726; border: 1px solid #2a3850;
  border-radius: 8px; position: relative; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s, transform .1s; }
.bag-grid .cell.empty { cursor: default; opacity: 0.6; }
.bag-grid .cell:not(.empty):hover { border-color: #ff5a5a; transform: translateY(-1px); }
.bag-grid .cell:not(.empty):hover::after { content: "丢弃"; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; background: rgba(200,30,30,0.75); color: #fff;
  font-weight: 800; border-radius: 8px; letter-spacing: 2px; }
.bag-grid .cell img { max-width: 74%; max-height: 74%; object-fit: contain; }
.bag-grid .cell b { position: absolute; right: 4px; bottom: 2px; color: #ffd84a;
  font-size: 11px; text-shadow: 0 1px 2px #000; }
.bag-grid .cell .nm { position: absolute; left: 4px; top: 2px; color: #9fb0c8; font-size: 10px; }
.bag-foot { display: flex; justify-content: space-between; color: #c9d4e6; font-size: 13px; margin-bottom: 10px; }
.bag-foot b { color: #ffd84a; }

/* ===== Big announcement toast ===== */
.big-announce { position: absolute; top: 20%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; transition: opacity .4s ease; z-index: 40; }
.big-announce.hide { opacity: 0; }
.big-announce.show { opacity: 1; }
.big-announce .ann-title { font-size: 28px; font-weight: 900; letter-spacing: 3px;
  color: #ffd84a; text-shadow: 0 0 24px rgba(255,200,60,0.85), 0 2px 6px #000;
  background: rgba(10,8,4,0.55); padding: 12px 28px; border-radius: 12px;
  border: 1px solid rgba(255,200,60,0.55); }
.big-announce .ann-sub { margin-top: 8px; font-size: 15px; color: #fff2c8;
  letter-spacing: 2px; text-shadow: 0 1px 3px #000; background: rgba(0,0,0,0.5);
  display: inline-block; padding: 6px 14px; border-radius: 8px; }

/* ===== Secret map zombie counter ===== */
.secret-counter { position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; background: rgba(30,0,0,0.65); border: 1px solid rgba(255,80,80,0.6);
  color: #ffc4c4; font-weight: 800; letter-spacing: 2px; border-radius: 8px; font-size: 13px;
  pointer-events: none; z-index: 35; text-shadow: 0 0 6px #ff4040; }
.secret-counter b { color: #ff8080; }
.secret-counter.hide { display: none; }

/* ===== Battlefield reinforcement counter ===== */
.reinforce-counter { position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; background: rgba(30,0,0,0.7); border: 1px solid rgba(255,80,80,0.75);
  color: #ffdddd; font-weight: 800; letter-spacing: 2px; border-radius: 8px; font-size: 13px;
  pointer-events: none; z-index: 35; text-shadow: 0 0 8px #ff3040; }
.reinforce-counter b { color: #ff6060; }
.reinforce-counter.hide { display: none; }

/* ===== Nuclear strike countdown (big flashing overlay) ===== */
.nuke-countdown { position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none; z-index: 42;
  background: rgba(60,0,0,0.75); border: 2px solid #ff3030; border-radius: 14px;
  padding: 14px 32px; box-shadow: 0 0 40px rgba(255,50,50,0.6), inset 0 0 20px rgba(255,80,80,0.4);
  animation: nukePulse 0.7s ease-in-out infinite alternate; }
.nuke-countdown.hide { display: none; }
.nuke-countdown .nuke-title { font-size: 22px; font-weight: 900; letter-spacing: 4px;
  color: #ff5050; text-shadow: 0 0 12px #ff0000, 0 2px 4px #000; }
.nuke-countdown .nuke-timer { font-size: 56px; font-weight: 900; line-height: 1; margin: 6px 0;
  color: #ffffff; text-shadow: 0 0 20px #ff2020, 0 0 40px #ff4040, 0 3px 6px #000; }
.nuke-countdown .nuke-timer span { font-size: 28px; margin-left: 4px; color: #ffc0c0; }
.nuke-countdown .nuke-sub { font-size: 16px; letter-spacing: 3px; color: #ffd0d0;
  text-shadow: 0 0 6px #ff6060, 0 1px 3px #000; }
@keyframes nukePulse {
  from { box-shadow: 0 0 40px rgba(255,50,50,0.5), inset 0 0 20px rgba(255,80,80,0.3); }
  to   { box-shadow: 0 0 70px rgba(255,80,80,1.0),   inset 0 0 30px rgba(255,120,120,0.6); }
}

/* ===== Sniper scope overlay ===== */
.scope-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.scope-overlay.hide { display: none; }
.scope-overlay::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0 min(48vw, 48vh), #000 min(48vw, 48vh) 100%);
}
.scope-ring {
  position: absolute; left: 50%; top: 50%;
  width: min(96vw, 96vh); height: min(96vw, 96vh);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #0b0b0b, inset 0 0 24px 8px rgba(0,0,0,0.75),
              inset 0 0 0 10px #2b2b2b;
}
.scope-crosshair {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(70vw, 70vh); height: min(70vw, 70vh);
}
.sc-line { position: absolute; background: #0a0a0a; }
.sc-v { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.sc-h { top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); }
.sc-dot { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px;
  background: #d22; border-radius: 50%; transform: translate(-50%, -50%); }
.sc-tick { position: absolute; background: #0a0a0a; }
.sc-t-up    { left: 50%; top: 20%; width: 2px; height: 12px; transform: translateX(-50%); }
.sc-t-down  { left: 50%; bottom: 20%; width: 2px; height: 12px; transform: translateX(-50%); }
.sc-t-left  { top: 50%; left: 20%; width: 12px; height: 2px; transform: translateY(-50%); }
.sc-t-right { top: 50%; right: 20%; width: 12px; height: 2px; transform: translateY(-50%); }
.scope-zoom { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  color: #ffd84a; font-weight: 900; font-size: 16px; letter-spacing: 1px;
  background: rgba(0,0,0,0.7); padding: 4px 10px; border-radius: 6px;
  border: 1px solid rgba(255,216,74,0.5); }

/* ===== Battlefield achievements grid ===== */
.achievements-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.ach-card { padding: 10px 12px; border-radius: 10px; border: 1px solid #3a4658;
  background: linear-gradient(140deg, #1a2233 0%, #121826 100%); min-height: 70px;
  display: flex; flex-direction: column; gap: 4px; position: relative; }
.ach-card.locked { opacity: 0.45; filter: grayscale(0.7); }
.ach-card .ach-title { font-weight: 900; letter-spacing: 1px; color: #ffd84a; font-size: 15px; }
.ach-card.locked .ach-title { color: #6b7890; }
.ach-card .ach-sub { font-size: 12px; color: #aec0dc; }
.ach-card .ach-badge { position: absolute; top: 8px; right: 10px; font-size: 11px;
  color: #2e8b3a; font-weight: 900; }
.ach-card.locked .ach-badge { color: #556; }

/* ===== Ammo-Fit bench (hidden achievement reward) ===== */
#ammoFitSection { border: 1px dashed #4a7a3a; border-radius: 12px;
  padding: 6px 14px 14px; margin-top: 14px;
  background: linear-gradient(160deg, rgba(60,120,40,0.12), rgba(10,20,10,0.2)); }
.ammofit-bench { display: flex; flex-direction: column; gap: 10px; }
.ammofit-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center;
  background: #0f1726; border: 1px solid #2a3850; border-radius: 10px;
  padding: 10px 14px; }
.ammofit-weapon { display: flex; align-items: center; gap: 10px; }
.ammofit-weapon img { width: 42px; height: 42px; object-fit: contain;
  background: #0a1320; border-radius: 6px; padding: 4px; }
.ammofit-weapon .title { font-weight: 800; color: #ffd84a; font-size: 14px; letter-spacing: 1px; }
.ammofit-weapon .desc { font-size: 11px; color: #9fb0c8; margin-top: 2px; }
.ammofit-weapon .desc b { color: #fff2c8; }
.ammofit-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.ammofit-chip { display: flex; flex-direction: column; align-items: flex-start;
  background: #151d2c; color: #c9d4e6; border: 1px solid #36465f;
  border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700;
  letter-spacing: 1px; cursor: pointer; box-shadow: none; margin: 0;
  transition: border-color .15s, transform .1s, background .15s; }
.ammofit-chip small { font-weight: 400; font-size: 10px; color: #8ea0b8; letter-spacing: 0; margin-top: 2px; }
.ammofit-chip:hover { border-color: #ffd84a; transform: translateY(-1px); }
.ammofit-chip.active { background: linear-gradient(180deg,#6ad16a,#3a8a2a); color: #0a1a06;
  border-color: #8fffa0; box-shadow: 0 0 12px rgba(120,220,120,0.45); }
.ammofit-chip.active small { color: #1a2a06; }
.ammofit-chip.disabled, .ammofit-chip:disabled { opacity: 0.35; cursor: not-allowed;
  background: #0e1624; border-color: #2a3850; transform: none; }
