html, body { margin: 0; height: 100%; overflow: hidden; background: #000; font-family: system-ui, "Segoe UI", sans-serif; color: #fff; user-select: none; }
canvas { display: block; width: 100vw; height: 100vh; }
[hidden] { display: none !important; }

.overlay { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-y: auto;
  background: radial-gradient(ellipse at center, rgba(10,15,30,.55), rgba(5,8,15,.85)); text-align: center; z-index: 10; }
h1 { font-size: clamp(36px, 6vw, 72px); margin: 0; letter-spacing: 2px; text-shadow: 0 4px 0 #0008, 0 0 30px #ffb34755;
  background: linear-gradient(90deg, #ff6a2a, #3b9cff, #bfefff, #b0884a); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 44px; margin: 0 0 8px; text-shadow: 0 3px 0 #0008; }
.sub { font-size: 20px; opacity: .85; margin: 6px 0 20px; }
.controls { opacity: .8; line-height: 1.7; margin-top: 22px; font-size: 15px; }
#cards { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; max-width: 1200px; padding: 0 12px; }
.card { width: 188px; padding: 10px; border-radius: 14px; background: #0d1220dd; border: 2px solid var(--c); cursor: pointer;
  text-align: left; transition: transform .12s, box-shadow .12s; box-shadow: 0 0 0 #0000; }
.card:hover { transform: translateY(-6px); box-shadow: 0 0 28px var(--c); }
.card .big { text-align: center; height: 110px; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; }
.card .big canvas { margin-bottom: -10px; }
.card h3 { margin: 4px 0 2px; text-align: center; color: var(--c); font-size: 26px; }
.card .tag { text-align: center; font-size: 13px; opacity: .8; margin-bottom: 10px; }
.card ul { margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.45; }
.card li b { color: var(--c); display: inline-block; min-width: 34px; }
.card .pass { margin-top: 8px; font-size: 12px; opacity: .85; font-style: italic; }
button { font: inherit; font-size: 18px; padding: 10px 22px; margin: 8px; border-radius: 10px; border: 2px solid #fff6; background: #ffffff18; color: #fff; cursor: pointer; }
button:hover { background: #ffffff33; }
.row { display: flex; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#info { position: absolute; left: 18px; top: 14px; font-size: 20px; font-weight: 700; text-shadow: 0 2px 3px #000; }
#info #foes { font-size: 15px; font-weight: 400; opacity: .9; }
#cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); }
#cross::before, #cross::after { content: ""; position: absolute; background: #fffd; box-shadow: 0 0 2px #000; }
#cross::before { left: 10px; top: 0; width: 2px; height: 22px; }
#cross::after { top: 10px; left: 0; height: 2px; width: 22px; }
#cross span { position: absolute; left: 8px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--el, #fff); }
#hitmark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 30px; color: #ff4; opacity: 0; text-shadow: 0 0 4px #000; }
#bottom { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, 94vw); }
.bar { position: relative; height: 18px; background: #000a; border: 2px solid #fff4; border-radius: 9px; overflow: hidden; margin-bottom: 6px; }
.bar div { height: 100%; width: 100%; background: linear-gradient(#5f5, #2a2); transition: width .1s; }
.bar.mana div { background: linear-gradient(#6cf, #27c); }
.bar span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 18px; font-weight: 700; text-shadow: 0 1px 2px #000; }
#slots { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.slot { position: relative; width: 74px; height: 74px; border-radius: 10px; background: #0b1020cc; border: 2px solid var(--el, #fff); overflow: hidden; text-align: center; }
.slot .ic { font-size: 30px; margin-top: 6px; }
.slot .nm { font-size: 10px; opacity: .9; line-height: 1.1; padding: 0 2px; }
.slot .key { position: absolute; left: 4px; top: 2px; font-size: 11px; font-weight: 700; opacity: .9; }
.slot .mc { position: absolute; right: 4px; top: 2px; font-size: 10px; color: #8cf; }
.slot .cdv { position: absolute; left: 0; right: 0; bottom: 0; background: #000b; height: 0; }
.slot .cdt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; text-shadow: 0 2px 3px #000; }
.slot .fuel { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 6px; border-radius: 3px; background: #0009; overflow: hidden; }
.slot .fuel div { height: 100%; background: linear-gradient(90deg, #ff4a10, #ffc040); }
.slot.nomana { border-color: #f44; }
#banner { position: fixed; left: 0; right: 0; top: 22%; text-align: center; font-size: 56px; font-weight: 800; text-shadow: 0 4px 0 #0009; opacity: 0; transition: opacity .4s; pointer-events: none; z-index: 6; }
#nums { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
#nums div { position: absolute; left: 0; top: 0; font-weight: 800; font-size: 20px; text-shadow: 0 2px 2px #000; white-space: nowrap; }
#vignette { position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 160px 40px #f00; opacity: 0; z-index: 3; }
#charge { position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); width: 200px; text-align: center; }
#charge .cbar { height: 8px; background: #000a; border: 1px solid #fff6; border-radius: 4px; overflow: hidden; }
#chargefill { height: 100%; width: 0; background: linear-gradient(90deg, #ff3a00, #ffb040); }
#chargefill.full { background: #ffe060; box-shadow: 0 0 10px #ffd040; }
#chargetext { font-size: 13px; font-weight: 700; text-shadow: 0 1px 2px #000; }

#menu { justify-content: flex-start; padding: 18px 0; }
#menu h1 { margin-bottom: 8px; }
#setup { display: flex; gap: 18px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
#choose { display: flex; flex-direction: column; align-items: center; max-width: 920px; }
.step { font-size: 18px; font-weight: 700; margin: 10px 0 8px; display: flex; align-items: center; gap: 10px; }
.step .num { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #fff2; align-items: center; justify-content: center; font-size: 15px; }
#name { font: inherit; font-size: 18px; padding: 6px 12px; border-radius: 8px; border: 2px solid #fff5; background: #0008; color: #fff; width: 220px; }
#looks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.look { background: #0d1220dd; border: 2px solid #fff3; border-radius: 10px; padding: 4px 6px 6px; cursor: pointer; text-align: center; font-size: 13px; }
.look canvas { display: block; margin: -14px auto -6px; }
.look:hover { border-color: #fff9; }
.look.on, .card.on { border-color: #ffd040; box-shadow: 0 0 18px #ffd04088; }
.card.on { transform: translateY(-4px); }
.card .big canvas { margin-bottom: -6px; }
#play { position: sticky; bottom: 12px; z-index: 2; font-size: 24px; font-weight: 800; padding: 12px 48px; margin-top: 16px; background: #3a2f0aee; border-color: #ffd040; box-shadow: 0 4px 20px #000a; }
#play:hover { background: #5a4710ee; }
#netstate { color: #fc8; font-size: 14px; min-height: 1em; margin: 6px; }
#lobby { width: 240px; background: #0d1220dd; border: 2px solid #fff3; border-radius: 12px; padding: 12px; text-align: left; margin-top: 52px; }
#lobby h3 { margin: 0 0 4px; }
#lobbycount { font-size: 13px; opacity: .75; margin-bottom: 8px; }
#online, #players ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
#online li, #players li { padding: 3px 0; display: flex; align-items: center; gap: 6px; }
#online li.me, #players li.me { color: #ffd040; font-weight: 700; }
li.none { opacity: .7; font-style: italic; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kd { margin-left: auto; opacity: .8; font-variant-numeric: tabular-nums; }
#players { position: absolute; right: 14px; top: 12px; width: 230px; background: #000a; border-radius: 10px; padding: 8px 10px; text-shadow: 0 1px 2px #000; }
#players .ph { font-weight: 800; font-size: 14px; margin-bottom: 4px; display: flex; }
#players .ph span { margin-left: auto; font-weight: 400; font-size: 11px; opacity: .7; }
#respawn { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 30px; font-weight: 800; text-shadow: 0 3px 0 #0009; }
