:root { --ink: #f4f1ea; --dim: #a9a49a; --green: #3ddc84; --pink: #ff3d8b; --cyan: #3df0ff; --panel: rgba(10, 12, 18, 0.88); --ui: Inter, system-ui, sans-serif; --display: 'Bebas Neue', Impact, sans-serif; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--ink); font-family: var(--ui); user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid rgba(255,255,255,0.5); border-radius: 4px; font: 700 0.85em var(--ui); text-align: center; background: rgba(0,0,0,0.3); }
.txt { text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

#hud { position: fixed; inset: 0; pointer-events: none; }
#top-right { position: absolute; top: 18px; right: 24px; text-align: right; text-shadow: 0 2px 4px rgba(0,0,0,0.85), 0 0 2px #000; }
#money { font: 44px/1 var(--display); color: var(--green); letter-spacing: 0.02em; -webkit-text-stroke: 1px rgba(0,0,0,0.6); }
#weapon { margin-top: 8px; font-weight: 800; font-size: 15px; display: flex; gap: 10px; justify-content: flex-end; align-items: baseline; }
#ammo { font: 26px/1 var(--display); }
#stars { margin-top: 8px; display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity 0.3s; }
#stars.show { opacity: 1; }
#stars i { width: 26px; height: 26px; background: rgba(255,255,255,0.18); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
#stars i.on { background: #fff; filter: drop-shadow(0 0 4px #fff); }
#stars i.blink { animation: blink 0.5s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

#bottom-left { position: absolute; left: 24px; bottom: 22px; width: 200px; }
#minimap { width: 200px; height: 200px; display: block; border-radius: 50%; box-shadow: 0 6px 22px rgba(0,0,0,0.55); }
#bars { display: flex; gap: 4px; margin-top: 5px; }
.bar { flex: 1; height: 8px; background: rgba(0,0,0,0.55); border-radius: 2px; overflow: hidden; }
#hp-bar { height: 100%; width: 100%; background: #4cc265; transition: width 0.2s; }
#hp-bar.low { background: #e04040; animation: blink 0.8s infinite; }
.armor #armor-bar { height: 100%; width: 0; background: #4aa8ff; transition: width 0.2s; }
#clock { position: absolute; top: 18px; left: 24px; font: 26px var(--display); letter-spacing: 0.08em; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
#fps { position: absolute; top: 52px; left: 24px; font: 600 12px var(--ui); color: var(--dim); }
#speedo { position: absolute; right: 28px; bottom: 24px; text-align: right; text-shadow: 0 2px 6px rgba(0,0,0,0.9); }
#kmh { font: 72px/0.9 var(--display); }
#speedo small { display: block; font: 800 12px var(--ui); letter-spacing: 0.3em; color: var(--dim); }
#tag { position: absolute; right: 28px; bottom: 120px; text-align: right; opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; text-shadow: 0 2px 6px rgba(0,0,0,0.9); }
#tag.show { opacity: 1; transform: none; }
#tag b { display: block; font: 48px/1 var(--display); letter-spacing: 0.03em; }
#tag span { font: 600 14px var(--ui); color: var(--dim); letter-spacing: 0.15em; text-transform: uppercase; }
#notify { position: absolute; top: 60px; left: 24px; max-width: 360px; padding: 12px 16px; background: var(--panel); border-left: 3px solid var(--pink); font-size: 14px; line-height: 1.45; opacity: 0; transform: translateX(-12px); transition: opacity 0.3s, transform 0.3s; }
#notify.show { opacity: 1; transform: none; }
#prompt { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); padding: 8px 16px; background: var(--panel); border-radius: 6px; font-weight: 600; font-size: 15px; opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
#prompt.show { opacity: 1; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,0.6); opacity: 0; }
#crosshair.show { opacity: 0.9; }
#crosshair.hot { background: #ff3b3b; }

#big { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: radial-gradient(transparent, rgba(0,0,0,0.6)); z-index: 5; pointer-events: none; }
#big b { font: clamp(64px, 12vw, 150px)/1 var(--display); letter-spacing: 0.06em; text-shadow: 0 6px 30px rgba(0,0,0,0.8); }
#big span { font: 600 18px var(--ui); color: var(--ink); text-shadow: 0 2px 6px #000; }

#map { position: fixed; inset: 0; z-index: 10; background: #1b232c; }
#map-canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.map-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 14px; align-items: center; padding: 12px 18px; background: linear-gradient(rgba(0,0,0,0.7), transparent); }
.map-bar b { font: 30px var(--display); letter-spacing: 0.08em; }
.map-bar span { flex: 1; color: var(--dim); font-size: 13px; }

button { font: 700 14px var(--ui); letter-spacing: 0.04em; padding: 10px 16px; border: 0; border-radius: 6px; cursor: pointer; background: var(--ink); color: #111; }
button:hover:not(:disabled) { background: #fff; }
button:disabled { opacity: 0.35; cursor: not-allowed; }
.map-bar button { background: rgba(255,255,255,0.12); color: var(--ink); }

#shop { position: fixed; top: 24px; right: 24px; bottom: 24px; width: min(420px, calc(100vw - 48px)); z-index: 10; background: var(--panel); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; display: flex; flex-direction: column; backdrop-filter: blur(6px); }
#shop header { padding: 20px 22px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
#shop header small { color: var(--pink); font-weight: 800; letter-spacing: 0.3em; font-size: 11px; }
#shop h2 { margin: 2px 0; font: 40px var(--display); letter-spacing: 0.04em; }
#shop-cash { font: 28px var(--display); color: var(--green); }
#shop-list { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; flex: 1; }
#shop-list li { display: flex; gap: 12px; align-items: center; padding: 12px 22px; border-bottom: 1px solid rgba(255,255,255,0.06); }
#shop-list li div { flex: 1; }
#shop-list li b { display: block; font-size: 15px; }
#shop-list li span { font-size: 12.5px; color: var(--dim); }
#shop-list li.owned b { color: var(--green); }
#shop footer { padding: 14px 22px; }
#shop footer button { width: 100%; }

#menu { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(5,6,10,0.6); backdrop-filter: blur(4px); }
.panel { width: min(420px, calc(100vw - 32px)); padding: 28px; background: var(--panel); border-radius: 14px; border: 1px solid rgba(255,255,255,0.12); display: flex; flex-direction: column; gap: 10px; }
.panel h1, .panel h2 { margin: 0 0 6px; font: 44px var(--display); letter-spacing: 0.06em; }
.panel > button { background: rgba(255,255,255,0.08); color: var(--ink); text-align: left; padding: 13px 16px; font-size: 15px; }
.panel > button:hover { background: var(--pink); color: #fff; }
.panel label { font-size: 13px; font-weight: 600; color: var(--dim); }
.panel label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.panel input[type=range] { width: 100%; accent-color: var(--pink); }
.seg { display: flex; gap: 4px; }
.seg button { flex: 1; background: rgba(255,255,255,0.08); color: var(--ink); padding: 9px 4px; }
.seg button[aria-pressed=true] { background: var(--pink); color: #fff; }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 8px; font-size: 14px; }
.panel dt { font-weight: 800; }
.panel dd { margin: 0; color: var(--dim); }

#title { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 12px; padding: 0 0 9vh 7vw; background: linear-gradient(90deg, rgba(5,5,12,0.85), rgba(5,5,12,0.2) 60%, transparent); }
#title .logo { font: clamp(90px, 16vw, 200px)/0.82 var(--display); display: flex; flex-direction: column; }
#title .logo span:first-child { color: var(--pink); text-shadow: 0 0 30px rgba(255,61,139,0.6); }
#title .logo span:last-child { color: var(--cyan); text-shadow: 0 0 30px rgba(61,240,255,0.5); }
#title p { margin: 4px 0 14px; font-size: 18px; color: var(--ink); }
#title button { min-width: 220px; padding: 14px 20px; font-size: 16px; text-align: left; }
#title button#btn-new { background: rgba(255,255,255,0.12); color: var(--ink); }
#title small { color: var(--dim); margin-top: 8px; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; font: 36px var(--display); letter-spacing: 0.1em; background: #000; z-index: 40; }

.map-legend { position: absolute; left: 18px; top: 70px; width: 210px; padding: 14px 16px; background: rgba(10,12,18,0.82); border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); }
.map-legend b { font: 22px var(--display); letter-spacing: 0.08em; }
.map-legend ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.map-legend li { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.map-legend li[data-x]:hover { color: var(--pink); }
.map-legend i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; color: #111; font-weight: 800; flex: none; }
.map-legend small { color: var(--dim); font-size: 11.5px; }
@media (max-width: 700px) { .map-legend { display: none; } #bottom-left, #minimap { width: 150px; } #minimap { height: 150px; } }
#shop-list li.head { padding: 14px 22px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pink); border: 0; }
