/* Helmet HUD v2 - overlay only, hardened against the game's global CSS.
   The game's stylesheet has  div{min-width:300px;max-width:300px;margin-top:10px;font-size:1.25vw;text-shadow;font-family}
   and  i{padding:1vh;font-size:2vw}  and  #sceneGameMapBottomRight{width:170px!important} / canvas{height:auto!important}.
   v2 therefore uses NO div/i/b/span/small: only custom elements <vhud-*>, which no game rule targets,
   every selector is rooted at the id #vhud2, and the root resets inherited styles. */
#vhud2{all:initial;position:fixed!important;left:0!important;top:0!important;right:auto!important;bottom:auto!important;
  width:100vw!important;height:100vh!important;min-width:0!important;max-width:none!important;min-height:0!important;max-height:none!important;
  margin:0!important;padding:0!important;border:0!important;transform:none!important;z-index:9300!important;pointer-events:none!important;
  overflow:hidden!important;display:none;box-sizing:border-box;contain:layout style;
  font-family:Orbitron,sans-serif;font-size:16px;line-height:1.2;color:#3ff;
  --c:#3ff;--g:0 0 4px #3ff,0 0 12px rgba(51,255,255,.6);}
#vhud2.vhud2-on{display:block!important}
#vhud2 *,#vhud2 *::before,#vhud2 *::after{box-sizing:border-box;margin:0;padding:0;min-width:0;max-width:none;font-family:inherit;line-height:inherit;letter-spacing:normal;text-shadow:none;pointer-events:none}
#vhud2 vhud-l,#vhud2 vhud-i{display:block}
#vhud2 vhud-t{display:inline}
#vhud2 #vhud2-sway{position:absolute;left:0;top:0;width:100%;height:100%;perspective:900px;animation:vhud2Sway 6s ease-in-out infinite}
@keyframes vhud2Sway{0%,100%{transform:translate(0,0) rotate(0)}50%{transform:translate(3px,-4px) rotate(.15deg)}}
#vhud2 .vhud2-h{color:#3ff;text-shadow:var(--g);animation:vhud2Flick 4s infinite}
@keyframes vhud2Flick{0%,96%,100%{opacity:1;filter:none}97%{opacity:.75;filter:drop-shadow(2px 0 0 rgba(255,0,80,.6)) drop-shadow(-2px 0 0 rgba(0,120,255,.6))}}
/* TOP CENTER: team + health + score */
#vhud2 #vhud2-top{position:absolute;top:5vh;left:50%;width:27vw;transform:translateX(-50%) rotateX(12deg);text-align:center}
#vhud2 #vhud2-team{font-size:1.1vw;letter-spacing:.3em}
#vhud2 #vhud2-bar{position:relative;width:100%;height:1.6vw;margin:.5vw 0;border:1px solid rgba(51,255,255,.8);box-shadow:0 0 7px rgba(51,255,255,.55),inset 0 0 8px rgba(51,255,255,.3);background:rgba(0,40,50,.28);clip-path:polygon(2% 0,98% 0,100% 50%,98% 100%,2% 100%,0 50%)}
#vhud2 #vhud2-fill{position:absolute;left:3px;top:3px;bottom:3px;width:calc(100% - 6px);background:linear-gradient(90deg,rgba(34,255,136,.55),rgba(51,255,255,.55));box-shadow:0 0 8px rgba(51,255,255,.5);clip-path:polygon(2% 0,98% 0,100% 50%,98% 100%,2% 100%,0 50%);transition:width .3s}
#vhud2 #vhud2-fill.vhud2-mid{background:linear-gradient(90deg,rgba(255,221,51,.55),rgba(255,170,34,.55))}
#vhud2 #vhud2-fill.vhud2-low{background:linear-gradient(90deg,rgba(255,51,51,.55),rgba(255,136,68,.55))}
#vhud2 #vhud2-scorewrap{display:block;font-size:1.6vw;font-weight:800;line-height:1}
#vhud2 .vhud2-scorelbl{font-size:.7vw;font-weight:800;letter-spacing:.25em;opacity:.8;vertical-align:middle}
#vhud2 #vhud2-score{font-size:1.6vw;font-weight:800}
/* Toast message, stacked centered UNDER the score (pickups / shield etc.). White text, cyan glow. */
/* Smaller + WRAPPING toast so long messages ("OUT OF AMMO - RETURN TO BASE...") fit on
   screen on their own line(s) instead of overflowing both edges. Centered, max 70vw. */
