:root {
  --bg: #07100f; --bg2: #0b1d1c; --panel: rgba(8, 20, 19, 0.86); --panel2: rgba(12, 30, 28, 0.9); --line: rgba(57, 240, 200, 0.18);
  --teal: #39f0c8; --teal2: #1dffb0; --gold: #ffd84a; --red: #ff4d4d; --text: #e9f6f3; --muted: #8fb3ac; --purple: #a24bff;
  --common: #9aa3ad; --uncommon: #3fbf5a; --rare: #3aa0ff; --epic: #b55cff; --legendary: #ff9a2e; --mythic: #ffd84a;
  --font: 'Barlow', system-ui, sans-serif; --cond: 'Barlow Condensed', 'Barlow', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--cond); letter-spacing: 0.04em; margin: 0; text-transform: uppercase; }
[hidden] { display: none !important; }
#app { position: fixed; inset: 0; }
.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: block; }
canvas { display: block; }

/* ---------- buttons ---------- */
.btn { border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: var(--text); padding: 10px 18px; font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 4px; transition: transform .08s, background .15s, box-shadow .15s; position: relative; }
.btn:hover { background: rgba(57,240,200,0.12); box-shadow: 0 0 0 1px rgba(57,240,200,0.4) inset; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.primary { background: linear-gradient(180deg, #43ffd6, #19c9a0); color: #05201a; border-color: transparent; box-shadow: 0 6px 20px rgba(57,240,200,0.25); }
.btn.primary:hover { background: linear-gradient(180deg, #6affe0, #23dcb0); }
.btn.gold { background: linear-gradient(180deg, #ffe27a, #e6b52a); color: #2a1e00; border-color: transparent; }
.btn.danger { border-color: rgba(255,77,77,0.5); }
.btn.ghost { background: transparent; }
.btn.big { font-size: 22px; padding: 14px 24px; }
.btn.huge { font-size: 40px; padding: 18px 48px; display: flex; flex-direction: column; align-items: center; line-height: 1; min-width: 300px; }
.btn.huge small { font-size: 14px; letter-spacing: 0.25em; opacity: 0.8; margin-top: 6px; }
.btn.small { font-size: 14px; padding: 6px 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.focus, .btn:focus-visible, .nav:focus-visible, .mode:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- auth ---------- */
#screen-auth { display: none; align-items: center; justify-content: center; }
#screen-auth.active { display: flex; }
.auth-bg { position: absolute; inset: 0; background: radial-gradient(1200px 700px at 30% 20%, rgba(57,240,200,0.18), transparent 60%), radial-gradient(900px 600px at 80% 90%, rgba(162,75,255,0.16), transparent 60%), linear-gradient(180deg, #06110f, #030807); }
.auth-bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(57,240,200,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(57,240,200,0.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 50% 50%, black, transparent 75%); }
.auth-card { position: relative; width: 420px; max-width: 92vw; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px 30px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.logo { text-align: center; margin-bottom: 18px; }
.logo h1 { font-size: 46px; font-weight: 900; background: linear-gradient(180deg, #d9fff6, #39f0c8); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0.12em; }
.logo .tag { color: var(--muted); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; }
.logo-mark { display: inline-block; width: 42px; height: 42px; background: conic-gradient(from 200deg, #39f0c8, #a24bff, #39f0c8); clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%); margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab { flex: 1; background: none; border: none; padding: 10px; font-family: var(--cond); font-weight: 700; font-size: 17px; letter-spacing: 0.08em; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }
#auth-form label { display: block; font-size: 12px; letter-spacing: 0.15em; color: var(--muted); margin-bottom: 12px; }
#auth-form input, .addfriend input, .settings-body input[type=text], .settings-body input[type=number], .settings-body select, #privacy-sel { width: 100%; margin-top: 6px; background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; color: var(--text); font-size: 16px; }
#auth-form input:focus, .addfriend input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(57,240,200,0.15); }
.error { color: #ff8f8f; background: rgba(255,77,77,0.1); border: 1px solid rgba(255,77,77,0.3); padding: 8px 10px; border-radius: 4px; margin-bottom: 12px; font-size: 14px; }
.auth-foot { margin-top: 16px; color: var(--muted); font-size: 12px; text-align: center; }
#auth-submit { width: 100%; }

/* ---------- lobby ---------- */
#screen-lobby { background: #050c0b; }
#lobby-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: linear-gradient(180deg, rgba(3,8,7,0.9), rgba(3,8,7,0.0)); z-index: 5; }
.topnav { display: flex; gap: 6px; }
.nav { background: none; border: none; font-family: var(--cond); font-weight: 900; font-size: 22px; letter-spacing: 0.1em; padding: 12px 16px; color: rgba(233,246,243,0.7); border-bottom: 3px solid transparent; transition: color .15s, border-color .15s; }
.nav:hover { color: #fff; }
.nav.active { color: var(--teal); border-bottom-color: var(--teal); text-shadow: 0 0 20px rgba(57,240,200,0.5); }
.topright { display: flex; align-items: center; gap: 14px; }
.currency { display: flex; align-items: center; gap: 8px; font-family: var(--cond); font-weight: 700; font-size: 22px; padding: 6px 12px; border: 1px solid rgba(255,216,74,0.35); border-radius: 4px; background: rgba(0,0,0,0.35); color: var(--gold); }
.gm-icon { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b0, #e3b73d 60%, #a67c1a); box-shadow: 0 0 8px rgba(255,216,74,0.6); display: inline-block; }
.level { display: flex; align-items: center; gap: 6px; font-family: var(--cond); font-weight: 700; font-size: 20px; }
.lvl-label { font-size: 12px; color: var(--muted); letter-spacing: 0.15em; }
.xpbar { width: 80px; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
#xp-fill { height: 100%; width: 0; background: linear-gradient(90deg, #39f0c8, #a24bff); }
.profile { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; font-family: var(--cond); font-weight: 700; font-size: 18px; letter-spacing: 0.05em; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #39f0c8, #a24bff); display: inline-block; }
.view { position: absolute; inset: 64px 0 0 0; display: none; z-index: 4; pointer-events: none; }
.view.active { display: block; }
.view > * { pointer-events: auto; }

/* play view */
.party-strip { position: absolute; left: 24px; top: 14px; display: flex; gap: 10px; }
.party-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; min-width: 150px; position: relative; }
.party-card .pname { font-family: var(--cond); font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.party-card .pstate { font-size: 12px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.party-card.ready .pstate { color: var(--teal); }
.party-card .crown { color: var(--gold); font-size: 14px; }
.party-card .pactions { display: flex; gap: 4px; margin-top: 6px; }
.party-card.empty { border-style: dashed; color: var(--muted); display: flex; align-items: center; justify-content: center; font-family: var(--cond); font-size: 16px; cursor: pointer; }
.party-card.empty:hover { color: var(--teal); border-color: var(--teal); }
.playbox { position: absolute; right: 34px; bottom: 40px; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.mode-select { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; width: 330px; }
.mode-head { font-family: var(--cond); font-size: 13px; letter-spacing: 0.25em; color: var(--muted); padding: 2px 6px 8px; }
.mode { width: 100%; display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: rgba(255,255,255,0.03); border: 1px solid transparent; border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; color: var(--text); }
.mode b { font-family: var(--cond); font-size: 20px; letter-spacing: 0.08em; }
.mode span { font-size: 13px; color: var(--muted); }
.mode:hover { background: rgba(57,240,200,0.08); }
.mode.active { border-color: var(--teal); background: rgba(57,240,200,0.12); }
.mode:disabled { opacity: 0.45; }
.ready-row { display: flex; gap: 10px; align-items: center; }
.privacy { display: flex; align-items: center; gap: 6px; font-family: var(--cond); font-size: 14px; letter-spacing: 0.1em; color: var(--muted); }
.privacy select { width: auto; margin: 0; padding: 6px 8px; font-size: 14px; }
#ready-btn.on { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 20px rgba(57,240,200,0.25); }
.lobby-bottom { position: absolute; left: 24px; bottom: 30px; display: flex; flex-direction: column; gap: 10px; }
.news { display: flex; gap: 10px; }
.news-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; width: 220px; }
.news-card b { display: block; font-family: var(--cond); font-size: 16px; letter-spacing: 0.08em; color: var(--teal); }
.news-card span { font-size: 12px; color: var(--muted); }
.emote-bar { display: flex; gap: 6px; }
.emote-bar button { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; font-family: var(--cond); font-size: 14px; letter-spacing: 0.05em; }

/* panels */
.panel { position: absolute; left: 24px; right: 24px; top: 14px; bottom: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; backdrop-filter: blur(6px); }
.panel-head { display: flex; align-items: center; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 30px; font-weight: 900; }
.cats { display: flex; gap: 4px; flex-wrap: wrap; }
.cats button { background: none; border: 1px solid transparent; padding: 6px 12px; font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; color: var(--muted); border-radius: 4px; }
.cats button.active { color: var(--teal); border-color: var(--line); background: rgba(57,240,200,0.08); }
.locker-body, .shop-panel { display: flex; flex: 1; min-height: 0; }
.locker-body { display: flex; }
.grid { flex: 1; overflow: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.card { position: relative; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .1s, box-shadow .15s; aspect-ratio: 3 / 4; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.card.selected { outline: 2px solid var(--teal); }
.card .art { flex: 1; background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.14), transparent 60%); display: flex; align-items: center; justify-content: center; }
.card .art canvas { width: 100%; height: 100%; }
.card .name { font-family: var(--cond); font-weight: 700; font-size: 16px; letter-spacing: 0.04em; padding: 6px 8px 2px; }
.card .sub { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); padding: 0 8px 8px; text-transform: uppercase; display: flex; justify-content: space-between; }
.card .badge { position: absolute; top: 6px; left: 6px; font-family: var(--cond); font-size: 11px; letter-spacing: 0.1em; padding: 2px 6px; border-radius: 3px; background: rgba(0,0,0,0.6); }
.card .fav { position: absolute; top: 6px; right: 6px; color: var(--gold); }
.card.equipped::after { content: 'EQUIPPED'; position: absolute; bottom: 0; left: 0; right: 0; background: var(--teal); color: #05201a; font-family: var(--cond); font-size: 12px; font-weight: 700; letter-spacing: 0.15em; text-align: center; padding: 2px; }
.card.owned .price { color: var(--teal); }
.rar-common { border-top: 3px solid var(--common); } .rar-uncommon { border-top: 3px solid var(--uncommon); } .rar-rare { border-top: 3px solid var(--rare); } .rar-epic { border-top: 3px solid var(--epic); } .rar-legendary { border-top: 3px solid var(--legendary); } .rar-mythic { border-top: 3px solid var(--mythic); }
.rt-common { color: var(--common); } .rt-uncommon { color: var(--uncommon); } .rt-rare { color: var(--rare); } .rt-epic { color: var(--epic); } .rt-legendary { color: var(--legendary); } .rt-mythic { color: var(--mythic); }
.preview { width: 420px; border-left: 1px solid var(--line); display: flex; flex-direction: column; position: relative; }
.preview canvas { flex: 1; width: 100%; min-height: 200px; }
.preview-info { padding: 14px 18px; }
.preview-info h3 { font-size: 26px; }
.preview-info .rar { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.preview-info p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.preview-actions { display: flex; gap: 8px; padding: 0 18px 12px; }
.preview-hint { padding: 0 18px 12px; font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }

/* shop */
.shop-panel { flex-direction: row; }
.shop-panel .panel-head { position: absolute; left: 0; right: 0; top: 0; z-index: 2; background: var(--panel2); }
.shop-body { flex: 1; overflow: auto; padding: 76px 20px 20px; }
.shop-timer { font-family: var(--cond); letter-spacing: 0.15em; color: var(--muted); font-size: 14px; margin-left: auto; }
.shop-timer b { color: var(--gold); font-size: 18px; }
.shop-section h3 { font-size: 22px; margin: 8px 0 10px; color: var(--teal); }
.shop-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.shop-row .card { aspect-ratio: 3 / 4; }
.shop-row .card.bundle { grid-column: span 2; aspect-ratio: auto; min-height: 220px; }
.price { display: flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 700; }
.price::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b0, #e3b73d 60%, #a67c1a); display: inline-block; }
.shop-preview { position: absolute; right: 0; top: 60px; bottom: 0; background: var(--panel2); z-index: 3; }

/* career */
.career-body { flex: 1; overflow: auto; padding: 20px; display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.stat b { display: block; font-family: var(--cond); font-size: 30px; color: var(--teal); }
.stat span { font-size: 11px; letter-spacing: 0.15em; color: var(--muted); text-transform: uppercase; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; color: var(--muted); font-weight: 500; letter-spacing: 0.12em; font-size: 11px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.career-body h3 { font-size: 20px; margin-bottom: 10px; color: var(--teal); }

/* friends */
.addfriend { display: flex; gap: 8px; margin-left: auto; }
.addfriend input { width: 260px; margin: 0; }
.friends-body { flex: 1; overflow: auto; padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fsection h3 { font-size: 16px; letter-spacing: 0.2em; color: var(--muted); margin: 12px 0 8px; }
.friend { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 6px; }
.friend .dot { width: 10px; height: 10px; border-radius: 50%; background: #666; flex: none; }
.friend .dot.lobby, .friend .dot.party { background: var(--teal); box-shadow: 0 0 8px var(--teal); } .friend .dot.matchmaking { background: var(--gold); } .friend .dot.match { background: var(--purple); box-shadow: 0 0 8px var(--purple); } .friend .dot.away { background: #d8a24a; }
.friend .fname { font-family: var(--cond); font-weight: 700; font-size: 18px; }
.friend .fstate { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.friend .factions { margin-left: auto; display: flex; gap: 4px; }
.search-results { margin-top: 6px; }

/* settings */
.settings-body { flex: 1; overflow: auto; padding: 16px 24px; }
.setting { display: grid; grid-template-columns: 1fr 260px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.setting label { font-family: var(--cond); font-size: 17px; letter-spacing: 0.04em; }
.setting small { display: block; color: var(--muted); font-family: var(--font); font-size: 12px; letter-spacing: 0; }
.setting input[type=range] { width: 100%; }
.setting .val { font-size: 12px; color: var(--teal); min-width: 40px; text-align: right; }
.setting .toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.setting .toggle button { background: none; border: none; padding: 6px 14px; font-family: var(--cond); letter-spacing: 0.1em; color: var(--muted); }
.setting .toggle button.on { background: var(--teal); color: #05201a; }
.setting select { margin: 0; }
.settings-body h3 { font-size: 16px; letter-spacing: 0.2em; color: var(--teal); margin: 18px 0 4px; }
.keybind { display: flex; gap: 6px; }
.keybind button { flex: 1; background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font-family: var(--cond); font-size: 15px; letter-spacing: 0.06em; min-width: 90px; }
.keybind button.listening { border-color: var(--gold); color: var(--gold); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
#settings-apply { margin-left: auto; }

/* matchmaking overlay */
.mm-overlay { position: absolute; inset: 0; background: rgba(2,6,6,0.75); display: flex; align-items: center; justify-content: center; z-index: 20; backdrop-filter: blur(4px); }
.mm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 30px 40px; text-align: center; min-width: 360px; }
.mm-card h3 { font-size: 26px; }
.mm-time { font-family: var(--cond); font-size: 52px; font-weight: 900; color: var(--teal); margin: 8px 0; }
.mm-found { color: var(--muted); font-size: 13px; letter-spacing: 0.15em; margin-bottom: 16px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(57,240,200,0.2); border-top-color: var(--teal); animation: spin 1s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* toasts & modals */
#toasts { position: fixed; top: 76px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { pointer-events: auto; background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 6px; padding: 10px 14px; min-width: 260px; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: slidein .25s ease-out; font-size: 14px; }
.toast.error { border-left-color: var(--red); } .toast.gold { border-left-color: var(--gold); } .toast.purple { border-left-color: var(--purple); }
.toast .tactions { display: flex; gap: 6px; margin-top: 8px; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 24px 28px; min-width: 340px; max-width: 520px; }
.modal h3 { font-size: 24px; margin-bottom: 8px; }
.modal p { color: var(--muted); margin: 0 0 16px; }
.modal .mactions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- game ---------- */
#screen-game { background: #000; }
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--cond); }
.loading { position: absolute; inset: 0; background: radial-gradient(900px 500px at 50% 40%, #0f3330, #040a09); display: flex; align-items: center; justify-content: center; z-index: 30; }
.loading-inner { text-align: center; width: 420px; }
.loading h2 { font-size: 44px; font-weight: 900; color: var(--teal); }
.loading .bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin: 14px 0; }
#loading-fill { height: 100%; width: 0; background: linear-gradient(90deg, #39f0c8, #a24bff); transition: width .2s; }
#loading-text { color: var(--muted); letter-spacing: 0.15em; font-size: 13px; }

.hud-el { position: absolute; }
.crosshair { left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); }
.crosshair::before, .crosshair::after { content: ''; position: absolute; background: rgba(255,255,255,0.9); box-shadow: 0 0 2px #000; }
.crosshair::before { left: 8px; top: 0; width: 2px; height: 18px; } .crosshair::after { top: 8px; left: 0; width: 18px; height: 2px; }
.crosshair.hit::before, .crosshair.hit::after { background: #fff; }
.hitmark { left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%,-50%) rotate(45deg); opacity: 0; }
.hitmark span { position: absolute; background: #fff; }
.hitmark.head span { background: var(--gold); }
.hitmark.show { animation: hit .25s ease-out; }
@keyframes hit { 0% { opacity: 1; transform: translate(-50%,-50%) rotate(45deg) scale(1.3); } 100% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(1); } }
.vitals { left: 24px; bottom: 24px; width: 380px; }
.vitals .bar { height: 18px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.15); margin-top: 4px; position: relative; transform: skewX(-12deg); }
.vitals .bar > div { height: 100%; transition: width .15s; }
.vitals .hp > div { background: linear-gradient(90deg, #39f0c8, #6dffb0); }
.vitals .sh > div { background: linear-gradient(90deg, #2b8cff, #7cc8ff); }
.vitals .bar span { position: absolute; right: 8px; top: -1px; font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; transform: skewX(12deg); }
.vitals .name { font-size: 20px; font-weight: 700; letter-spacing: 0.04em; text-shadow: 0 1px 3px #000; display: flex; justify-content: space-between; }
.stamina { height: 5px; background: rgba(0,0,0,0.4); margin-top: 6px; width: 60%; }
.stamina > div { height: 100%; background: var(--gold); transition: width .1s; }
.mats { position: absolute; left: 24px; bottom: 100px; display: flex; gap: 8px; }
.mats .m { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.12); padding: 4px 10px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.mats .m i { width: 12px; height: 12px; display: inline-block; border-radius: 2px; }
.mats .m.active { border-color: var(--teal); }
.inv { right: 24px; bottom: 24px; display: flex; gap: 6px; align-items: flex-end; }
.slot { width: 64px; height: 64px; background: rgba(0,0,0,0.55); border: 2px solid rgba(255,255,255,0.15); position: relative; display: flex; align-items: center; justify-content: center; transition: transform .1s; }
.slot.active { border-color: #fff; transform: translateY(-6px); }
.slot .k { position: absolute; top: 2px; left: 4px; font-size: 11px; color: rgba(255,255,255,0.6); }
.slot .n { position: absolute; bottom: 2px; right: 4px; font-size: 12px; font-weight: 700; }
.slot .ic { width: 44px; height: 28px; border-radius: 3px; }
.slot.pick .ic { background: linear-gradient(135deg, #999, #555); width: 30px; height: 30px; clip-path: polygon(50% 0, 100% 40%, 60% 40%, 60% 100%, 40% 100%, 40% 40%, 0 40%); }
.ammo { right: 24px; bottom: 100px; text-align: right; }
.ammo b { font-size: 40px; font-weight: 900; text-shadow: 0 2px 6px #000; }
.ammo span { font-size: 18px; color: rgba(255,255,255,0.7); }
.ammo .wname { display: block; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.ammo .rel { display: block; font-size: 13px; color: var(--gold); letter-spacing: 0.1em; }
.topinfo { right: 24px; top: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.minimap { width: 220px; height: 220px; border: 2px solid rgba(255,255,255,0.25); background: #08211f; position: relative; overflow: hidden; border-radius: 4px; }
.minimap canvas { position: absolute; left: 0; top: 0; }
.counters { display: flex; gap: 8px; }
.counter { background: rgba(0,0,0,0.55); padding: 4px 10px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.12); }
.counter i { font-style: normal; font-size: 11px; color: rgba(255,255,255,0.6); letter-spacing: 0.15em; }
.storm-timer { background: rgba(0,0,0,0.55); padding: 4px 12px; font-size: 16px; letter-spacing: 0.06em; border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; gap: 8px; }
.storm-timer i { width: 10px; height: 10px; border-radius: 50%; background: #c26bff; box-shadow: 0 0 8px #c26bff; display: inline-block; }
.storm-timer.warn { color: #ffb3ff; }
.killfeed { right: 24px; top: 300px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.kf { background: rgba(0,0,0,0.5); padding: 2px 8px; font-size: 12px; letter-spacing: 0.02em; border-right: 3px solid rgba(255,255,255,0.3); animation: fadein .2s; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.netinfo { left: 24px; top: 20px; font-size: 13px; color: rgba(255,255,255,0.8); letter-spacing: 0.08em; text-shadow: 0 1px 2px #000; }
.kf.me { border-right-color: var(--teal); } .kf.victim { border-right-color: var(--red); }
.kf b { color: #fff; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }
.compass { left: 50%; top: 52px; transform: translateX(-50%); width: 420px; height: 26px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.compass .strip { position: absolute; top: 0; white-space: nowrap; font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.85); text-shadow: 0 1px 3px #000; }
.compass .strip span { display: inline-block; width: 90px; text-align: center; }
.compass::after { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: var(--teal); }
.interact { left: 50%; top: 58%; transform: translateX(-50%); text-align: center; font-size: 18px; text-shadow: 0 1px 4px #000; }
.interact kbd { background: #fff; color: #000; border-radius: 3px; padding: 1px 8px; font-weight: 700; margin-right: 6px; font-family: var(--cond); }
.interact .prog { width: 200px; height: 5px; background: rgba(0,0,0,0.5); margin: 6px auto 0; }
.interact .prog > div { height: 100%; background: var(--teal); }
.dashes { left: 50%; top: 62%; transform: translateX(-50%); display: flex; gap: 10px; }
.dash { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #b9fff0, #39f0c8 55%, #0a6b57); box-shadow: 0 0 14px #39f0c8; opacity: 0.25; transition: opacity .15s, transform .15s; }
.dash.on { opacity: 1; transform: scale(1.1); animation: floaty 2s ease-in-out infinite; }
.dash:nth-child(2).on { animation-delay: .4s; } .dash:nth-child(3).on { animation-delay: .8s; }
@keyframes floaty { 50% { transform: translateY(-4px) scale(1.1); } }
.center-msg { left: 50%; top: 30%; transform: translateX(-50%); text-align: center; font-size: 44px; font-weight: 900; letter-spacing: 0.08em; text-shadow: 0 2px 10px #000; }
.center-msg small { display: block; font-size: 16px; letter-spacing: 0.25em; color: var(--muted); font-weight: 500; }
.buildhud { right: 24px; bottom: 100px; display: flex; gap: 6px; }
.buildhud .bp { width: 52px; height: 52px; background: rgba(0,0,0,0.55); border: 2px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; position: relative; }
.buildhud .bp.active { border-color: var(--teal); }
.buildhud .bp .k { position: absolute; top: 1px; left: 3px; font-size: 10px; color: rgba(255,255,255,0.6); }
.buildhud .bp svg { width: 30px; height: 30px; }
.dmgnum { position: absolute; font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px #000; animation: dmg 0.8s ease-out forwards; pointer-events: none; }
.dmgnum.head { color: var(--gold); } .dmgnum.shield { color: #7cc8ff; }
@keyframes dmg { 0% { transform: translate(-50%, 0) scale(1.3); opacity: 1; } 100% { transform: translate(-50%, -50px) scale(0.9); opacity: 0; } }
.stormvig { position: absolute; inset: 0; box-shadow: inset 0 0 180px rgba(150,60,220,0.55); opacity: 0; transition: opacity .3s; }
.stormvig.on { opacity: 1; }
.dmgvig { position: absolute; inset: 0; box-shadow: inset 0 0 160px rgba(255,40,40,0.7); opacity: 0; }
.dmgvig.on { animation: dv .5s ease-out; }
@keyframes dv { 0% { opacity: 1; } 100% { opacity: 0; } }
.bigmap { position: absolute; inset: 0; background: rgba(2,6,6,0.85); display: flex; align-items: center; justify-content: center; }
.bigmap canvas { border: 2px solid rgba(255,255,255,0.2); }
.bigmap .legend { position: absolute; left: 30px; bottom: 30px; font-size: 14px; color: var(--muted); letter-spacing: 0.08em; line-height: 1.7; }
.spectate { left: 50%; bottom: 40px; transform: translateX(-50%); text-align: center; pointer-events: auto; }
.spectate h3 { font-size: 22px; color: var(--muted); letter-spacing: 0.2em; }
.spectate b { font-size: 30px; display: block; }
.spectate .sa { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.summary { position: absolute; inset: 0; background: rgba(2,6,6,0.7); display: flex; align-items: center; justify-content: center; pointer-events: auto; backdrop-filter: blur(3px); }
.summary .box { text-align: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 30px 50px; min-width: 460px; }
.summary h1 { font-size: 64px; font-weight: 900; }
.summary h1.win { color: var(--gold); text-shadow: 0 0 30px rgba(255,216,74,0.6); }
.summary .place { font-size: 26px; color: var(--muted); letter-spacing: 0.2em; }
.summary .srow { display: flex; gap: 20px; justify-content: center; margin: 18px 0; }
.summary .srow div b { display: block; font-size: 34px; color: var(--teal); }
.summary .srow div span { font-size: 12px; letter-spacing: 0.15em; color: var(--muted); }
.summary .reward { font-size: 22px; letter-spacing: 0.1em; color: var(--gold); margin: 8px 0 16px; min-height: 30px; }
.summary .reward b { font-size: 44px; display: block; animation: pop .6s ease-out; }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
.summary .sactions { display: flex; gap: 10px; justify-content: center; }
.teamlist { left: 24px; top: 20px; display: flex; flex-direction: column; gap: 6px; }
.tm { background: rgba(0,0,0,0.5); padding: 4px 8px; width: 200px; font-size: 14px; }
.tm .tmbar { height: 5px; background: rgba(255,255,255,0.15); margin-top: 3px; display: flex; }
.tm .tmbar .h { background: #39f0c8; height: 100%; } .tm .tmbar .s { background: #7cc8ff; height: 100%; }
.tm.down { color: var(--red); }
.emotewheel { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 360px; height: 360px; pointer-events: auto; }
.emotewheel button { position: absolute; width: 96px; height: 60px; background: rgba(0,0,0,0.65); border: 1px solid var(--line); color: #fff; font-family: var(--cond); font-size: 15px; letter-spacing: 0.06em; border-radius: 6px; }
.emotewheel button:hover { border-color: var(--teal); background: rgba(57,240,200,0.2); }
.editgrid { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: grid; gap: 4px; pointer-events: none; }
.editgrid div { width: 44px; height: 44px; background: rgba(57,240,200,0.35); border: 1px solid #39f0c8; }
.editgrid div.off { background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.3); }
.editgrid div.hover { outline: 2px solid #fff; }
.tip { left: 50%; bottom: 120px; transform: translateX(-50%); font-size: 15px; color: rgba(255,255,255,0.75); letter-spacing: 0.06em; text-shadow: 0 1px 3px #000; text-align: center; }
.pause { position: absolute; inset: 0; background: rgba(2,6,6,0.6); display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.pause .box { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 24px 30px; display: flex; flex-direction: column; gap: 8px; min-width: 300px; }
.pause h2 { font-size: 30px; text-align: center; margin-bottom: 6px; }
.medbar { left: 24px; bottom: 150px; display: flex; gap: 6px; }
.medal { width: 34px; height: 34px; border-radius: 50%; border: 2px solid; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; background: rgba(0,0,0,0.6); }
.reviving { left: 50%; top: 66%; transform: translateX(-50%); text-align: center; font-size: 20px; color: var(--gold); text-shadow: 0 1px 4px #000; }
.notice { left: 50%; top: 22%; transform: translateX(-50%); font-size: 24px; letter-spacing: 0.12em; color: var(--gold); text-shadow: 0 2px 8px #000; animation: fadein .3s; text-align: center; }
.notice small { display: block; font-size: 14px; color: #fff; letter-spacing: 0.2em; }


/* ---------- UI polish pass ---------- */
.topbar { height: 70px; padding: 0 28px; background: linear-gradient(180deg, rgba(3,8,7,0.95) 0%, rgba(3,8,7,0.6) 70%, rgba(3,8,7,0) 100%); }
.nav { font-size: 20px; padding: 14px 14px; letter-spacing: 0.12em; }
.nav.active { border-bottom-color: var(--teal); }
.currency, .profile, .level { height: 38px; }
.view { inset: 70px 0 0 0; }
.party-strip { top: 18px; left: 28px; gap: 8px; }
.party-card { min-width: 168px; padding: 10px 14px; border-radius: 8px; background: rgba(6,16,15,0.82); }
.party-card.empty { min-width: 120px; font-size: 14px; letter-spacing: 0.1em; }
.playbox { right: 40px; bottom: 44px; gap: 12px; }
.mode-select { width: 340px; padding: 12px; border-radius: 10px; background: rgba(6,16,15,0.88); }
.mode { padding: 9px 14px; border-radius: 8px; }
.mode b { font-size: 19px; }
.mode span { font-size: 12px; }
.mode.active { box-shadow: 0 0 0 1px var(--teal) inset, 0 0 18px rgba(57,240,200,0.15); }
.ready-row { justify-content: flex-end; }
.btn.huge { min-width: 340px; padding: 16px 48px; font-size: 38px; border-radius: 8px; }
.lobby-bottom { left: 28px; bottom: 40px; }
.news-card { width: 236px; border-radius: 8px; background: rgba(6,16,15,0.82); }
.emote-bar button { border-radius: 6px; padding: 6px 12px; }
.panel { left: 28px; right: 28px; top: 18px; bottom: 28px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
.panel-head { padding: 14px 22px; gap: 22px; background: rgba(0,0,0,0.18); }
.panel-head h2 { font-size: 28px; }
.cats button { padding: 7px 13px; border-radius: 6px; font-size: 14px; }
.cats button:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.grid { padding: 18px 22px; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.card { border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); border-color: rgba(255,255,255,0.08); }
.card .art { background: radial-gradient(circle at 50% 35%, rgba(57,240,200,0.10), transparent 62%); }
.card .name { font-size: 15px; }
.preview { width: 440px; background: rgba(0,0,0,0.2); }
.preview-info h3 { font-size: 24px; }
.shop-body { padding: 82px 24px 24px; }
.shop-section h3 { font-size: 20px; letter-spacing: 0.14em; }
.shop-row { gap: 14px; }
.friends-body { padding: 18px 24px; }
.friend { border-radius: 8px; padding: 9px 12px; background: rgba(255,255,255,0.025); }
.friend .fname { font-size: 17px; }
.settings-body { padding: 14px 28px 40px; max-width: 1100px; }
.setting { grid-template-columns: 1fr 300px; padding: 9px 0; }
.setting label { font-size: 16px; }
.settings-body h3 { font-size: 14px; letter-spacing: 0.25em; margin: 22px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.setting .toggle { border-radius: 6px; }
.setting .toggle button { padding: 6px 16px; font-size: 14px; }
.keybind button { border-radius: 6px; font-size: 14px; }
.career-body { padding: 22px 28px; gap: 22px; }
.stat { border-radius: 8px; }
.stat b { font-size: 28px; }
.mm-card { border-radius: 14px; min-width: 400px; }
.toast { border-radius: 8px; }
.modal { border-radius: 12px; }
input[type=range] { accent-color: var(--teal); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px !important; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(57,240,200,0.25); border-radius: 5px; } ::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
/* in-game HUD tidy */
.vitals { width: 340px; }
.vitals .bar { height: 16px; }
.mats .m { font-size: 15px; padding: 3px 9px; }
.slot { width: 58px; height: 58px; }
.buildhud .bp { width: 48px; height: 48px; }
.minimap { width: 200px; height: 200px; }
.counter { font-size: 16px; }
.storm-timer { font-size: 15px; }
.ammo b { font-size: 36px; }
.center-msg { font-size: 38px; }
.notice { font-size: 22px; }

/* responsive lobby: keep PLAY clear of the news cards on narrow windows */
@media (max-width: 1250px) { .news-card { width: 180px; } .news-card span { display: none; } }
@media (max-width: 1050px) { .news { display: none; } .mode-select { width: 300px; } .btn.huge { min-width: 280px; font-size: 32px; } }
@media (max-height: 700px) { .mode { padding: 6px 12px; margin-bottom: 4px; } .mode span { display: none; } .btn.huge { padding: 12px 40px; } }
