* { box-sizing: border-box; margin: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #111; font-family: "Trebuchet MS", "Segoe UI", sans-serif; color: #fff; user-select: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud[hidden] { display: none; }
#cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); }
#cross::before, #cross::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 3px #000; }
#cross::before { left: 10px; top: 0; width: 2px; height: 22px; }
#cross::after { top: 10px; left: 0; height: 2px; width: 22px; }
#hitmark { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border: 3px solid #fff; transform: rotate(45deg); opacity: 0; }
#hitmark.on { animation: hm 0.3s; } #hitmark.head { border-color: #ff3b30; }
@keyframes hm { from { opacity: 1; transform: rotate(45deg) scale(0.6); } to { opacity: 0; transform: rotate(45deg) scale(1.3); } }
#flash { position: absolute; inset: 0; box-shadow: inset 0 0 120px 40px #f00; opacity: 0; }
#flash.on { animation: fl 0.5s; } @keyframes fl { from { opacity: 0.9; } to { opacity: 0; } }
#feed { position: absolute; right: 16px; top: 16px; text-align: right; font-weight: bold; }
#feed div { background: #0009; padding: 4px 10px; border-radius: 8px; margin-bottom: 4px; }
#score { position: absolute; left: 16px; top: 16px; background: #0008; padding: 10px 14px; border-radius: 12px; min-width: 190px; }
#score.big { left: 50%; top: 20%; transform: translateX(-50%); min-width: 360px; font-size: 18px; }
#score h3 { font-size: 14px; opacity: 0.8; margin-bottom: 4px; } #score small { opacity: 0.6; font-size: 11px; }
#board { list-style: none; padding: 0; } #board li { display: flex; gap: 10px; padding: 2px 0; }
#board li span { flex: 1; } #board li.me { color: #ffd23f; } #board em { opacity: 0.7; font-style: normal; width: 30px; text-align: right; }
#vie { position: absolute; left: 20px; bottom: 20px; width: 300px; height: 30px; background: #0009; border-radius: 15px; overflow: hidden; border: 3px solid #fff; }
#viebar { height: 100%; transition: width 0.15s; }
#vietxt { position: absolute; inset: 0; text-align: center; line-height: 24px; font-weight: bold; text-shadow: 0 0 4px #000; }
#arme { position: absolute; right: 24px; bottom: 20px; text-align: right; text-shadow: 0 2px 4px #000; }
#arme b { display: block; font-size: 20px; } #munitions { font-size: 36px; font-weight: bold; }
#niveau { position: absolute; left: 20px; bottom: 62px; display: flex; gap: 8px; align-items: center; font-weight: bold; text-shadow: 0 0 4px #000; }
#xpbar { width: 110px; height: 8px; background: #0009; border-radius: 4px; overflow: hidden; } #xpfill { height: 100%; background: #4aa8ff; }
#pieces { color: #ffd23f; }
#centre { position: absolute; left: 0; right: 0; top: 35%; text-align: center; font-size: 42px; font-weight: bold; text-shadow: 0 3px 8px #000; }
#toast { position: fixed; top: 70px; left: 50%; transform: translate(-50%, -30px); background: #ffd23f; color: #222; font-weight: bold; padding: 10px 20px; border-radius: 20px; opacity: 0; transition: 0.3s; z-index: 5; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#menu { position: fixed; inset: 0; background: linear-gradient(#3a7bd5cc, #1b1b4acc); display: flex; align-items: center; justify-content: center; overflow: auto; z-index: 3; }
.panel { width: min(760px, 96vw); max-height: 96vh; overflow: auto; background: #1d2244; border: 4px solid #fff; border-radius: 20px; padding: 18px 22px; box-shadow: 0 10px 0 #0006; }
.panel h1 { font-size: 44px; letter-spacing: 3px; } .panel h1 span { color: #ffd23f; }
.panel h2 { font-size: 16px; margin: 12px 0 6px; opacity: 0.85; }
.stat { margin: 4px 0 6px; } .bar { height: 10px; background: #0006; border-radius: 5px; overflow: hidden; } .bar div { height: 100%; background: #4aa8ff; }
.msg { margin-top: 8px; background: #ff5a5a; padding: 6px 10px; border-radius: 8px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 10px; padding: 8px 12px; background: #3b4586; color: #fff; font-weight: bold; }
button:hover:not(:disabled) { background: #5864b8; } button:disabled { opacity: 0.55; cursor: default; } button.on { background: #2e9e57; opacity: 1; }
button.buy { background: #e0a100; }
.maps { display: flex; gap: 8px; } .map { flex: 1; padding: 6px; border: 3px solid transparent; } .map i { display: block; height: 40px; border-radius: 6px; margin-bottom: 4px; }
.map.sel, .tabs .sel { border-color: #ffd23f; background: #5864b8; } .tabs { display: flex; gap: 6px; margin: 12px 0 6px; } .tabs button { border: 3px solid transparent; }
.items { height: 210px; overflow: auto; display: grid; gap: 6px; padding-right: 4px; }
.item { display: flex; align-items: center; gap: 10px; background: #2a3166; padding: 6px 10px; border-radius: 10px; }
.item.equipped { outline: 3px solid #2e9e57; } .item i { width: 28px; height: 28px; border-radius: 6px; border: 2px solid #fff; flex: none; }
.item div { flex: 1; } .item small { display: block; opacity: 0.7; }
#play { width: 100%; margin-top: 12px; font-size: 28px; padding: 12px; background: #2e9e57; letter-spacing: 3px; }
#play:hover { background: #3cc06c !important; } .help { margin-top: 8px; font-size: 12px; opacity: 0.7; }

.row { display: flex; gap: 8px; margin: 6px 0; } .row button { flex: 1; } .row .sel { background: #5864b8; outline: 3px solid #ffd23f; }
.slide { display: flex; align-items: center; gap: 10px; margin: 6px 0; } .slide input[type=range] { flex: 1; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .keys button { display: flex; justify-content: space-between; } .keys b { color: #ffd23f; }
button.small { padding: 2px 10px; font-size: 13px; margin-left: 8px; }
.modes { display: flex; gap: 8px; flex-wrap: wrap; } .modes .map { min-width: 140px; } .modetext { font-size: 13px; opacity: 0.8; margin: 4px 0; }
#dmg { position: absolute; left: 50%; top: 50%; width: 420px; height: 420px; margin: -210px 0 0 -210px; pointer-events: none; }
#modebar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); text-align: center; font-weight: bold; text-shadow: 0 2px 4px #000; font-size: 18px; }
#modebar .a { color: #6aa6ff; } #modebar .b { color: #ff6b6b; }
#dashbar { position: absolute; left: 20px; bottom: 100px; width: 110px; height: 8px; background: #0009; border-radius: 4px; overflow: hidden; } #dashbar div { height: 100%; background: #ffd23f; }
#end { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; background: #000a; font-size: 30px; font-weight: bold; text-align: center; gap: 12px; }
#end .votes { display: flex; gap: 10px; } #end small { font-size: 16px; }

.salons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.salons .code { flex: 1; min-width: 120px; padding: 10px; border-radius: 10px; border: 2px solid #3b3f7a; background: #1a1d3d; color: #fff; font: inherit; }

#end { pointer-events: auto; }
#end .votes button { width: 190px; padding: 10px; border: 3px solid transparent; border-radius: 14px; background: #3b3f7a; color: #fff; font: inherit; font-size: 18px; cursor: pointer; }
#end .votes button i { display: block; height: 80px; border-radius: 8px; margin-bottom: 8px; }
#end .votes button.sel { border-color: #ffd23f; background: #5560b8; }
#end #resume { padding: 16px 30px; font: inherit; font-size: 26px; border: 0; border-radius: 14px; background: #2e9d57; color: #fff; cursor: pointer; }
.podium { display: flex; align-items: flex-end; gap: 14px; }
.podium .step { display: flex; flex-direction: column; align-items: center; width: 160px; }
.podium .block { width: 100%; border-radius: 10px 10px 0 0; color: #222; font-size: 44px; display: flex; align-items: center; justify-content: center; }
.podium .pn { font-size: 22px; }
.dnum { position: absolute; transform: translateX(-50%); font-size: 26px; font-weight: 900; text-shadow: 0 2px 0 #000, 0 0 6px #000; pointer-events: none; animation: dfall 1s ease-in forwards; }
.dnum.big { font-size: 38px; }
@keyframes dfall { 0% { transform: translate(-50%, 0) scale(0.6); opacity: 1; } 20% { transform: translate(-50%, -30px) scale(1.2); } 100% { transform: translate(-50%, 70px) scale(1); opacity: 0; } }

#vie::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 28px, #0007 28px 30px); pointer-events: none; }
#healwrap { display: none; position: absolute; left: 50%; bottom: 36%; width: 200px; height: 12px; margin-left: -100px; background: #0009; border: 2px solid #fff; border-radius: 8px; overflow: hidden; }
#healbar { height: 100%; background: #4cd964; }
#stats { position: absolute; left: 20px; bottom: 118px; font-weight: bold; text-shadow: 0 0 4px #000; font-size: 14px; }
#radar { position: absolute; right: 20px; top: 70px; width: 140px; height: 140px; }
#hotbar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; }
#hotbar .slot { position: relative; width: 92px; padding: 6px 6px 4px; background: #0008; border: 3px solid #fff5; border-radius: 10px; text-align: center; text-shadow: 0 1px 3px #000; }
#hotbar .slot.on { border-color: #ffd84a; background: #000b; transform: translateY(-6px); }
#hotbar .slot i { position: absolute; left: 6px; top: 2px; font-style: normal; font-size: 12px; opacity: 0.8; }
#hotbar .slot b { display: block; font-size: 13px; } #hotbar .slot span { font-size: 14px; }

#scope { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.18s; background: radial-gradient(circle at center, transparent 0, transparent 30vh, #000 30.5vh); transform: scale(1.35); }
#scope.on { opacity: 1; transform: scale(1); transition: opacity 0.18s, transform 0.25s ease-out; }
#scope i, #scope b { position: absolute; background: #000; left: 50%; top: 50%; }
#scope i { width: 60vh; height: 2px; transform: translate(-50%, -50%); }
#scope b { height: 60vh; width: 2px; transform: translate(-50%, -50%); }
#scope.on ~ #cross, body:has(#scope.on) #cross { display: none; }

.panel.wide { width: min(980px, 96vw); }
.panel .top { display: flex; justify-content: space-between; align-items: center; } .panel .top button { font-size: 16px; padding: 10px 18px; }
.body { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; }
.body .items { height: 300px; } .cats { display: flex; gap: 8px; margin-bottom: 8px; }
.cats button { flex: 1; font-size: 20px; border: 3px solid transparent; } .cats button small { display: block; font-size: 12px; opacity: 0.8; } .cats .sel { border-color: #ffd23f; background: #5864b8; }
.pv { display: flex; flex-direction: column; align-items: center; background: radial-gradient(circle, #3a4590, #181c3a); border-radius: 14px; padding: 8px; text-align: center; }
.pv b { font-size: 24px; } .pv small { opacity: 0.8; } .pvbox { width: 100%; flex: 1; min-height: 260px; position: relative; } #pvcanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 700px) { .body { grid-template-columns: 1fr; } }
.body .items { align-content: start; } .body .item { min-height: 54px; }
.panel.pause { width: 340px; text-align: center; } .panel.pause button { display: block; width: 100%; margin-top: 14px; font-size: 24px; padding: 14px; }
