:root { --bg: #14181d; --panel: rgba(20, 24, 29, 0.86); --line: rgba(255, 255, 255, 0.14); --text: #f2efe8; --dim: #a9a79f; --accent: #e8643c; --t: #e0a24a; --ct: #5fa8e8; --ok: #6fcf7a; font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; font-size: 16px; -webkit-user-select: none; user-select: none; touch-action: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 20; }
#ui > * { pointer-events: auto; }
#toast { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: rgba(0, 0, 0, 0.72); padding: 9px 18px; border-radius: 8px; font-size: 16px; animation: fade 3.2s forwards; }
@keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
button { font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.09); border: 1px solid var(--line); border-radius: 8px; padding: 10px 18px; cursor: pointer; }
button:hover { background: rgba(255, 255, 255, 0.16); }
button.primary { background: var(--accent); border-color: transparent; font-weight: 700; }
button.primary:hover { filter: brightness(1.1); }
button:disabled { opacity: 0.45; cursor: default; }
input, select { font: inherit; color: var(--text); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; backdrop-filter: blur(10px); max-width: 94vw; max-height: 94vh; overflow: auto; }
h1 { margin: 0 0 4px; font-size: 34px; letter-spacing: 2px; }
h2 { margin: 0 0 12px; font-size: 19px; }
.sub { color: var(--dim); margin: 0 0 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.menu { width: 440px; }
.menu form { display: flex; flex-direction: column; gap: 12px; }

/* lobby */
.lobby { width: 980px; }
.lobby .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: 2px; color: var(--dim); }
.maps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.map { border: 2px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(0, 0, 0, 0.25); text-align: left; display: flex; gap: 12px; align-items: center; }
.map.on { border-color: var(--accent); background: rgba(232, 100, 60, 0.14); }
.map canvas { width: 92px; height: 78px; border-radius: 6px; background: #23282e; flex: none; }
.map b { font-size: 19px; display: block; }
.map span { color: var(--dim); font-size: 13.5px; line-height: 1.4; display: block; margin-top: 4px; }
.opts { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.opts label { display: flex; flex-direction: column; gap: 6px; color: var(--dim); font-size: 14px; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.team { border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-height: 190px; }
.team h3 { margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.team.g0 h3 { color: var(--t); } .team.g1 h3 { color: var(--ct); }
.team li { list-style: none; padding: 6px 0; display: flex; gap: 8px; align-items: center; }
.team ul { margin: 0; padding: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #666; flex: none; } .dot.on { background: var(--ok); }
.tagx { font-size: 12px; color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 10px; flex-wrap: wrap; }
.keys { color: var(--dim); font-size: 13.5px; line-height: 1.7; margin-top: 14px; }
.keys b { color: var(--text); font-weight: 600; background: rgba(255,255,255,.1); border-radius: 4px; padding: 0 6px; margin: 0 2px; }

/* hud */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
#cross { position: absolute; left: 50%; top: 50%; }
#cross i { position: absolute; background: #7dff8a; box-shadow: 0 0 2px #000; }
#hitm { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; opacity: 0; background: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%); -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
#hitm.hs { filter: drop-shadow(0 0 3px #ff4a3a) hue-rotate(0deg); background: linear-gradient(45deg, transparent 44%, #ff6a55 44%, #ff6a55 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #ff6a55 44%, #ff6a55 56%, transparent 56%); }
#dmg { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px; opacity: 0; border-radius: 50%; background: conic-gradient(from -22deg, rgba(255, 60, 40, 0.9) 0 44deg, transparent 44deg); -webkit-mask: radial-gradient(circle, transparent 108px, #000 110px); mask: radial-gradient(circle, transparent 108px, #000 110px); }
#vig { position: absolute; inset: 0; box-shadow: inset 0 0 160px 40px rgba(200, 20, 10, 0.75); opacity: 0; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
#smoke { position: absolute; inset: 0; background: #b9bdbe; opacity: 0; }
#scope { position: absolute; inset: 0; display: none; background: radial-gradient(circle at center, transparent 0, transparent 34vh, #000 34.6vh); }
#scope::before, #scope::after { content: ""; position: absolute; background: #000; }
#scope::before { left: 0; right: 0; top: 50%; height: 1.5px; } #scope::after { top: 0; bottom: 0; left: 50%; width: 1.5px; }
#topbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; background: rgba(0, 0, 0, 0.45); border-radius: 10px; padding: 6px 16px; }
#topbar .sc { font-size: 26px; font-weight: 800; min-width: 30px; text-align: center; }
#topbar .t { color: var(--t); } #topbar .ct { color: var(--ct); }
#clock { font-size: 24px; font-weight: 700; min-width: 70px; text-align: center; } #clock.bomb { color: #ff5a48; }
#topbar .alive { display: flex; gap: 3px; } #topbar .alive i { width: 8px; height: 14px; border-radius: 2px; background: currentColor; } #topbar .alive i.x { opacity: 0.22; }
#rnd { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); font-size: 13.5px; color: #ddd; }
#radar { position: absolute; left: 12px; top: 62px; border-radius: 10px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); }
#feed { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; font-size: 15px; }
#feed div { background: rgba(0, 0, 0, 0.5); padding: 4px 10px; border-radius: 6px; } #feed .me { outline: 1.5px solid var(--accent); }
#feed .t { color: var(--t); } #feed .ct { color: var(--ct); } #feed em { font-style: normal; color: #ddd; margin: 0 7px; font-size: 13px; }
#vitals { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 18px; align-items: flex-end; }
#vitals .big { font-size: 40px; font-weight: 800; line-height: 1; } #vitals small { display: block; font-size: 13px; color: #ddd; }
#money { position: absolute; left: 16px; bottom: 86px; font-size: 22px; font-weight: 700; color: #a8e48f; }
#buyhint { position: absolute; left: 16px; bottom: 118px; font-size: 14px; color: #fff; background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 6px; }
#ammo { position: absolute; right: 16px; bottom: 14px; text-align: right; }
#ammo .big { font-size: 40px; font-weight: 800; line-height: 1; } #ammo .big span { font-size: 22px; color: #ccc; font-weight: 600; }
#ammo small { display: block; font-size: 14px; color: #ddd; }
#slots { position: absolute; right: 16px; bottom: 84px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 14px; }
#slots div { background: rgba(0, 0, 0, 0.4); padding: 3px 10px; border-radius: 6px; color: #cfcfcf; } #slots div.on { background: rgba(232, 100, 60, 0.75); color: #fff; } #slots b { color: #fff; margin-right: 6px; opacity: .7; }
#prompt { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); font-size: 17px; background: rgba(0, 0, 0, 0.5); padding: 7px 16px; border-radius: 8px; white-space: nowrap; }
#bar { position: absolute; left: 50%; top: 68%; width: 280px; height: 12px; margin-left: -140px; background: rgba(0, 0, 0, 0.55); border-radius: 6px; overflow: hidden; } #bar i { display: block; height: 100%; background: var(--accent); }
#banner { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; white-space: nowrap; }
#banner b { display: block; font-size: 38px; letter-spacing: 3px; } #banner span { font-size: 17px; color: #eee; }
#spec { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); font-size: 16px; background: rgba(0, 0, 0, 0.5); padding: 6px 14px; border-radius: 8px; white-space: nowrap; }
#net { position: absolute; left: 12px; top: 236px; font-size: 13px; color: #9fe0a8; background: rgba(0,0,0,.4); padding: 2px 8px; border-radius: 6px; }

.board { width: 760px; background: rgba(12, 14, 17, 0.9); }
.board table { width: 100%; border-collapse: collapse; font-size: 15.5px; } .board th { text-align: left; color: var(--dim); font-weight: 500; padding: 4px 8px; font-size: 13px; }
.board td { padding: 6px 8px; border-top: 1px solid rgba(255, 255, 255, 0.07); } .board tr.dead td { opacity: 0.45; } .board tr.me td { background: rgba(255, 255, 255, 0.07); }
.board h3 { margin: 12px 0 6px; font-size: 17px; display: flex; justify-content: space-between; } .board h3.t { color: var(--t); } .board h3.ct { color: var(--ct); }

.buy { width: 860px; background: rgba(12, 14, 17, 0.92); }
.buy .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.buy button { text-align: left; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; position: relative; }
.buy button b { font-size: 16px; } .buy button small { color: var(--dim); font-size: 12.5px; line-height: 1.35; } .buy button .p { color: #a8e48f; font-weight: 700; } .buy button .k { position: absolute; right: 8px; top: 6px; color: var(--dim); font-size: 12px; }
.buy button.own { outline: 1.5px solid var(--ok); } .buy button:disabled .p { color: #e88; }
.buy h3 { margin: 14px 0 8px; font-size: 15px; color: var(--dim); font-weight: 500; }

.pausebox { width: 420px; text-align: center; } .pausebox .col { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pausebox label { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--dim); font-size: 15px; } .pausebox input[type=range] { flex: 1; padding: 0; }

.netline { color: var(--dim); font-size: 13.5px; line-height: 1.6; margin: 12px 0 0; } .netline b { color: var(--text); }
@media (max-width: 900px) { .lobby { width: 96vw; padding: 16px; } .maps { grid-template-columns: 1fr; } .map canvas { width: 70px; height: 60px; } .buy .grid { grid-template-columns: repeat(2, 1fr); } h1 { font-size: 26px; } #radar { transform: scale(.7); transform-origin: left top; } }
