:root {
  --bg: #0b0d10; --panel: rgba(16, 19, 24, .94); --card: #161a21; --line: #262c36;
  --text: #e8ecf1; --muted: #8a94a3; --green: #3dff6e; --green-d: #1fb84a; --red: #ff4b4b;
  --gold: #ffd24a; --accent: #3dff6e;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); touch-action: none; user-select: none; -webkit-user-select: none; }
canvas#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
button { font: inherit; color: var(--text); background: #222833; border: 1px solid #333b48; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button:hover { border-color: #4a5566; }
button.primary { background: var(--green-d); border-color: var(--green); color: #04130a; font-weight: 700; }
button.primary:hover { background: var(--green); }
button:disabled { opacity: .45; cursor: not-allowed; }
input { font: inherit; color: var(--text); background: #0f1217; border: 1px solid #333b48; border-radius: 6px; padding: 8px 10px; width: 100%; margin-top: 4px; user-select: text; -webkit-user-select: text; }
label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------ menus */
.screen { position: fixed; inset: 0; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 16px; background: radial-gradient(ellipse at top, rgba(20,60,35,.55), rgba(8,10,12,.92) 60%); z-index: 20; touch-action: pan-y; }
.panel { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.panel.wide { max-width: 980px; }
.brand h1 { margin: 0; font-size: 44px; letter-spacing: 2px; font-weight: 900; }
.brand h1 span { color: var(--green); }
.brand p { margin: 4px 0 12px; color: var(--muted); }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.card h3 { margin: 0 0 8px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.seg button { padding: 6px 10px; font-size: 13px; }
.seg button.on { background: #173d25; border-color: var(--green); color: var(--green); }
.seg button:disabled { text-decoration: line-through; }
.math { background: #0f1217; border: 1px dashed #2d3440; border-radius: 8px; padding: 10px; font-size: 13px; line-height: 1.55; margin: 10px 0; }
.math b { color: var(--green); }
.math .warn { color: var(--gold); }
#roomlist { display: grid; gap: 8px; }
.room { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: #11151b; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.room .t { font-weight: 700; }
.room .m { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 2px 6px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.badge.free { background: #23324a; color: #8fb8ff; }
.badge.paid { background: #3c3514; color: var(--gold); }
.statebadge { display: inline-block; padding: 4px 10px; border-radius: 20px; background: #1d2530; font-size: 12px; letter-spacing: 1px; margin-bottom: 6px; }
.plist { display: grid; gap: 4px; margin: 10px 0; }
.plist div { display: flex; justify-content: space-between; background: #11151b; border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.ok { color: var(--green); } .no { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:nth-child(2), td:nth-child(2) { text-align: left; }
td.pos { color: var(--green); } td.neg { color: var(--red); }
#r-table { overflow-x: auto; }
#r-sigs a { color: #8fb8ff; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: grid; gap: 6px; pointer-events: none; }
#toast div { background: rgba(10,12,15,.95); border: 1px solid #333b48; padding: 8px 14px; border-radius: 8px; font-size: 13px; pointer-events: auto; max-width: 90vw; }
#toast div.err { border-color: var(--red); }
#toast a { color: #8fb8ff; margin-left: 6px; }

/* ------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; font-weight: 800; text-shadow: 0 2px 3px rgba(0,0,0,.6); }
#matchinfo { position: absolute; left: 12px; top: 8px; font-size: 13px; line-height: 1.35; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 4px; }
#modeline { color: #c9d1db; font-weight: 600; font-size: 11px; }
#timerbox { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); text-align: center; background: rgba(0,0,0,.45); border-radius: 6px; padding: 4px 14px; }
#timer { font-size: 22px; letter-spacing: 1px; }
#timersub { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
#timersub span { color: var(--green); }
#killfeed { position: absolute; right: 12px; top: 10px; display: grid; gap: 3px; justify-items: end; font-size: 12px; }
#killfeed div { background: rgba(0,0,0,.5); padding: 3px 8px; border-radius: 3px; animation: fadein .15s; }
#killfeed .me { outline: 1px solid var(--green); }
#killfeed .gun { color: var(--muted); margin: 0 6px; }
#killfeed .hs { color: var(--gold); }
#earnbox { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); text-align: right; background: rgba(0,0,0,.45); border-left: 3px solid var(--green); padding: 6px 12px; border-radius: 4px; }
#earnbox .lbl { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
#earned { font-size: 24px; color: var(--green); }
#net { font-size: 11px; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair i { position: absolute; background: #fff; box-shadow: 0 0 2px #000; }
#crosshair i:nth-child(1) { width: 2px; height: 8px; left: -1px; top: -16px; }
#crosshair i:nth-child(2) { width: 2px; height: 8px; left: -1px; top: 8px; }
#crosshair i:nth-child(3) { width: 8px; height: 2px; left: -16px; top: -1px; }
#crosshair i:nth-child(4) { width: 8px; height: 2px; left: 8px; top: -1px; }
#crosshair.ads i:nth-child(1) { top: -11px; } #crosshair.ads i:nth-child(2) { top: 3px; }
#crosshair.ads i:nth-child(3) { left: -11px; } #crosshair.ads i:nth-child(4) { left: 3px; }
#hitmarker { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; opacity: 0; background:
  linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
#hitmarker.on { animation: hm .22s ease-out; }
#hitmarker.hs { filter: drop-shadow(0 0 3px var(--gold)) sepia(1) saturate(8) hue-rotate(5deg); }
#hitmarker.kill { filter: drop-shadow(0 0 4px var(--red)) sepia(1) saturate(10) hue-rotate(-50deg); }
@keyframes hm { from { opacity: 1; transform: scale(1.3); } to { opacity: 0; transform: scale(1); } }
#killbanner { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); text-align: center; animation: pop .25s; }
#killbanner .skull { font-size: 30px; }
#kbname { color: var(--gold); display: inline-block; background: rgba(0,0,0,.55); padding: 2px 10px; margin-right: 4px; }
#kbtext { display: inline-block; background: rgba(0,0,0,.55); padding: 2px 10px; font-size: 13px; letter-spacing: 1px; }
#kbpay { color: var(--green); font-size: 14px; margin-top: 4px; }
#bigpay { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-size: min(14vw, 110px); color: var(--green); -webkit-text-stroke: 3px #062; text-shadow: 0 6px 0 #041, 0 0 30px rgba(61,255,110,.5); animation: bigpay 1.3s ease-out forwards; }
@keyframes bigpay { 0% { transform: translate(-50%, 20px) scale(.6); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.08); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -30px) scale(1); opacity: 0; } }
@keyframes pop { from { transform: translateX(-50%) scale(1.3); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes fadein { from { opacity: 0; transform: translateX(10px); } }
#hpbox { position: absolute; left: 18px; bottom: 16px; }
#hp { font-size: 42px; line-height: 1; }
#hpbar { width: 160px; height: 5px; background: rgba(255,255,255,.15); margin-top: 4px; }
#hpbar i { display: block; height: 100%; width: 100%; background: #fff; transition: width .1s; }
#hpbox.low #hp { color: var(--red); } #hpbox.low #hpbar i { background: var(--red); }
#ammobox { position: absolute; right: 18px; bottom: 16px; text-align: right; }
#ammo { font-size: 42px; line-height: 1; }
#reserve { font-size: 16px; color: var(--muted); margin-left: 6px; }
#reloading { font-size: 12px; color: var(--gold); letter-spacing: 1px; }
#vignette { position: absolute; inset: 0; box-shadow: inset 0 0 160px rgba(255,0,0,.0); transition: box-shadow .25s; }
#vignette.on { box-shadow: inset 0 0 160px rgba(255,0,0,.55); transition: none; }
#deathscreen { position: absolute; left: 50%; top: 38%; transform: translateX(-50%); text-align: center; font-size: 34px; color: var(--red); background: rgba(0,0,0,.5); padding: 14px 26px; border-radius: 10px; }
#deathscreen div + div { font-size: 15px; color: var(--text); margin-top: 6px; }
#protect { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); font-size: 12px; color: #8fdcff; letter-spacing: 2px; }
#centermsg { position: absolute; left: 50%; top: 26%; transform: translateX(-50%); font-size: 30px; background: rgba(0,0,0,.5); padding: 10px 22px; border-radius: 8px; text-align: center; }
#labels, #popups { position: absolute; inset: 0; overflow: hidden; }
.nametag { position: absolute; transform: translate(-50%, -100%); font-size: 11px; font-weight: 700; white-space: nowrap; text-align: center; }
.nametag i { display: block; height: 3px; background: rgba(0,0,0,.5); margin-top: 2px; }
.nametag i b { display: block; height: 100%; background: var(--gold); }
.pop { position: absolute; transform: translate(-50%, -50%); color: var(--green); font-size: 20px; -webkit-text-stroke: 1px #063; animation: popup .9s ease-out forwards; }
.pop.hs { color: var(--gold); -webkit-text-stroke-color: #530; }
@keyframes popup { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -50px; } }
#scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, 94vw); background: rgba(10,12,15,.92); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-weight: 600; text-shadow: none; }
#menubtn { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); pointer-events: auto; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.2); padding: 4px 12px; }

/* ------------------------------------------------ touch */
#touch { position: fixed; inset: 0; z-index: 12; }
#stickzone { position: absolute; left: 0; top: 0; bottom: 0; width: 45%; }
#lookzone { position: absolute; right: 0; top: 0; bottom: 0; width: 55%; }
#stickbase { position: absolute; width: 130px; height: 130px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); left: 60px; bottom: 60px; }
#stick { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,.35); }
.tbtn { position: absolute; border-radius: 50%; width: 62px; height: 62px; padding: 0; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.3); font-size: 12px; font-weight: 800; }
.tbtn.big { width: 92px; height: 92px; background: rgba(255,60,60,.25); border-color: rgba(255,90,90,.6); }
.tbtn.active { background: rgba(61,255,110,.35); }
#t-fire { right: 40px; bottom: 60px; }
#t-fire2 { left: 30px; top: 50%; width: 58px; height: 58px; background: rgba(255,60,60,.2); border-color: rgba(255,90,90,.5); }
#t-jump { right: 150px; bottom: 30px; }
#t-reload { right: 150px; bottom: 110px; }
#t-ads { right: 150px; bottom: 190px; }
#rotate { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: #000; font-size: 18px; }

@media (max-width: 760px) {
  .row.two { grid-template-columns: 1fr; }
  .brand h1 { font-size: 34px; }
}
@media (max-height: 520px) {
  #hp, #ammo { font-size: 30px; }
  #hpbar { width: 110px; }
  #earned { font-size: 18px; }
  #killfeed { font-size: 10px; }
  #hpbox { left: auto; right: 190px; bottom: auto; top: 44px; }
  #ammobox { right: 12px; bottom: auto; top: 44px; }
  #earnbox { top: 110px; transform: none; }
  #killfeed { top: 44px; right: auto; left: 12px; justify-items: start; }
  #matchinfo { font-size: 10px; }
}

/* ================================================= voxel/neon restyle (v2) */
:root { --neon: #18e0d0; --hot: #ff7a1a; --pink: #ff2fa0; --lime: #9cff2e; --pix: "VT323", ui-monospace, monospace; --chunky: "Bungee", "Arial Black", Impact, sans-serif; }
.brand h1 { font-family: var(--chunky); font-weight: 400; background: linear-gradient(180deg, #ffd21a, #ff7a1a 55%, #ff2fa0); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px rgba(0,0,0,.25); }
.brand h1 span { color: transparent; }
.screen { background: radial-gradient(ellipse at top, rgba(255,122,26,.35), rgba(36,32,74,.92) 55%, rgba(8,8,16,.96)); }
.panel { border-color: rgba(24,224,208,.35); box-shadow: 0 0 0 1px rgba(24,224,208,.12), 0 20px 60px rgba(0,0,0,.55); }
.seg button.on { background: rgba(255,122,26,.18); border-color: var(--hot); color: #ffb070; }
.neonbox, #matchinfo, #timerbox, #earnbox, #killfeed div, #scoreboard {
  background: rgba(10,14,30,.62); border: 2px solid var(--neon); border-radius: 8px;
  box-shadow: 0 0 10px rgba(24,224,208,.55), inset 0 0 8px rgba(24,224,208,.25);
}
#hud { text-shadow: 0 2px 0 rgba(0,0,0,.6); }
#matchinfo { font-family: var(--pix); font-size: 17px; font-weight: 400; line-height: 1.05; padding: 6px 10px; min-width: 190px; }
#roomname { color: var(--neon); }
#modeline { color: #ffd21a; font-size: 14px; font-weight: 400; }
#miniboard { margin-top: 4px; border-top: 1px solid rgba(24,224,208,.4); padding-top: 3px; }
#miniboard div { display: grid; grid-template-columns: 1fr 26px 62px; gap: 6px; }
#miniboard div.me { color: var(--lime); }
#miniboard b { font-weight: 400; color: var(--neon); text-align: right; }
#miniboard i { font-style: normal; color: #3dff6e; text-align: right; }
#timerbox { font-family: var(--chunky); }
#timer { font-weight: 400; font-size: 24px; color: #fff; }
#timersub { font-family: var(--pix); font-size: 15px; letter-spacing: 0; color: #c9d1db; }
#killfeed { font-family: var(--pix); font-size: 17px; font-weight: 400; }
#killfeed div { border-width: 1px; padding: 1px 8px; }
#killfeed .me { outline: none; border-color: var(--lime); box-shadow: 0 0 10px rgba(156,255,46,.6); }
#killfeed .gun { color: var(--hot); }
#earnbox { border-color: #3dff6e; box-shadow: 0 0 12px rgba(61,255,110,.5), inset 0 0 8px rgba(61,255,110,.2); }
#earnbox .lbl, #net { font-family: var(--pix); font-size: 15px; font-weight: 400; letter-spacing: 1px; }
#earned { font-family: var(--chunky); font-weight: 400; }
#hp, #ammo { font-family: var(--chunky); font-weight: 400; }
#hpbar { height: 8px; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.4); }
#hpbar i { background: linear-gradient(90deg, #9cff2e, #d8ff4a); box-shadow: 0 0 8px rgba(156,255,46,.6); }
#reserve, #reloading { font-family: var(--pix); font-size: 18px; font-weight: 400; }
#bigpay { font-family: var(--chunky); font-weight: 400; }
#kbname, #kbtext { font-family: var(--pix); font-weight: 400; font-size: 18px; border: 1px solid var(--neon); }
#killstack { position: absolute; right: 18px; top: 26%; display: grid; gap: 2px; justify-items: end; }
#killstack div { font-family: var(--chunky); font-size: 26px; color: #ffd27a; -webkit-text-stroke: 1px #5a1a00;
  text-shadow: 0 3px 0 #a3360a, 0 0 14px rgba(255,122,26,.7); animation: stackin .25s ease-out; font-style: italic; }
#killstack span { font-size: 16px; color: #3dff6e; -webkit-text-stroke: 0; text-shadow: 0 2px 0 #041; margin-left: 6px; }
@keyframes stackin { from { transform: translateX(40px) skewX(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
#multikill { position: absolute; right: 6%; top: 52%; font-family: var(--chunky); font-size: min(9vw, 64px); font-style: italic; transform: skewX(-10deg);
  background: linear-gradient(180deg, #fff3c0, #ffb347 45%, #ff5a1a 70%, #c2185b); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #3a0d00; filter: drop-shadow(0 4px 0 #6b1d00) drop-shadow(0 0 18px rgba(255,90,26,.75)); animation: mk 1.8s ease-out forwards; }
@keyframes mk { 0% { opacity: 0; transform: skewX(-10deg) scale(1.6); } 12% { opacity: 1; transform: skewX(-10deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: skewX(-10deg) translateX(30px); } }
.nametag { font-family: var(--pix); font-size: 15px; font-weight: 400; }
.nametag i b { background: linear-gradient(90deg, #ff2fa0, #ffd21a); }
.pop { font-family: var(--chunky); font-weight: 400; }
#crosshair i { background: var(--lime); box-shadow: 0 0 4px rgba(156,255,46,.9); }
.tbtn { border-color: rgba(24,224,208,.6); box-shadow: 0 0 10px rgba(24,224,208,.3); font-family: var(--pix); font-size: 18px; font-weight: 400; }
.tbtn.big { background: rgba(255,47,160,.25); border-color: rgba(255,47,160,.8); box-shadow: 0 0 14px rgba(255,47,160,.45); }
@media (max-height: 520px) {
  #matchinfo { font-size: 13px; min-width: 150px; }
  #miniboard { display: none; }
  #killstack { top: 34%; } #killstack div { font-size: 18px; }
  #multikill { font-size: 34px; top: 58%; }
}
@media (max-height: 520px) {
  #earnbox { left: 12px; right: auto; top: 58px; transform: none; padding: 2px 10px; text-align: left; }
  #earned { font-size: 16px; }
  #killfeed { top: 122px; left: 12px; }
  #killfeed div { font-size: 13px; }
}
#crosshair.ads { opacity: .35; }

#t-crouch { right: 46px; bottom: 172px; }
@media (max-height: 520px) { #t-crouch { right: 46px; bottom: 170px; } }
.badge.comp { background: #3a1440; color: #ff7ad8; }
/* segmented pickers must not sit inside <label>: a label forwards clicks to its first button */
.field { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }
.brand h1 img.logo { display: block; width: min(560px, 100%); height: auto; margin: -6px 0 4px -8px; }

/* weapons */
#wname { font-family: var(--pix); font-size: 18px; letter-spacing: 1px; color: #7ff3e6; margin-bottom: 2px; }
#wslots { margin-top: 4px; display: flex; gap: 4px; justify-content: flex-end; }
#wslots i { font-style: normal; font-family: var(--pix); font-size: 15px; width: 20px; height: 20px; line-height: 20px; text-align: center;
  border: 1px solid rgba(255,255,255,.15); border-radius: 4px; color: rgba(255,255,255,.2); }
#wslots i.own { color: #fff; border-color: rgba(255,255,255,.45); }
#wslots i.on { background: #18e0d0; color: #071a1a; border-color: #18e0d0; }
#pickupmsg { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); font-family: var(--chunky); font-size: 26px;
  color: #7ff3e6; text-shadow: 0 2px 0 #000, 0 0 18px rgba(24,224,208,.6); pointer-events: none; animation: pickpop 1.4s ease-out forwards; }
@keyframes pickpop { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.9); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
#t-weapon { right: 46px; bottom: 250px; }
@media (max-height: 520px) { #wname { font-size: 14px; } #wslots i { width: 16px; height: 16px; line-height: 16px; font-size: 12px; } }

/* pause / leave menu */
#pausemenu { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5,8,12,.55); backdrop-filter: blur(2px); }
#pausemenu .panel { max-width: 420px; text-align: center; }
#pausemenu h2 { margin: 0 0 6px; font-family: var(--chunky); letter-spacing: 2px; }
#pausemenu .btns { justify-content: center; margin: 14px 0 6px; }
#pausemenu .btns button { min-width: 140px; }
#p-note { color: #ffd21a; }
#menubtn { font-size: 18px; padding: 6px 16px; }
