JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Клинок Эфира — 3D фентези слешер-платформер</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0b0716; font-family: 'Segoe UI', system-ui, sans-serif; }
canvas { display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#vignette { position: absolute; inset: 0; box-shadow: inset 0 0 180px rgba(0,0,0,.55); }
#dmgFlash { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(255,30,40,.55) 100%); opacity: 0; transition: opacity .25s; }
#killFlash { position: absolute; inset: 0; background: rgba(255,255,255,.18); opacity: 0; }
#hpWrap { position: absolute; top: 26px; left: 28px; width: 300px; }
#hpLabel { color: #ffd9a0; font-size: 12px; letter-spacing: 3px; margin-bottom: 6px; text-shadow: 0 0 8px #000; }
#hpBarBg { height: 14px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,210,140,.5); border-radius: 7px; overflow: hidden; }
#hpBar { height: 100%; width: 100%; background: linear-gradient(90deg, #ff4d6d, #ffb347); border-radius: 7px; transition: width .15s; box-shadow: 0 0 12px rgba(255,120,80,.8); }
#dashWrap { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
#dashLabel { color: #9fe8ff; font-size: 11px; letter-spacing: 2px; text-shadow: 0 0 8px #000; }
#dashBarBg { width: 120px; height: 6px; background: rgba(0,0,0,.55); border: 1px solid rgba(140,230,255,.4); border-radius: 3px; overflow: hidden; }
#dashBar { height: 100%; width: 100%; background: #6ee7ff; box-shadow: 0 0 10px #6ee7ff; }
#score { position: absolute; top: 26px; right: 30px; text-align: right; color: #ffe9b0; text-shadow: 0 0 12px rgba(255,190,80,.6), 0 2px 4px #000; }
#scoreVal { font-size: 30px; font-weight:...