:root {
  --ink: #e9eef7; --dim: #8d9ab3; --gold: #ffb52e; --hot: #ff6a2b; --cyan: #5fe3ff;
  --ok: #7dff9a; --bad: #ff5d6c; --panel: rgba(10, 14, 24, .92); --line: rgba(255, 181, 46, .28);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05070d; color: var(--ink);
  font: 15px/1.4 "Segoe UI", system-ui, sans-serif; user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
h1, h2, #timer, #adr, button, .num { font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif; font-stretch: condensed; }

/* ---- HUD */
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 3px #000; }
#wallet { position: absolute; left: 22px; top: 16px; }
#adr { font-size: 34px; font-weight: 700; color: var(--gold); }
#adr::before { content: "\25C8"; margin-right: 4px; font-size: 26px; }
#rate { display: block; color: var(--dim); font-size: 14px; }
#run { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); text-align: center; }
#area { letter-spacing: .22em; text-transform: uppercase; color: var(--dim); font-size: 13px; }
#timer { font-size: 40px; font-weight: 700; min-height: 48px; }
#par { color: var(--dim); font-size: 13px; }
#cross { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .45); }
#toasts { position: absolute; top: 24%; left: 50%; transform: translateX(-50%); text-align: center; width: min(90vw, 640px); }
.toast { margin: 6px auto; padding: 8px 18px; background: rgba(8, 11, 20, .78); border-left: 3px solid var(--gold);
  display: table; font-size: 17px; animation: pop .25s ease-out; transition: opacity .5s; }
.toast.big { font-size: 24px; border-color: var(--ok); }
.toast.bad { border-color: var(--bad); }
.toast b { color: var(--gold); }
.toast.out { opacity: 0; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
#hint { position: absolute; bottom: 20%; left: 50%; transform: translateX(-50%); color: var(--cyan); font-size: 17px;
  text-align: center; max-width: 80vw; }
#chips { position: absolute; left: 22px; bottom: 18px; display: flex; gap: 6px; flex-wrap: wrap; max-width: 46vw; }
.chip { padding: 3px 9px; border: 1px solid var(--line); background: rgba(8, 11, 20, .6); font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase; }
.chip.wait { opacity: .35; }
#speed { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); text-align: center; }
#spd { font-size: 26px; }
#speed small { display: block; color: var(--dim); font-size: 11px; letter-spacing: .15em; }
#keys { position: absolute; right: 22px; bottom: 18px; color: var(--dim); font-size: 12px; }

/* ---- menu */
#menu { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(5, 7, 13, .55), rgba(5, 7, 13, .9)); }
#menu.open { display: flex; }
#panel { width: min(880px, 94vw); max-height: 92vh; display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); box-shadow: 0 20px 80px #000; }
header { display: flex; align-items: center; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
h1 { margin: 0; font-size: 28px; letter-spacing: .04em; text-transform: uppercase; }
h1 span { color: var(--hot); }
nav { display: flex; gap: 4px; flex: 1; }
#menuAdr { color: var(--gold); font-size: 20px; font-weight: 700; }
main { padding: 16px 20px; overflow-y: auto; flex: 1; min-height: 240px; }
footer { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
button { font-size: 15px; padding: 7px 14px; color: var(--ink); background: #1b2333; border: 1px solid #33405a; cursor: pointer;
  letter-spacing: .05em; text-transform: uppercase; }
button:hover:not(:disabled) { border-color: var(--gold); color: #fff; }
button:disabled { opacity: .4; cursor: default; }
nav button.on { background: var(--gold); color: #14100a; border-color: var(--gold); }
#resume { background: var(--hot); border-color: var(--hot); color: #fff; font-size: 18px; padding: 9px 26px; }
button.buy { min-width: 128px; color: var(--gold); }
button.buy.can { border-color: var(--gold); background: #2a2110; }
h2 { margin: 18px 0 8px; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
h2:first-child { margin-top: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 9px 12px; margin-bottom: 4px; background: rgba(255, 255, 255, .035);
  border-left: 3px solid transparent; }
.row .txt { flex: 1; min-width: 0; }
.row .name { font-weight: 600; }
.row .sub { color: var(--dim); font-size: 13px; }
.row.owned { border-left-color: var(--ok); }
.row.next { border-left-color: var(--gold); }
.row.locked { opacity: .45; }
.row .num { font-size: 15px; color: var(--dim); text-align: right; min-width: 96px; }
.medal { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: #444; }
.medal.gold { background: var(--gold); } .medal.silver { background: #cfd6e4; } .medal.bronze { background: #c77b45; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.keys dt { color: var(--gold); font-weight: 600; white-space: nowrap; }
.keys dd { margin: 0; color: var(--ink); }
p { margin: 0 0 10px; }
.lead { font-size: 17px; }
label.set { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
label.set span { width: 170px; }
input[type=range] { flex: 1; accent-color: var(--gold); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); }
.danger { color: var(--bad); border-color: #5a2c33; }
body.free.playing, body.free.playing #view { cursor: none; }

/* ---- health and the shield gun */
#vitals { position: absolute; left: 22px; bottom: 54px; display: flex; align-items: flex-end; gap: 18px; }
#health b { font-family: "Bahnschrift", "Arial Narrow", sans-serif; font-size: 40px; line-height: 1; color: var(--ok); }
#health b.low { color: var(--bad); }
#health b::before { content: "\271A"; font-size: 24px; margin-right: 6px; }
#air { display: none; }
#air b { font-family: "Bahnschrift", "Arial Narrow", sans-serif; font-size: 40px; line-height: 1; color: #8fd0ff; }
#air b.low { color: var(--bad); }
#vitals small { display: block; color: var(--dim); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }
#gun { width: 170px; }
#gun .meter { height: 7px; margin-top: 5px; background: rgba(8, 11, 20, .7); border: 1px solid #33405a; }
#gun .meter i { display: block; height: 100%; width: 0; background: var(--cyan); }
#chargeBar { background: var(--gold) !important; }
#chargeBar.full { background: #fff !important; box-shadow: 0 0 8px var(--gold); }
#shieldfx, #hurtfx { position: absolute; inset: 0; opacity: 0; transition: opacity .08s; }
#shieldfx { background: radial-gradient(ellipse at 50% 62%, rgba(95, 227, 255, .05) 30%, rgba(95, 227, 255, .34) 62%, rgba(95, 227, 255, .12) 100%); border: 3px solid rgba(95, 227, 255, .35); }
#hurtfx { background: radial-gradient(ellipse at center, rgba(255, 40, 40, 0) 45%, rgba(255, 40, 40, .55) 100%); transition: none; }

/* ---- adrenaline */
#adren b { font-family: "Bahnschrift", "Arial Narrow", sans-serif; font-size: 40px; line-height: 1; color: var(--gold); }
#adren b::before { content: "\26A1"; font-size: 24px; margin-right: 4px; }
#adren b.full { color: #fff; text-shadow: 0 0 10px var(--gold), 0 0 22px var(--hot); }
body.speeding #view { filter: saturate(1.35) contrast(1.05); }

/* under water: UT's brown murk */
#waterfx { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(70, 52, 30, .35), rgba(40, 28, 14, .85)); opacity: 0; transition: opacity .2s; }
