* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #11161d; color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Noto Sans", sans-serif; -webkit-user-select: none; user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
#root { position: fixed; inset: 0; overflow: hidden; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#gamearter-toolbar { position: absolute; top: 12px; left: 12px; z-index: 30; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; color: inherit; }
:root { --acc: #ff7a1a; --acc2: #3cc8ff; --panel: rgba(14, 19, 27, .92); --line: rgba(255,255,255,.12); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,.8); font-variant-numeric: tabular-nums; }
#radar { position: absolute; top: 66px; left: 12px; width: clamp(110px, 17vmin, 176px); height: clamp(110px, 17vmin, 176px); border-radius: 10px; background: rgba(10,14,20,.55); border: 1px solid var(--line); }
#topbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch; gap: 4px; }
#topbar .sc { min-width: 64px; padding: 4px 10px; background: rgba(10,14,20,.7); display: flex; flex-direction: column; align-items: center; border-radius: 8px; }
#topbar .sc b { font-size: 24px; line-height: 1.1; }
#topbar .sc small { font-size: 11px; opacity: .85; letter-spacing: 2px; }
#topbar .us b { color: var(--acc2); } #topbar .them b { color: var(--acc); }
#timer { min-width: 92px; padding: 6px 12px; background: rgba(10,14,20,.8); border-radius: 8px; font-size: 26px; font-weight: 800; text-align: center; }
#timer.planted { color: #ff5a3a; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
#plan { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; opacity: .9; white-space: nowrap; }
#killfeed { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#killfeed div { background: rgba(10,14,20,.7); padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; animation: kf .2s ease-out; }
#killfeed div.mine { border: 1px solid rgba(255,122,26,.9); }
#killfeed .w { opacity: .75; font-weight: 600; margin: 0 6px; font-size: 12px; }
#killfeed .hs { color: #ffd23f; margin-right: 6px; }
@keyframes kf { from { transform: translateX(30px); opacity: 0; } }
.t-att { color: #ffae6b; } .t-def { color: #8fdcff; }
#fps { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 11px; opacity: .7; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#crosshair i { position: absolute; background: #6dff8f; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
#crosshair .t, #crosshair .b { width: 2px; height: 8px; left: -1px; }
#crosshair .l, #crosshair .r { height: 2px; width: 8px; top: -1px; }
#crosshair .d { width: 2px; height: 2px; left: -1px; top: -1px; }
#crosshair.knife i:not(.d) { display: none; }
#hitmarker { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; opacity: 0; transition: opacity .18s; }
#hitmarker::before, #hitmarker::after { content: ''; position: absolute; left: 12px; top: -2px; width: 2px; height: 30px; background: linear-gradient(#fff 0 35%, transparent 35% 65%, #fff 65%); transform: rotate(45deg); }
#hitmarker::after { transform: rotate(-45deg); }
#hitmarker.show { opacity: 1; transition: none; } #hitmarker.head::before, #hitmarker.head::after { background: linear-gradient(#ffd23f 0 35%, transparent 35% 65%, #ffd23f 65%); }
#hitmarker.kill::before, #hitmarker.kill::after { background: linear-gradient(#ff5a3a 0 35%, transparent 35% 65%, #ff5a3a 65%); }
#vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(200,60,20,.55)); opacity: 0; transition: opacity .3s; }
#dmg { position: absolute; left: 50%; top: 50%; }
#dmg i { position: absolute; width: 120px; height: 18px; margin-left: -60px; margin-top: -9px; border-radius: 50%; border-top: 5px solid rgba(255,110,50,.95); transform-origin: 60px 9px; animation: dmgf 1s forwards; }
@keyframes dmgf { to { opacity: 0; } }
#scope { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0 34vmin, #000 34.3vmin); }
#scope::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #000; }
#scope::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #000; }
#progress { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); text-align: center; width: 280px; }
#progress span { font-weight: 800; font-size: 14px; letter-spacing: 1px; }
.pbar { margin-top: 6px; height: 10px; border-radius: 6px; background: rgba(0,0,0,.5); overflow: hidden; border: 1px solid rgba(255,255,255,.35); }
#progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), #ffd23f); }
#hint { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); font-weight: 700; font-size: 15px; white-space: nowrap; background: rgba(10,14,20,.55); padding: 6px 14px; border-radius: 8px; }
#hint:empty { display: none; }
#toast { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-weight: 800; font-size: 20px; white-space: nowrap; opacity: 0; transition: opacity .25s; }
#toast.show { opacity: 1; }
#banner { position: absolute; left: 0; right: 0; top: 18%; text-align: center; opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s; background: linear-gradient(90deg, transparent, rgba(10,14,20,.8), transparent); padding: 14px 0; }
#banner.show { opacity: 1; transform: none; }
#banner b { display: block; font-size: clamp(26px, 5.5vmin, 46px); font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
#banner span { display: block; font-size: 16px; font-weight: 600; opacity: .9; margin-top: 4px; }
#spec { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); text-align: center; font-weight: 800; font-size: 17px; background: rgba(10,14,20,.6); padding: 8px 18px; border-radius: 8px; }
#spec small { display: block; font-weight: 600; font-size: 12px; opacity: .8; }
#bl { position: absolute; left: 16px; bottom: 14px; }
#money { font-size: 22px; font-weight: 800; color: #8dff9b; margin-bottom: 4px; }
.vit { display: flex; align-items: center; gap: 6px; background: rgba(10,14,20,.6); padding: 6px 12px; border-radius: 8px; }
.vit b { font-size: 30px; font-weight: 900; min-width: 52px; }
.ico { width: 18px; height: 18px; display: inline-block; }
.ico.hp { background: linear-gradient(#fff, #fff) center/18px 6px no-repeat, linear-gradient(#fff, #fff) center/6px 18px no-repeat; }
.ico.ar { background: #8fdcff; clip-path: polygon(50% 0, 100% 18%, 92% 65%, 50% 100%, 8% 65%, 0 18%); }
#kit { font-size: 11px; font-weight: 900; background: #3cc8ff; color: #001; padding: 2px 5px; border-radius: 4px; }
#charge-ico { color: #ff7a1a; font-size: 22px; animation: pulse 1.2s infinite; }
#br { position: absolute; right: 16px; bottom: 14px; text-align: right; }
#slots { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
#slots span { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; background: rgba(10,14,20,.55); opacity: .7; }
#slots span.on { opacity: 1; background: rgba(255,122,26,.85); }
#wname { font-size: 13px; font-weight: 700; opacity: .85; }
#ammo b { font-size: 40px; font-weight: 900; } #ammo span { font-size: 22px; opacity: .6; margin: 0 4px; } #ammo small { font-size: 20px; font-weight: 700; opacity: .85; }
#ammo.low b { color: #ff6a4a; }

/* ---------- panels / screens ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10; padding: 16px; }
.screen.dim { background: rgba(5,8,12,.6); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; width: min(520px, 100%); max-height: 100%; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.panel.wide { width: min(820px, 100%); }
.panel h2 { font-size: 22px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px; color: var(--acc); }
.btn { display: block; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); padding: 12px 22px; border-radius: 10px; font-size: 16px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; transition: background .15s, transform .1s; }
.btn:hover { background: rgba(255,255,255,.16); } .btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(180deg, #ff8a2a, #e0590a); border-color: #ff9a4a; color: #fff; }
.btn.primary:hover { background: linear-gradient(180deg, #ff9a40, #f0650f); }
.btn.big { font-size: 22px; padding: 18px 36px; }
.mbtns { display: flex; flex-direction: column; gap: 10px; width: min(300px, 100%); }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.row label { width: 170px; font-weight: 700; font-size: 14px; opacity: .9; }
.row input[type=range] { flex: 1; accent-color: var(--acc); min-width: 120px; }
.row output { width: 44px; text-align: right; font-weight: 700; }
.row select { background: #1b2430; color: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 14px; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.opt { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.opt.on { background: var(--acc); border-color: #ffb27a; }
.opt.map { padding: 0; overflow: hidden; width: 150px; text-align: left; }
.opt.map i { display: block; height: 54px; }
.opt.map span { display: block; padding: 6px 10px; }
.goal { margin-top: 10px; font-size: 14px; opacity: .85; line-height: 1.4; }

#menu { justify-content: flex-start; padding-left: clamp(16px, 7vw, 110px); background: linear-gradient(90deg, rgba(8,11,16,.85) 0%, rgba(8,11,16,.35) 55%, transparent 80%); }
.menu-left { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.logo { display: flex; flex-direction: column; line-height: .9; font-weight: 900; font-style: italic; letter-spacing: 2px; font-family: Impact, "Arial Black", system-ui, sans-serif; }
.logo span:first-child { font-size: clamp(44px, 9vmin, 84px); color: #fff; text-shadow: 0 4px 0 #000, 0 0 30px rgba(255,122,26,.35); }
.logo span:last-child { font-size: clamp(44px, 9vmin, 84px); color: var(--acc); text-shadow: 0 4px 0 #000; }
.logo.small span { font-size: 40px !important; }
.tagline { font-weight: 700; letter-spacing: 3px; text-transform: uppercase; opacity: .9; }
.controls { font-size: 12px; opacity: .7; line-height: 1.5; max-width: 440px; }
#rankcard { background: rgba(10,14,20,.6); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; width: min(300px, 100%); font-size: 13px; }
#rankcard b { font-size: 16px; }
.xpbar { height: 8px; border-radius: 5px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 6px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc2), #8dff9b); }
.chev { display: inline-block; color: #ffd23f; margin-right: 6px; letter-spacing: -2px; }
.icon-btn { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(10,14,20,.6); font-size: 18px; font-weight: 900; }
.icon-btn.muted { opacity: .5; text-decoration: line-through; }

#loading { flex-direction: column; gap: 18px; background: #11161d; z-index: 40; }
.lbar { width: 240px; height: 6px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; }
#lfill { height: 100%; width: 10%; background: var(--acc); transition: width .2s; }

/* buy menu */
#buymenu { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, 96vw); z-index: 12; }
#buymenu .cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
#buymenu .cat h3 { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; opacity: .75; margin-bottom: 6px; }
.item { width: 100%; text-align: left; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.item small { display: block; font-weight: 600; opacity: .75; font-size: 12px; }
.item:hover { background: rgba(255,255,255,.14); }
.item.cant { opacity: .45; } .item.own { border-color: #8dff9b; }
.item kbd { float: right; font-size: 11px; opacity: .6; font-family: inherit; }
.bm-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.bm-head h2 { margin: 0; } .bm-head b { color: #8dff9b; font-size: 22px; }
#bm-msg { min-height: 18px; font-size: 13px; font-weight: 700; color: #ffb27a; margin-top: 4px; }

/* scoreboard */
#scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, 96vw); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; z-index: 11; }
#scoreboard table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
#scoreboard th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: .6; padding: 4px 6px; }
#scoreboard td { padding: 5px 6px; border-top: 1px solid var(--line); font-weight: 700; }
#scoreboard td.n, #scoreboard th.n { text-align: right; width: 70px; }
#scoreboard tr.dead { opacity: .45; } #scoreboard tr.me { background: rgba(255,122,26,.18); }
#scoreboard h3 { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; margin: 4px 0; }

/* armory */
.arm { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
#arm-weapons .opt { display: block; width: 100%; margin-bottom: 6px; text-align: left; }
#arm-skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; align-content: start; }
.skin { border: 1px solid rgba(255,255,255,.18); border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.05); font-size: 12px; font-weight: 700; text-align: left; }
.skin img { display: block; width: 100%; height: 56px; object-fit: cover; }
.skin span { display: block; padding: 6px 8px; } .skin small { display: block; opacity: .7; font-weight: 600; }
.skin.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc) inset; } .skin.locked { opacity: .45; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.stats div { background: rgba(255,255,255,.05); border-radius: 10px; padding: 10px 12px; font-size: 12px; opacity: .95; }
.stats b { display: block; font-size: 22px; }
#me-title { font-size: 40px !important; text-align: center; }
#me-score { text-align: center; font-size: 30px; font-weight: 900; margin-bottom: 10px; }
.xp-lines div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.unlock { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255,210,63,.12); border: 1px solid rgba(255,210,63,.5); font-weight: 800; }

/* touch */
#touch { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#stick { position: absolute; left: 4vw; bottom: 6vh; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.25); pointer-events: auto; }
#knob { position: absolute; left: 45px; top: 45px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.35); }
.tb { position: absolute; pointer-events: auto; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: rgba(10,14,20,.45); font-weight: 900; font-size: 15px; }
.tb.on { background: rgba(255,122,26,.6); }
#t-fire { right: 4vw; bottom: 16vh; width: 92px; height: 92px; }
.tb.small { width: 50px; height: 50px; font-size: 16px; }
#t-jump { right: calc(4vw + 104px); bottom: 10vh; } #t-crouch { right: calc(4vw + 104px); bottom: calc(10vh + 62px); }
#t-reload { right: calc(4vw + 160px); bottom: calc(10vh + 30px); } #t-switch { right: 4vw; bottom: calc(16vh + 104px); }
#t-scope { right: calc(4vw + 56px); bottom: calc(16vh + 104px); } #t-use { right: calc(4vw + 160px); bottom: calc(10vh + 92px); }
#t-buy { right: 12px; top: 80px; } #t-pause { right: 12px; top: 140px; }
.touchmode #killfeed { top: 70px; right: 70px; } .touchmode #br { top: auto; bottom: 8px; right: auto; left: calc(50% + 150px); text-align: left; } .touchmode #slots, .touchmode #wname { display: none; }
.touchmode #br #ammo b { font-size: 28px; }
.touchmode #bl { left: auto; right: 50%; transform: translateX(50%); bottom: 8px; display: flex; gap: 10px; align-items: center; }
.touchmode #bl #money { margin: 0; }

@media (max-height: 520px) {
  .panel { padding: 14px 16px; } .row { margin: 6px 0; } .panel h2 { margin-bottom: 8px; font-size: 18px; }
  .logo span { font-size: 44px !important; } .menu-left { gap: 8px; } .btn { padding: 9px 16px; font-size: 14px; }
  .controls { display: none; }
}
@media (max-width: 640px) { .arm { grid-template-columns: 1fr; } .row label { width: 100%; } #buymenu .cats { grid-template-columns: repeat(2, 1fr); } }
