:root { --bg: rgba(12, 16, 22, .82); --fg: #eef2f6; --dim: #9aa6b2; --acc: #57d38c; --red: #ff5c5c; --gold: #ffd166; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0f14; color: var(--fg); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; user-select: none; -webkit-user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
.small { font-size: 13px; } .dim { color: var(--dim); }
button { font: inherit; color: var(--fg); background: #263241; border: 1px solid #3a4a5d; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button:hover { background: #30404f; } button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--acc); color: #06210f; border-color: var(--acc); font-weight: 700; }
button.danger { background: #5a1f24; border-color: #a33; }
input, select { font: inherit; background: #1a222c; color: var(--fg); border: 1px solid #3a4a5d; border-radius: 6px; padding: 5px 8px; }
input[type=color] { padding: 0; width: 42px; height: 28px; }
input[type=range] { width: 100%; padding: 0; }
.card { background: var(--bg); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px 18px; backdrop-filter: blur(6px); box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.card h3 { margin: 0 0 10px; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; overflow-y: auto; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.brand { text-align: center; text-shadow: 0 4px 24px rgba(0,0,0,.7); }
.brand h1 { font-size: clamp(56px, 12vw, 110px); margin: 0; letter-spacing: 6px; font-weight: 900; font-style: italic; background: linear-gradient(180deg, #fff, #ffd166 60%, #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { margin: 0; font-size: 17px; }
#start .card { width: min(520px, 100%); }
#accounts .acct { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
#accounts .acct .who { flex: 1; } #accounts .acct .who b { display: block; }
#newBtn { width: 100%; margin-top: 10px; }
#creator { align-items: flex-start; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 60%); }
.creator { width: min(380px, 100%); display: flex; flex-direction: column; gap: 8px; }
.creator label { display: flex; flex-direction: column; gap: 3px; }
.creator .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.creator .row.colors label { flex-direction: column; font-size: 12px; }
.creator .row button { flex: 1; }
.swatches { display: flex; gap: 6px; } .swatches i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; display: inline-block; }
.swatches i.on { border-color: #fff; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#tr { position: absolute; top: 12px; right: 64px; text-align: right; text-shadow: 0 2px 6px #000, 0 0 2px #000; }
#clock { font-size: 15px; color: #dfe7ee; }
#money { font-size: 30px; font-weight: 800; color: #9be89b; font-family: "Arial Black", system-ui, sans-serif; }
#wanted { font-size: 26px; letter-spacing: 2px; min-height: 30px; }
#wanted .on { color: #fff; } #wanted .off { color: rgba(255,255,255,.18); } #wanted.flash .on { animation: fl .5s steps(2) infinite; }
@keyframes fl { 50% { color: #5b8cff; } }
#radar { position: absolute; left: 14px; bottom: 14px; width: 200px; }
#minimap { width: 200px; height: 200px; border-radius: 10px; border: 3px solid rgba(0,0,0,.6); background: #1d2a1d; display: block; }
#bars { display: flex; gap: 3px; margin-top: 4px; } .bar { flex: 1; height: 7px; background: rgba(0,0,0,.6); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 50%; } .bar.hp i { background: #5fd35f; } .bar.st i { background: #4fa3ff; } .bar.en i { background: #ffd166; }
#prompt { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); background: rgba(0,0,0,.7); padding: 8px 14px; border-radius: 8px; font-weight: 600; display: none; white-space: nowrap; }
#feed { position: absolute; top: 12px; left: 14px; width: min(380px, 70vw); display: flex; flex-direction: column; gap: 6px; }
#feed div { background: rgba(0,0,0,.65); padding: 7px 11px; border-radius: 8px; border-left: 3px solid var(--acc); animation: fin .25s; }
#feed div.bad { border-left-color: var(--red); } #feed div.gold { border-left-color: var(--gold); }
@keyframes fin { from { opacity: 0; transform: translateX(-12px); } }
#lockHint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.55); padding: 8px 14px; border-radius: 8px; display: none; }
#menuBtn { position: absolute; top: 10px; right: 12px; pointer-events: auto; font-size: 20px; padding: 4px 11px; }
#stats { position: absolute; right: 14px; top: 140px; width: 300px; max-height: calc(100vh - 160px); overflow-y: auto; pointer-events: auto; }
.stat { margin: 6px 0; } .stat .lbl { display: flex; justify-content: space-between; font-size: 13px; }
.stat .track { height: 8px; background: #111a22; border-radius: 4px; overflow: hidden; } .stat .track i { display: block; height: 100%; background: linear-gradient(90deg, #57d38c, #b4f06e); }
.titles { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; } .titles span { background: #3a2f12; color: var(--gold); border-radius: 10px; padding: 2px 8px; font-size: 12px; }
#panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; z-index: 5; }
#pBody { display: flex; flex-direction: column; gap: 7px; margin: 10px 0; }
#pBody button { text-align: left; display: flex; justify-content: space-between; gap: 10px; }
#pBody button small { color: var(--dim); }
#pBody .colors { display: flex; gap: 12px; flex-wrap: wrap; } #pBody .colors label { display: flex; flex-direction: column; font-size: 12px; }
#pClose { width: 100%; }
#big { position: fixed; left: 0; right: 0; top: 40%; text-align: center; font: italic 900 clamp(48px, 10vw, 96px) "Arial Black", system-ui; letter-spacing: 4px; pointer-events: none; opacity: 0; transition: opacity .4s; text-shadow: 0 6px 30px #000; }
#big.show { opacity: 1; }
#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s; display: flex; align-items: center; justify-content: center; font-size: 22px; }
#fade.on { opacity: 1; pointer-events: auto; }
#touch { position: fixed; inset: 0; pointer-events: none; }
#stick { position: absolute; left: 24px; bottom: 240px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.25); pointer-events: auto; touch-action: none; }
#knob { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.4); }
#tbtns { position: absolute; right: 16px; bottom: 24px; display: grid; grid-template-columns: repeat(3, 62px); gap: 10px; pointer-events: auto; }
#tbtns button { width: 62px; height: 62px; border-radius: 50%; font-size: 22px; background: rgba(30,40,52,.7); touch-action: none; }
#tbtns button.on { background: rgba(87,211,140,.6); }
@media (max-width: 640px) { #radar { width: 130px; } #minimap { width: 130px; height: 130px; } #money { font-size: 22px; } #wanted { font-size: 20px; } #stats { left: 14px; right: 14px; width: auto; } }
#xhair { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; display: none; }
#xhair::before, #xhair::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 2px #000; }
#xhair::before { left: 8px; top: 0; width: 2px; height: 18px; } #xhair::after { top: 8px; left: 0; height: 2px; width: 18px; }
#weapon { position: absolute; right: 16px; top: 112px; font-weight: 700; text-shadow: 0 2px 6px #000; }