#vhud2 #ssbHudToast{display:block;margin:.6vw auto 0;max-width:70vw;font-size:0.95vw;font-weight:800;letter-spacing:.08em;color:#ffffff;text-shadow:0 0 4px #3ff,0 0 12px rgba(51,255,255,.75),0 2px 6px #000;opacity:0;transition:opacity .4s;white-space:normal;overflow-wrap:break-word;line-height:1.25;text-align:center;min-height:0.95vw}
#vhud2 #ssbHudToast.vhud2-toaston{opacity:1}
/* RED variant kept WHITE per request (just a warning glow, not red text). */
#vhud2 #ssbHudToast.vhud2-toastred{color:#ffffff;text-shadow:0 0 5px #f66,0 0 14px rgba(255,80,80,.7),0 2px 6px #000}
#vhud2 .vhud2-side{position:absolute;padding:.6vw 1vw;border-top:2px solid #3ff;border-bottom:2px solid #3ff;background:linear-gradient(90deg,rgba(0,60,70,.25),transparent);box-shadow:0 0 7px rgba(51,255,255,.75),0 0 16px rgba(51,255,255,.45),inset 0 0 10px rgba(51,255,255,.25)}
/* TOP RIGHT: team scores + players (left of the game's EXIT/REC buttons) */
#vhud2 #vhud2-teams{top:15vh;right:6.5vw;left:auto;transform:rotateY(-24deg);transform-origin:right center;text-align:right;font-size:1.3vw;white-space:nowrap}
#vhud2 #vhud2-teams .vhud2-red{color:#f45;text-shadow:0 0 8px #f45}
#vhud2 #vhud2-teams vhud-l.vhud2-sub{font-size:.9vw;margin-top:.3vw;letter-spacing:.2em}

