:root { --y: #ffd23f; --b: #4da3ff; --g: #5be36a; --r: #e8334a; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0b0d12; color: #fff; font-family: Oswald, 'Arial Narrow', sans-serif; user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; transition: filter 1.2s; }
body.dead #c { filter: grayscale(0.85) contrast(1.1) brightness(0.85); }
.screen { position: fixed; inset: 0; display: none; z-index: 20; }
.screen.show { display: flex; }

.logo { display: flex; flex-direction: column; align-items: flex-start; line-height: 0.85; }
.logo .s { font-family: Pacifico, cursive; font-size: 96px; background: linear-gradient(180deg, #ffe46b, #ff7a3d 55%, #ff3f8e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 rgba(0,0,0,0.35)); padding: 0 12px 10px 0; }
.logo .h { font-family: Anton, Impact, sans-serif; font-size: 150px; letter-spacing: 6px; color: #fff; text-shadow: 0 6px 0 #ff3f8e, 0 12px 30px rgba(0,0,0,0.5); margin-top: -18px; }
.logo.small .s { font-size: 48px; } .logo.small .h { font-size: 70px; margin-top: -8px; text-shadow: 0 4px 0 #ff3f8e; }

#loading { background: linear-gradient(180deg, #2a1846 0%, #b8396b 55%, #ff9a52 100%); align-items: center; justify-content: center; flex-direction: column; gap: 30px; }
#loading .logo { align-items: center; }
.loadtxt { font-size: 20px; letter-spacing: 3px; opacity: 0.85; }

#title { background: linear-gradient(90deg, rgba(10,6,22,0.82) 0%, rgba(10,6,22,0.35) 45%, rgba(0,0,0,0) 70%); align-items: center; }
.tl { padding-left: 7vw; display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.tag { font-size: 22px; letter-spacing: 8px; color: #ffd9b0; margin-top: -4px; }
.tbtns { display: flex; gap: 14px; margin-top: 18px; }
.tb { font-family: Anton, Impact, sans-serif; font-size: 30px; letter-spacing: 3px; padding: 12px 40px; border: none; background: #fff; color: #111; cursor: pointer; clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%); transition: transform 0.12s, background 0.12s; }
.tb:hover { transform: scale(1.05); background: var(--y); }
.tb.ghost { background: rgba(255,255,255,0.12); color: #fff; }
.tb.ghost:hover { background: rgba(255,255,255,0.3); }
.controls { margin-top: 20px; font-size: 15px; line-height: 1.7; color: #e6e1f0; opacity: 0.9; font-weight: 400; }
.controls b { color: var(--y); margin-right: 8px; letter-spacing: 1px; }

#hud { position: fixed; inset: 0; pointer-events: none; display: none; z-index: 10; }
#hud.show { display: block; }
#tr { position: absolute; right: 34px; top: 26px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#stars { display: flex; gap: 4px; height: 34px; opacity: 0; transition: opacity 0.3s; transform-origin: right center; }
#stars.vis { opacity: 1; }
#stars i { width: 32px; height: 32px; display: block; }
#stars svg { width: 100%; height: 100%; fill: rgba(0,0,0,0.35); stroke: rgba(255,255,255,0.35); stroke-width: 1.2; }
#stars i.on svg { fill: #fff; stroke: #000; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.6)); }
#stars i.on.dim svg { fill: rgba(255,255,255,0.3); }
.wbox { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.45); padding: 6px 14px 6px 8px; border-radius: 4px; }
.wicon { width: 64px; height: 34px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.wicon.fist { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 34'%3E%3Cpath fill='white' d='M18 8h22a6 6 0 0 1 6 6v8a8 8 0 0 1-8 8H24a6 6 0 0 1-6-6zM14 12h4v12h-4a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3z'/%3E%3Cpath stroke='%23000' stroke-opacity='.4' d='M26 9v9M33 9v9M40 9v9'/%3E%3C/svg%3E"); }
.wicon.pistol { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 34'%3E%3Cpath fill='white' d='M8 7h46v8H30l-3 4h-5l-4 12h-8l4-14H8z'/%3E%3C/svg%3E"); }
.wicon.smg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 34'%3E%3Cpath fill='white' d='M4 9h8l2-3h38v4h8v5h-8v3H36l-2 12h-6l2-12h-6l-3 7h-6l3-7H4z'/%3E%3C/svg%3E"); }
#wName { font-size: 14px; letter-spacing: 2px; color: #ddd; text-transform: uppercase; }
#ammo { font-size: 20px; font-weight: 600; }
#money { font-family: Anton, Impact, sans-serif; font-size: 40px; color: #8bf08f; letter-spacing: 1px; text-shadow: 0 2px 0 #000, 0 0 10px rgba(0,0,0,0.6); -webkit-text-stroke: 1px #0b3a12; }
#moneyPop { font-family: Anton; font-size: 26px; color: #8bf08f; text-shadow: 0 2px 0 #000; opacity: 0; height: 0; }
#moneyPop.show { animation: pop 1.6s ease-out; }
@keyframes pop { 0% { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; transform: translateY(0); } 80% { opacity: 1; } 100% { opacity: 0; } }
#clock { font-size: 20px; font-weight: 500; text-shadow: 0 2px 2px #000; letter-spacing: 1px; }
#timer, #extra { background: rgba(0,0,0,0.5); padding: 6px 14px; font-family: Anton; font-size: 34px; text-align: right; border-right: 4px solid var(--y); }
#timer small, #extra small { display: block; font-family: Oswald; font-size: 13px; letter-spacing: 3px; color: #ccc; }
#extra b { font-weight: 400; }
#timer.low { color: #ff6b6b; border-color: #ff6b6b; }

#bl { position: absolute; left: 34px; bottom: 30px; width: 264px; }
#mini { width: 264px; height: 190px; display: block; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,0.55); border: 3px solid rgba(0,0,0,0.6); }
.bars { display: flex; gap: 4px; margin-top: 5px; }
.bar { height: 9px; background: rgba(0,0,0,0.6); flex: 1; overflow: hidden; border-radius: 2px; }
.bar i { display: block; height: 100%; width: 100%; transition: width 0.25s; }
.bar.hp i { background: linear-gradient(180deg, #6ee77a, #3aa34a); }
.bar.hp i.low { background: linear-gradient(180deg, #ff6b6b, #c22b3a); }
.bar.ar i { background: linear-gradient(180deg, #7fc3ff, #2f7fd6); }

#help { position: absolute; left: 34px; top: 26px; max-width: 360px; background: rgba(0,0,0,0.72); padding: 12px 16px; font-size: 17px; line-height: 1.4; border-radius: 3px; opacity: 0; transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s; }
#help.show { opacity: 1; transform: none; }
kbd { display: inline-block; background: #fff; color: #000; font-family: Oswald; font-weight: 700; padding: 0 7px; border-radius: 3px; margin: 0 2px; font-size: 15px; }
#subtitle { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); max-width: 900px; width: 80%; text-align: center; font-size: 23px; line-height: 1.35; text-shadow: 0 2px 3px #000, 0 0 8px #000; opacity: 0; transition: opacity 0.25s; font-weight: 500; }
#subtitle.show { opacity: 1; }
#subtitle .who { color: var(--y); }
.y { color: var(--y); } .b { color: var(--b); } .r { color: var(--r); } .bl { color: var(--b); }
#area { position: absolute; right: 36px; bottom: 34px; text-align: right; opacity: 0; }
#area.show { animation: area 4s ease-out forwards; }
#areaN { font-family: Pacifico, cursive; font-size: 44px; color: #fff; text-shadow: 0 3px 0 #000, 0 0 12px rgba(0,0,0,0.6); }
#areaS { font-size: 16px; letter-spacing: 3px; color: #ffd9b0; text-shadow: 0 2px 2px #000; text-transform: uppercase; }
@keyframes area { 0% { opacity: 0; transform: translateX(20px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

#big { position: absolute; left: 0; right: 0; top: 34%; text-align: center; opacity: 0; transition: opacity 0.4s; }
#big.show { opacity: 1; }
#bigT { font-family: Anton, Impact, sans-serif; font-size: 110px; letter-spacing: 6px; text-shadow: 0 5px 0 rgba(0,0,0,0.7); }
#bigS { font-size: 30px; font-weight: 600; text-shadow: 0 2px 3px #000; }
#big.wasted #bigT, #big.busted #bigT { color: #e8334a; font-size: 150px; background: rgba(0,0,0,0.55); display: inline-block; padding: 0 60px; transform: scale(1); animation: slam 0.5s ease-out; }
#big.busted #bigT { color: #fff; }
#big.pass #bigT { color: var(--y); font-size: 84px; }
#big.fail #bigT { color: #e8334a; font-size: 84px; }
#big.mtitle #bigT { font-family: Pacifico, cursive; font-size: 80px; letter-spacing: 1px; color: #fff; text-shadow: 0 4px 0 #ff3f8e; }
#big.mtitle #bigS { letter-spacing: 6px; color: #ffd9b0; text-transform: uppercase; font-size: 20px; }
#big.count #bigT { font-size: 160px; color: var(--y); animation: slam 0.35s ease-out; }
#big.count.go #bigT { color: #8bf08f; }
.cash { color: #8bf08f; font-family: Anton; font-size: 42px; }
@keyframes slam { 0% { transform: scale(1.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
#hurt { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; background: radial-gradient(ellipse at center, rgba(160,0,0,0) 50%, rgba(160,0,0,0.75) 100%); }
#cross { position: fixed; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 6; pointer-events: none; display: none; }
#cross.show { display: block; }
#cross i { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; background: #fff; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0,0,0,0.6); }

#pause { background: rgba(8,6,18,0.72); align-items: center; justify-content: center; }
.pbox { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.todrow { margin-top: 10px; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.todrow button { font-family: Oswald; font-size: 15px; padding: 5px 12px; background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); cursor: pointer; }
.todrow button:hover { background: rgba(255,255,255,0.3); }
#map { position: fixed; inset: 0; z-index: 25; display: none; background: #1e5470; }
#map.show { display: block; }
#mapc { width: 100%; height: 100%; display: block; }
#mapClose { position: absolute; right: 30px; top: 24px; font-size: 22px; padding: 8px 28px; }
.maplegend { position: absolute; left: 30px; bottom: 24px; background: rgba(0,0,0,0.6); padding: 8px 14px; font-size: 16px; }
.maplegend .r { color: #ff4d5e; }
