html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#071018;color:#dffcff;font-family:Consolas,'Courier New',monospace}
#game-shell,#game-root{position:fixed;inset:0}
#game-root{background:radial-gradient(circle at center,#18303c,#071018);outline:none}
#game-root canvas{touch-action:none;cursor:crosshair}
body.camera-dragging #game-root canvas{cursor:grabbing}
#hud{position:fixed;top:16px;left:16px;z-index:20;min-width:270px;max-width:min(420px,calc(100vw - 62px));padding:12px 14px;border:1px solid rgba(0,255,255,.75);background:rgba(0,13,22,.84);pointer-events:none;line-height:1.55;font-size:13px}
.hud-title{margin-bottom:7px;color:#00ffff;font-weight:700}.hud-title span{font-weight:400}
#hud-map,#hud-mode{color:#8cecf0}
#menu{position:fixed;top:16px;right:16px;z-index:30;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
button{padding:10px 14px;border:1px solid #00dfe8;background:rgba(0,20,28,.92);color:#aefcff;font:600 13px Consolas,monospace;cursor:pointer;touch-action:none}
button:hover{background:rgba(0,45,57,.96)}button:disabled{opacity:.38;cursor:default}
#error-box{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:100;max-width:min(780px,90vw);padding:12px 16px;border:1px solid #ff5a5a;background:rgba(35,0,0,.94);color:#ffd7d7;white-space:pre-wrap;cursor:pointer}
#crosshair{display:none;position:fixed;left:50%;top:50%;z-index:24;width:24px;height:24px;transform:translate(-50%,-50%);pointer-events:none;color:#dffcff;filter:drop-shadow(0 0 3px #001820)}
#crosshair::before,#crosshair::after{content:'';position:absolute;left:50%;top:50%;background:currentColor;transform:translate(-50%,-50%)}
#crosshair::before{width:24px;height:1px}#crosshair::after{width:1px;height:24px}
#crosshair span{position:absolute;left:50%;top:50%;width:5px;height:5px;border:1px solid currentColor;border-radius:50%;background:#071018;transform:translate(-50%,-50%)}
body.game-running #crosshair{display:block}
body.weapon-hit #crosshair{color:#ffb000}body.enemy-killed #crosshair{color:#69ff7d}body.weapon-empty #hud-ammo{color:#ff7474}body.weapon-reloading #hud-ammo{color:#ffd66b}body.weapon-empty-click #crosshair{color:#ff4747}
body.game-running #game-root canvas{cursor:none}
.projectile-marker{width:8px;height:18px;z-index:60;pointer-events:none}
.projectile-orb{position:absolute;left:2px;top:1px;width:4px;height:15px;border:1px solid rgba(70,38,12,.82);border-radius:55% 55% 35% 35%;background:linear-gradient(90deg,#8a5521,#ffe39a 48%,#6b3b18)}
.projectile-marker.is-impact{width:16px;height:16px}
.projectile-marker.is-impact .projectile-orb{left:3px;top:3px;width:10px;height:10px;border:0;border-radius:50%;background:#ffab42;opacity:.85}
.enemy-marker{--fall-x-1:3px;--fall-x-2:7px;--fall-x-3:10px;--fall-r-1:8deg;--fall-r-2:58deg;--fall-r-3:88deg;width:30px;height:34px;z-index:45;pointer-events:none}
.enemy-sprite{position:absolute;left:4px;top:3px;width:22px;height:27px;border:2px solid #3d0808;border-radius:48% 48% 38% 38%;background:linear-gradient(145deg,#ff6969,#a91526 58%,#590712);transform:translateZ(0)}
.enemy-sprite::before,.enemy-sprite::after{content:'';position:absolute;top:7px;width:5px;height:5px;border-radius:50%;background:#fff4b8;box-shadow:0 0 4px #ffdd3d}
.enemy-sprite::before{left:4px}.enemy-sprite::after{right:4px}
.enemy-sprite i{position:absolute;left:50%;bottom:-7px;width:7px;height:10px;border-radius:0 0 4px 4px;background:#700916;transform:translateX(-50%)}
.enemy-marker.enemy-dying{z-index:70}
.enemy-marker.enemy-dying .enemy-sprite{transform-origin:50% 90%;animation:enemy-fast-fall .36s ease-out forwards}
@keyframes enemy-fast-fall{0%{transform:translate(0,0) scale(1);opacity:1}45%{transform:translate(var(--fall-x-1),3px) scale(.92) rotate(var(--fall-r-1));opacity:.9}100%{transform:translate(var(--fall-x-2),12px) scale(.8,.18) rotate(var(--fall-r-2));opacity:0}}
.player-ground-marker{width:18px;height:18px;border:2px solid #bfffff;border-radius:50%;background:rgba(0,255,136,.28);box-shadow:0 0 12px #00ff88;pointer-events:none}
#touch-controls{display:none;position:fixed;left:18px;bottom:28px;z-index:35;text-align:center;user-select:none;-webkit-user-select:none}
#touch-controls div{display:flex;gap:6px;margin-top:6px}#touch-controls button{width:52px;height:52px;padding:0;font-size:21px;background:rgba(0,20,28,.78)}
.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{z-index:12}
@media(pointer:coarse){#touch-controls{display:block}}
@media(max-width:720px){#hud{top:70px;left:10px;min-width:0;max-width:calc(100vw - 50px);font-size:11px}#menu{top:10px;right:10px;left:10px}#menu button{padding:9px 10px;font-size:11px}}