/* CENTER: crosshair (fixed square, always a circle) */
#vhud2 #vhud2-xhair{position:absolute;left:50%;top:50%;width:56px;height:56px;aspect-ratio:1/1;margin:-28px 0 0 -28px;border:2px solid #3ff;border-radius:50%;box-shadow:var(--g),inset 0 0 6px #3ff}
#vhud2 #vhud2-xhair::before,#vhud2 #vhud2-xhair::after{content:"";position:absolute;background:#3ff;box-shadow:var(--g)}
#vhud2 #vhud2-xhair::before{left:50%;top:-30%;width:2px;height:160%;margin-left:-1px;clip-path:polygon(0 0,100% 0,100% 30%,0 30%,0 70%,100% 70%,100% 100%,0 100%)}
#vhud2 #vhud2-xhair::after{top:50%;left:-30%;height:2px;width:160%;margin-top:-1px;clip-path:polygon(0 0,30% 0,30% 100%,0 100%,0 0,70% 0,100% 0,100% 100%,70% 100%)}
/* BOTTOM LEFT: item slots */
#vhud2 #vhud2-items{bottom:6vh;left:5vw;transform:rotateY(22deg);transform-origin:left center;display:flex;gap:1vw}
#vhud2 .vhud2-slot{position:relative;display:flex;align-items:center;justify-content:center;width:4.2vw;height:4.2vw;flex:0 0 4.2vw;font-size:1.8vw;border:1px solid #3ff;box-shadow:var(--g);background:rgba(0,50,60,.3);clip-path:polygon(15% 0,100% 0,100% 85%,85% 100%,0 100%,0 15%)}
#vhud2 .vhud2-slot.vhud2-empty{opacity:.55}
/* Pickup flash: pulse a slot's glow a few times when that pack type is collected. */
#vhud2 .vhud2-slot.vhud2-flash{animation:vhud2SlotFlash .45s ease-out 3}
@keyframes vhud2SlotFlash{
  0%{box-shadow:var(--g);background:rgba(0,50,60,.3);filter:none}
  40%{box-shadow:0 0 14px #3ff,0 0 34px rgba(51,255,255,.95),inset 0 0 18px rgba(51,255,255,.6);background:rgba(51,255,255,.35);filter:brightness(1.6)}
  100%{box-shadow:var(--g);background:rgba(0,50,60,.3);filter:none}
}
#vhud2 .vhud2-slot .vhud2-cnt{position:absolute;bottom:2px;right:5px;font-size:.8vw;font-weight:800}
#vhud2 .vhud2-slot .vhud2-key{position:absolute;top:2px;left:6px;font-size:.6vw;opacity:.7}
/* TOP LEFT: ammo panel, mirroring the top-right team panel (top:9vh, left-facing tilt)
   so it fills the empty top-left corner. */
#vhud2 #vhud2-ammo{top:15vh;left:6.5vw;bottom:auto;right:auto;transform:rotateY(24deg);transform-origin:left center;text-align:left;white-space:nowrap}
#vhud2 #vhud2-ammo .vhud2-num{font-size:2.6vw;font-weight:800}
/* Fixed-width ammo digits so the panel never reflows while firing. Tabular
   monospace = every glyph the same width; inline-block + min-width + right-align
   reserves a stable box so "0970" vs "1000" (and "EMPTY") don't shift the
   " / 1000 PULSE RIFLE" text that follows. */
#vhud2 #vhud2-ammo-cur{display:inline-block;min-width:5ch;text-align:right;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
#vhud2 #vhud2-ammo .vhud2-dim{font-size:1vw;opacity:.7}
#vhud2 #vhud2-ammo.vhud2-low .vhud2-num{color:#f54;text-shadow:0 0 8px #f54}
/* BOTTOM RIGHT: round minimap, always square */
#vhud2 #vhud2-map{position:absolute;bottom:5vh;right:5vw;width:12vw;height:12vw;aspect-ratio:1/1;border-radius:50%;overflow:hidden;border:2px solid #3ff;box-shadow:var(--g),inset 0 0 20px rgba(51,255,255,.4);background:rgba(0,30,40,.5);transform:rotateY(-22deg) rotateX(10deg)}
#vhud2 #vhud2-map #sceneGameMapBottomRight{position:absolute!important;left:0!important;top:0!important;width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;display:block!important;overflow:hidden!important}
#vhud2 #vhud2-map #sceneGameMapBottomRight canvas{position:absolute!important;left:0!important;top:0!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover;opacity:.85;filter:saturate(.6) hue-rotate(140deg) brightness(1.1)}
#vhud2 #vhud2-map .vhud2-rings{position:absolute;left:0;top:0;width:100%;height:100%;background:repeating-radial-gradient(circle,transparent 0 18%,rgba(51,255,255,.2) 18.5% 19%)}
/* Radar sweep: the BRIGHT edge must LEAD the clockwise spin with the fade trailing
   BEHIND it (comet tail). conic-gradient goes clockwise from 12 o'clock, so put the
   solid edge at the END of the wedge (100%) and fade back over the preceding 25%. */
#vhud2 #vhud2-map .vhud2-sweep{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:50%;background:conic-gradient(transparent 0 75%,rgba(51,255,255,.3));animation:vhud2Spin 4s linear infinite}
#vhud2 #vhud2-map .vhud2-me{position:absolute;left:50%;top:50%;width:0;height:0;border-left:.7vw solid transparent;border-right:.7vw solid transparent;border-bottom:1.4vw solid #fd2;transform:translate(-50%,-70%);filter:drop-shadow(0 0 4px #fd2)}
@keyframes vhud2Spin{to{transform:rotate(1turn)}}
/* visor glass + hit glow */
/* SCANLINES REMOVED 20261024: the horizontal repeating-linear-gradient(0deg,...) drew screen-fixed horizontal lines (the "banding"). Keep only the diagonal glass sheen. */
#vhud2 #vhud2-visor{position:absolute;left:0;top:0;width:100%;height:100%;background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.035) 38%,transparent 46%)}
#vhud2 #vhud2-hit{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;box-shadow:inset 0 0 3vw rgba(255,0,30,.6);transition:opacity .4s}
#vhud2 #vhud2-hit.vhud2-on{opacity:1;transition:none}
/* EXIT: restyled in place, only clickable element */
html body #ssbExitBtn.vhud2-exit{pointer-events:auto!important;background:rgba(0,40,50,.35)!important;border:1px solid #3ff!important;border-radius:0!important;color:#3ff!important;font:700 .9rem Orbitron,sans-serif!important;letter-spacing:.2em!important;text-shadow:0 0 4px #3ff,0 0 12px rgba(51,255,255,.6)!important;box-shadow:0 0 4px #3ff,0 0 12px rgba(51,255,255,.6)!important;clip-path:polygon(10% 0,100% 0,90% 100%,0 100%);height:40px!important;padding:0 26px!important;z-index:100000!important}
/* Old HUD hidden (not deleted) while v2 is active */
html body.vhud2-active #ssbTeamBoard,html body.vhud2-active #ssbInventoryBar,html body.vhud2-active #sceneGameMapBottomRightWrapper,html body.vhud2-active #imgReticle{display:none!important}

/* ===== CSS HELMET FRAME 20261028 (replaces the full-screen ssb-visor.js SVG overlay, which is no
   longer loaded: it repainted a full-viewport SVG with a 40px Gaussian blur every frame).
   Same look rebuilt from borders / clip-path / box-shadow / pseudo-elements. All pointer-events:none,
   so it never blocks touch controls. Lives inside #vhud2, so it shows/hides with the in-game HUD. */
#vhud2{--fl:rgba(58,168,255,.55);--fg:0 0 6px rgba(58,168,255,.6)}
/* helmet rim + soft blue vignette (cheap radial-gradient, no SVG filter) */
#vhud2 #vhud2-visor{background:
  linear-gradient(115deg,transparent 30%,rgba(255,255,255,.035) 38%,transparent 46%),
  radial-gradient(ellipse 78% 74% at 50% 48%,transparent 62%,rgba(10,58,138,.18) 84%,rgba(6,36,94,.5) 100%)}
