:root {
  --acc: #ffd27a;
  --font: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: var(--font); color: #eee; user-select: none; }
canvas { display: block; }
#app { position: fixed; inset: 0; }
.hidden { display: none !important; }
.dim { opacity: .65; }
.small { font-size: 12px; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.ch { position: absolute; background: #fff; box-shadow: 0 0 2px #000; opacity: .9; }
.ch-t, .ch-b { width: 2px; height: 8px; left: -1px; }
.ch-l, .ch-r { height: 2px; width: 8px; top: -1px; }
.ch-t { bottom: var(--gap, 6px); } .ch-b { top: var(--gap, 6px); }
.ch-l { right: var(--gap, 6px); } .ch-r { left: var(--gap, 6px); }
#crosshair.ads .ch { opacity: .35; }
#hitmarker { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; opacity: 0; transition: opacity .15s; }
#hitmarker::before, #hitmarker::after { content: ""; position: absolute; left: 9px; top: -2px; width: 2px; height: 24px; background: #fff; }
#hitmarker::before { transform: rotate(45deg); } #hitmarker::after { transform: rotate(-45deg); }
#hitmarker.kill::before, #hitmarker.kill::after { background: #ff4040; }
#scanlock { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border: 2px solid #5ff; border-radius: 50%; opacity: 0; transform: scale(2); transition: transform .15s, opacity .15s; }

#dmgvignette { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, rgba(255,0,0,0) 45%, rgba(180,0,0,.75) 100%); }

#compass { position: absolute; top: 18px; left: 50%; width: 320px; height: 22px; margin-left: -160px; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.35); }
#compass-strip { position: absolute; top: 0; left: 160px; white-space: nowrap; font-family: var(--mono); font-size: 12px; letter-spacing: 0; will-change: transform; }
#compass-strip span { display: inline-block; width: 45px; text-align: center; color: rgba(255,255,255,.8); }
#compass-strip span.card { color: var(--acc); font-weight: bold; }
#compass-tick { position: absolute; left: 50%; top: 14px; width: 2px; height: 8px; margin-left: -1px; background: var(--acc); }

#objective { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); font-size: 13px; text-align: center; text-shadow: 0 0 4px #000; }
#obj-label { color: var(--acc); font-weight: bold; letter-spacing: 2px; margin-right: 10px; font-size: 11px; }

#killfeed { position: absolute; top: 90px; right: 24px; text-align: right; font-size: 13px; font-family: var(--mono); }
#killfeed div { opacity: .95; margin-bottom: 4px; text-shadow: 0 0 4px #000; transition: opacity .5s; }
#killfeed div.fade { opacity: 0; }

#ammo { position: absolute; right: 28px; bottom: 26px; text-align: right; font-family: var(--mono); text-shadow: 0 0 6px #000; }
#weapon-name { font-size: 12px; letter-spacing: 3px; color: var(--acc); }
#ammo-count { font-size: 34px; line-height: 1; }
#mag { font-weight: bold; } #reserve { font-size: 16px; opacity: .7; margin-left: 8px; }
#ammo.low #mag { color: #ff5a5a; }
#reload-bar { width: 140px; height: 3px; background: rgba(255,255,255,.15); margin-top: 6px; margin-left: auto; }
#reload-fill { height: 100%; width: 0%; background: var(--acc); }

#health { position: absolute; left: 28px; bottom: 30px; width: 220px; height: 8px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); }
#health-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff6a3d, #ffd27a); transition: width .15s; }

#dialogue { position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%); max-width: 720px; text-align: center; font-size: 17px; font-style: italic; color: #fff; text-shadow: 0 0 6px #000, 0 0 2px #000; opacity: 0; transition: opacity .4s; }
#dialogue.show { opacity: 1; }
#dialogue b { font-style: normal; color: var(--acc); margin-right: 6px; }

#titlecard { position: absolute; top: 34%; left: 0; right: 0; text-align: center; opacity: 0; transition: opacity 1s; }
#titlecard.show { opacity: 1; }
#title-id { font-family: var(--mono); letter-spacing: 8px; color: var(--acc); font-size: 14px; }
#title-name { font-size: 44px; font-weight: 200; letter-spacing: 6px; text-transform: uppercase; }

#journal { position: absolute; right: 28px; top: 140px; width: 300px; padding: 14px 16px; background: rgba(0,0,0,.65); border-left: 2px solid var(--acc); backdrop-filter: blur(4px); font-size: 13px; line-height: 1.45; pointer-events: none; }
#journal-head { font-size: 10px; letter-spacing: 3px; color: var(--acc); }
#journal-title { font-weight: bold; margin: 6px 0; font-size: 15px; }

/* F3 */
#f3 { position: fixed; left: 12px; top: 12px; font-family: var(--mono); font-size: 12px; line-height: 1.35; color: #cfc; background: rgba(0,0,0,.6); padding: 8px 10px; pointer-events: none; white-space: pre; z-index: 5; }

/* Menu */
#menu, #gameover { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, rgba(10,12,20,.9), rgba(0,0,0,.97)); z-index: 10; text-align: center; }
#menu-panel { width: 420px; }
h1 { font-weight: 200; letter-spacing: 14px; font-size: 48px; margin: 0 0 8px; }
button { display: block; width: 100%; margin: 10px 0; padding: 12px; background: transparent; border: 1px solid var(--acc); color: var(--acc); font-size: 15px; letter-spacing: 4px; cursor: pointer; font-family: var(--font); }
button:hover { background: var(--acc); color: #000; }
#options { text-align: left; margin-top: 12px; padding: 12px; border: 1px solid rgba(255,255,255,.15); }
#options label { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; font-size: 13px; }
#options input[type=range] { width: 150px; }
#options select { background: #111; color: #eee; border: 1px solid #444; }
#gameover h1 { color: #ff5a5a; }
#gameover button { width: 260px; }
