:root { color-scheme: dark; font-family: ui-sans-serif, system-ui, "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; display: grid; place-items: center; background: radial-gradient(circle at top, #2a3047, #10121a 68%); color: #f5f1e7; }
.arena { width: min(760px, calc(100% - 32px)); padding: 38px; border: 1px solid #4c5268; border-radius: 24px; background: rgba(20, 23, 34, .9); box-shadow: 0 30px 80px #0009; }
header { text-align: center; } .eyebrow { margin: 0; color: #f5aa48; letter-spacing: .18em; font-size: .76rem; } h1 { margin: 8px 0; font-size: clamp(2rem, 7vw, 3.3rem); } .hint { color: #bfc5d5; } code, kbd { font: inherit; color: #ffcf86; }
.combatants { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; margin: 42px 0 32px; } .versus { color: #f5aa48; font-weight: 900; font-style: italic; }
.fighter { min-width: 0; padding: 18px; border: 1px solid #555d75; border-radius: 16px; background: #171b28; text-align: center; transition: transform .12s, background .12s; } .fighter.hit { transform: translateX(10px); background: #692f3a; } .player.hit { transform: translateX(-10px); } .fighter.blocking { outline: 3px solid #85d4ff; background: #1d4260; }
.name-row { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; } .name-row b { font-size: .8rem; color: #d6dae7; }.health { height: 10px; overflow: hidden; margin: 12px 0; border-radius: 99px; background: #30384d; }.health i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #6ce59c, #c9ec6e); transition: width .2s; }
.avatar { width: 94px; height: 104px; margin: 11px auto; }.stickman { position: relative; filter: drop-shadow(0 7px 8px #0007); transform-origin: 50% 78%; }.stickman span { position: absolute; display: block; background: #f5f1e7; border-radius: 99px; transform-origin: 50% 0; }.stickman .head { width: 23px; height: 23px; left: 36px; top: 4px; border-radius: 50%; background: #ffcf86; }.stickman .body { width: 7px; height: 39px; left: 44px; top: 27px; }.stickman .arm { width: 6px; height: 35px; top: 31px; }.stickman .arm-left { left: 42px; transform: rotate(39deg); }.stickman .arm-right { left: 48px; transform: rotate(-39deg); }.stickman .leg { width: 7px; height: 38px; top: 63px; }.stickman .leg-left { left: 44px; transform: rotate(27deg); }.stickman .leg-right { left: 45px; transform: rotate(-27deg); }.stickman .sword { box-shadow: 0 -18px 0 -1px #dcecff; }.stickman .shield { width: 18px; height: 23px; border-radius: 45% 45% 50% 50%; background: #77c9ef; }.enemy-stickman span { background: #d7919d; }.enemy-stickman .head { background: #e9a2ac; }.enemy-stickman .shield { background: #9d5c72; }.stickman.attacking { animation: strike .32s ease-out; }.stickman.blocking { animation: brace .8s ease-out; }.stickman.hurt { animation: recoil .22s ease-out; }@keyframes strike { 50% { transform: translateX(18px) rotate(-8deg); } } @keyframes brace { 45% { transform: rotate(-10deg); } } @keyframes recoil { 50% { transform: translateX(-12px) rotate(-15deg); } }
.fighter p { min-height: 1.5em; margin: 0; color: #bac1d2; }
.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; } button { border: 0; border-radius: 12px; padding: 13px 18px; color: white; font: inherit; font-weight: 800; cursor: pointer; } button:hover { filter: brightness(1.14); } .attack { background: #d95a43; } .block { background: #347caa; } .sound { background: #7750a6; } .reset { background: #444b5d; }.event { min-height: 1.5em; margin: 28px 0 0; text-align: center; color: #f5cc87; }
@media (max-width: 560px) { .arena { padding: 24px 18px; }.combatants { gap: 8px; }.fighter { padding: 12px; }.avatar { width: 58px; height: 58px; font-size: 2rem; }.name-row { display: block; }.name-row b { display: block; margin-top: 4px; } }