#vhud2 #vhud2-visor::before{content:"";position:absolute;left:4vw;right:4vw;top:6vh;bottom:-2vh;border:2px solid var(--fl);border-bottom:0;
  border-radius:48% 48% 14% 14% / 9% 9% 42% 42%;box-shadow:var(--fg),inset 0 0 10px rgba(58,168,255,.25);opacity:.45}
/* top-centre notch tab above the BLUE bar */
#vhud2 #vhud2-visor::after{content:"";position:absolute;left:50%;top:2.4vh;width:26vw;height:2.8vh;transform:translateX(-50%);
  border:2px solid var(--fl);border-top:0;clip-path:polygon(0 0,100% 0,100% 100%,0 100%);
  border-radius:0 0 6px 6px;box-shadow:var(--fg);opacity:.5;
  -webkit-mask:linear-gradient(90deg,#000 0 38%,transparent 38% 62%,#000 62%);mask:linear-gradient(90deg,#000 0 38%,transparent 38% 62%,#000 62%)}
/* corner brackets framing each HUD panel */
#vhud2 .vhud2-side::before,#vhud2 .vhud2-side::after,#vhud2 #vhud2-top::before,#vhud2 #vhud2-top::after{content:"";position:absolute;width:1.4vw;height:1.4vw;min-width:12px;min-height:12px;border:2px solid #3ff;box-shadow:none;filter:drop-shadow(0 0 3px #3ff);opacity:.9}
#vhud2 .vhud2-side::before,#vhud2 #vhud2-top::before{left:-.7vw;top:-.7vw;border-right:0;border-bottom:0}
#vhud2 .vhud2-side::after,#vhud2 #vhud2-top::after{right:-.7vw;bottom:-.7vw;border-left:0;border-top:0}
/* angled end caps on the side panels (the slanted ends in the old art) */
#vhud2 .vhud2-side{clip-path:none;border-left:2px solid rgba(51,255,255,.5);border-right:2px solid rgba(51,255,255,.5);
  border-radius:3px}
/* minimap: outer tick ring + arc bracket */
#vhud2 #vhud2-mapframe{position:absolute;bottom:calc(5vh - 1.2vw);right:calc(5vw - 1.2vw);width:14.4vw;height:14.4vw;border-radius:50%;
  border:2px solid transparent;border-top-color:var(--fl);border-left-color:var(--fl);box-shadow:var(--fg);opacity:.6;
  transform:rotateY(-22deg) rotateX(10deg) rotate(-20deg)}
#vhud2 #vhud2-mapframe::before{content:"";position:absolute;inset:.5vw;border-radius:50%;
  background:repeating-conic-gradient(rgba(51,255,255,.7) 0 1deg,transparent 1deg 15deg);
  -webkit-mask:radial-gradient(circle,transparent 66%,#000 67% 70%,transparent 71%);mask:radial-gradient(circle,transparent 66%,#000 67% 70%,transparent 71%)}
/* side rim ticks (left/right of the helmet) */
#vhud2 #vhud2-sway::before,#vhud2 #vhud2-sway::after{content:"";position:absolute;top:39vh;width:3.5vw;height:17vh;border:2px solid var(--fl);filter:drop-shadow(0 0 3px rgba(58,168,255,.8));opacity:.45}
#vhud2 #vhud2-sway::before{left:1.5vw;border-left:0;clip-path:polygon(0 10%,100% 0,100% 100%,0 90%)}
#vhud2 #vhud2-sway::after{right:1.5vw;border-right:0;clip-path:polygon(0 0,100% 10%,100% 90%,0 100%)}
/* phones: thinner, smaller frame; keep it clear of the touch-control zones */
@media (max-width:900px),(pointer:coarse){
  #vhud2 #vhud2-visor::before{left:2vw;right:2vw;top:3vh;border-width:1px;opacity:.35}
  #vhud2 #vhud2-sway::before,#vhud2 #vhud2-sway::after{display:none}
  #vhud2 #vhud2-mapframe{border-width:1px}
  #vhud2 .vhud2-side::before,#vhud2 .vhud2-side::after,#vhud2 #vhud2-top::before,#vhud2 #vhud2-top::after{width:10px;height:10px;min-width:10px;min-height:10px}
}
