:root {
  color-scheme: dark;
  --ink: #080714;
  --panel: #15102c;
  --panel-2: #21133f;
  --cyan: #49e4ff;
  --pink: #ff4f9a;
  --yellow: #ffe36a;
  --violet: #9b5cff;
  --danger: #ff385f;
  --green: #63f3a6;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: white;
  background:
    radial-gradient(circle at 15% 15%, rgba(55, 211, 255, 0.15), transparent 30%),
    radial-gradient(circle at 85% 28%, rgba(255, 54, 143, 0.18), transparent 32%),
    linear-gradient(155deg, #150929, #070713 68%);
}

button, a { font: inherit; }
button { color: inherit; cursor: pointer; }

.boxing-app {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 24px;
}

.boxing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.boxing-brand { display: flex; align-items: center; gap: 12px; }
.brand-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: #171027;
  background: linear-gradient(135deg, var(--yellow), #ff8f63);
  box-shadow: 0 0 28px rgba(255, 206, 76, 0.32);
  font-size: 25px;
}
.boxing-brand small { color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: 0.18em; }
.boxing-brand h1 { margin: 2px 0 0; font-size: clamp(20px, 3vw, 31px); line-height: 1; }
.boxing-brand h1 b { color: var(--pink); }
.boxing-nav { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.boxing-nav a {
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.battle-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: rgba(12, 9, 30, .84);
  box-shadow: 0 28px 80px rgba(0,0,0,.44);
}

.battle-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  min-height: 86px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(25, 15, 55, .88);
}

.fighter-status { min-width: 0; }
.status-copy { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.status-copy span { font-size: 9px; font-weight: 1000; letter-spacing: .14em; }
.status-copy strong { color: white; font-size: 17px; font-variant-numeric: tabular-nums; }
.monster-status .status-copy { flex-direction: row-reverse; }
.hp-track { height: 12px; overflow: hidden; border: 2px solid rgba(255,255,255,.18); border-radius: 999px; background: #090713; }
.hp-track i { display: block; width: 100%; height: 100%; border-radius: inherit; transition: width 260ms ease; }
.player-status .hp-track i { background: linear-gradient(90deg, #1fbcff, var(--green)); box-shadow: 0 0 15px var(--cyan); }
.monster-status .hp-track i { margin-left: auto; background: linear-gradient(90deg, #ff9d3d, var(--danger)); box-shadow: 0 0 15px var(--pink); }

.score-status { text-align: center; }
.score-status span { display: block; color: rgba(255,255,255,.54); font-size: 8px; letter-spacing: .13em; }
.score-status span strong { margin-left: 5px; color: white; font-size: 16px; }
.score-status > b { display: block; margin-top: 4px; color: var(--yellow); font-size: 10px; letter-spacing: .12em; }
.score-status > b i { font-size: 19px; font-style: normal; }

.boxing-stage {
  position: relative;
  min-height: 720px;
  padding: 15px 26px 20px;
  overflow: hidden;
}

.arena-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 14%, rgba(67,224,255,.08) 15%, transparent 28%),
    linear-gradient(255deg, transparent 14%, rgba(255,64,152,.09) 15%, transparent 28%);
}

.battle-rules { position: relative; z-index: 4; display: flex; justify-content: center; gap: 24px; margin: 0 0 10px; color: rgba(255,255,255,.68); font-size: 10px; font-weight: 800; }
kbd { padding: 3px 6px; border: 1px solid rgba(255,255,255,.26); border-radius: 6px; color: white; background: rgba(255,255,255,.1); box-shadow: inset 0 -2px 0 rgba(0,0,0,.28); }

.boxing-track {
  position: relative;
  z-index: 5;
  height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 19px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(255,255,255,.055) 10%),
    linear-gradient(180deg, rgba(29,28,70,.86), rgba(12,10,36,.92));
}

.lane-line { position: absolute; right: 0; left: 0; height: 1px; background: rgba(255,255,255,.13); }
.lane-line::after { position: absolute; right: 0; bottom: -18px; left: 0; height: 1px; content: ""; background: inherit; }
.lane-line span { position: absolute; top: -21px; right: 13px; color: rgba(255,255,255,.35); font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.lane-english { top: 55px; box-shadow: 0 0 14px rgba(73,228,255,.2); }
.lane-korean { top: 125px; box-shadow: 0 0 14px rgba(255,79,154,.2); }

.boxing-hit-line { position: absolute; z-index: 6; top: 10px; bottom: 10px; left: 20%; width: 4px; border-radius: 4px; background: linear-gradient(180deg, transparent, var(--yellow) 12%, white 50%, var(--yellow) 88%, transparent); box-shadow: 0 0 18px var(--yellow); }
.boxing-hit-line::before, .boxing-hit-line::after { position: absolute; left: 50%; width: 36px; height: 2px; content: ""; transform: translateX(-50%); background: var(--yellow); }
.boxing-hit-line::before { top: 0; }.boxing-hit-line::after { bottom: 0; }
.boxing-hit-line b { position: absolute; bottom: 2px; left: 8px; color: var(--yellow); font-size: 7px; }
.boxing-notes { position: absolute; z-index: 5; inset: 0; }

.boxing-note {
  --note: var(--cyan);
  position: absolute;
  top: 28px;
  left: 0;
  display: flex;
  min-width: 96px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 14px 0 30px;
  border: 2px solid var(--note);
  border-radius: 15px;
  color: white;
  background: color-mix(in srgb, var(--note) 18%, #151027);
  box-shadow: 0 0 20px color-mix(in srgb, var(--note) 38%, transparent), inset 0 0 18px rgba(255,255,255,.06);
  font-size: 14px;
  font-weight: 1000;
  will-change: left, opacity, transform;
}
.boxing-note::before { position: absolute; left: 10px; color: var(--note); content: "✦"; font-size: 16px; }
.boxing-note.korean { --note: var(--pink); top: 98px; }
.boxing-note.approaching { filter: brightness(1.4); }
.boxing-note.hit { z-index: 9; opacity: 0 !important; transform: translateX(-50%) scale(1.4); transition: opacity 200ms ease, transform 200ms ease; }
.boxing-note.missed { filter: grayscale(.8) brightness(.55); }
.boxing-note.missed::after { position: absolute; top: -8px; right: -6px; padding: 2px 5px; border: 1px solid var(--danger); border-radius: 99px; content: "MISS"; color: #ff9db3; background: #3e0a22; font-size: 7px; }

.boxing-impact {
  --impact: var(--cyan);
  position: absolute;
  z-index: 12;
  top: 52px;
  width: 66px;
  height: 66px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border: 4px solid var(--impact);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--impact), 0 0 38px color-mix(in srgb, var(--impact) 75%, transparent);
  animation: boxing-impact 400ms ease-out both;
}
.boxing-impact::before, .boxing-impact::after { position:absolute; inset:-16px; content:""; background:linear-gradient(90deg,transparent 47%,var(--impact) 48% 52%,transparent 53%),linear-gradient(0deg,transparent 47%,var(--impact) 48% 52%,transparent 53%); clip-path:polygon(48% 0,52% 0,53% 38%,100% 48%,100% 52%,53% 62%,52% 100%,48% 100%,47% 62%,0 52%,0 48%,47% 38%); }
.boxing-impact::after { transform:rotate(45deg) scale(.72); opacity:.7; }
.boxing-impact.korean { --impact: var(--pink); top:122px; }
@keyframes boxing-impact { 0%{opacity:1;transform:translate(-50%,-50%) scale(.25)} 55%{opacity:1;transform:translate(-50%,-50%) scale(1.02)} 100%{opacity:0;transform:translate(-50%,-50%) scale(1.5)} }

.boxing-judgement { position: absolute; z-index: 8; top: 50%; left: 20%; pointer-events: none; transform: translate(-50%,-50%); color: rgba(255,255,255,.18); font-size: 20px; font-weight: 1000; font-style: italic; text-shadow: 0 0 15px currentColor; }
.boxing-judgement.pop { animation: judgement-pop 480ms ease both; }
.boxing-judgement.perfect { color: var(--yellow); }.boxing-judgement.good { color: var(--cyan); }.boxing-judgement.guard { color: var(--green); }.boxing-judgement.miss { color: var(--danger); }
@keyframes judgement-pop { 0%{opacity:0;transform:translate(-50%,-50%) scale(.4)} 45%{opacity:1;transform:translate(-50%,-50%) scale(1.18)} 100%{opacity:.25;transform:translate(-50%,-72%) scale(.9)} }

.fight-arena { position: relative; z-index: 3; height: 390px; margin-top: 5px; overflow: hidden; perspective: 900px; }
.fight-arena::after { position: absolute; right: -10%; bottom: -110px; left: -10%; height: 240px; content: ""; transform: rotateX(65deg); border-radius: 50%; background: repeating-radial-gradient(ellipse, rgba(124,92,199,.16) 0 2px, transparent 3px 34px); }
.monster-shadow { position: absolute; z-index: 1; bottom: 88px; left: 50%; width: 260px; height: 42px; transform: translateX(-50%); border-radius: 50%; background: rgba(0,0,0,.55); filter: blur(8px); }

.monster { position: absolute; z-index: 3; top: 40px; left: 50%; width: 225px; height: 255px; transform: translateX(-50%); transform-origin: 50% 75%; transition: filter 100ms ease; }
.monster-body { position: absolute; top: 36px; left: 24px; width: 177px; height: 190px; border: 5px solid #7f55c9; border-radius: 48% 48% 42% 42%; background: radial-gradient(circle at 45% 34%, #9c6ef0, #53247d 62%, #301546); box-shadow: inset 0 -20px 40px rgba(0,0,0,.32), 0 0 42px rgba(155,92,255,.4); }
.monster-body::after { position: absolute; right: 30px; bottom: 18px; left: 30px; height: 16px; content:""; border-radius:50%; background:rgba(23,5,41,.42); }
.horn { position:absolute; z-index:0; top:8px; width:58px; height:78px; background:linear-gradient(#ffed9a,#ff8f47); clip-path:polygon(50% 0,100% 100%,0 86%); }
.horn-left { left:27px; transform:rotate(-28deg); }.horn-right { right:27px; transform:rotate(28deg); }
.ear { position:absolute; z-index:0; top:82px; width:50px; height:65px; border:4px solid #7344b7; background:#562b83; clip-path:polygon(0 0,100% 42%,12% 100%); }
.ear-left { left:0; }.ear-right { right:0; transform:scaleX(-1); }
.monster-eye { position:absolute; top:65px; width:36px; height:28px; border-radius:50% 50% 45% 45%; background:#fff8b0; box-shadow:0 0 17px #fff16c; }
.monster-eye::after { position:absolute; top:6px; left:13px; width:11px; height:16px; content:""; border-radius:50%; background:#210928; }
.eye-left { left:38px; }.eye-right { right:38px; }
.monster-brow { position:absolute; z-index:2; top:54px; width:47px; height:8px; border-radius:99px; background:#2d103e; }
.brow-left { left:30px; transform:rotate(13deg); }.brow-right { right:30px; transform:rotate(-13deg); }
.monster-mouth { position:absolute; top:111px; left:48px; display:flex; width:80px; height:43px; justify-content:space-around; padding:0 8px; border:4px solid #2b0a38; border-radius:10px 10px 32px 32px; background:#1b0826; }
.monster-mouth i { width:14px; height:20px; background:#fff; clip-path:polygon(0 0,100% 0,50% 100%); }
.monster-body span { position:absolute; right:0; bottom:35px; left:0; color:rgba(255,255,255,.32); text-align:center; font-size:11px; font-weight:1000; letter-spacing:.12em; }
.monster-fist { position:absolute; z-index:5; top:145px; width:58px; height:68px; border:4px solid #7044af; border-radius:45% 45% 50% 50%; background:linear-gradient(#895fd0,#4a256e); box-shadow:0 8px 16px rgba(0,0,0,.35); }
.fist-left { left:2px; transform:rotate(20deg); }.fist-right { right:2px; transform:rotate(-20deg); }

.boxing-glove { position:absolute; z-index:7; bottom:10px; width:154px; height:128px; border:0; border-radius:52% 52% 42% 42%; text-align:center; box-shadow:0 15px 0 rgba(0,0,0,.35), inset 0 -18px 30px rgba(0,0,0,.25), inset 0 5px 18px rgba(255,255,255,.25); transform-origin:50% 100%; }
.boxing-glove::after { position:absolute; right:27px; bottom:-25px; left:27px; height:42px; content:""; border-radius:8px 8px 20px 20px; background:inherit; box-shadow:inset 0 -8px 14px rgba(0,0,0,.25); }
.boxing-glove span { position:absolute; top:14px; left:19px; display:grid; width:28px; height:28px; place-items:center; border-radius:50%; background:rgba(0,0,0,.28); font-size:12px; font-weight:1000; }
.boxing-glove b { display:block; font-size:23px; }.boxing-glove small { display:block; margin-top:3px; color:rgba(255,255,255,.65); font-size:8px; font-weight:900; letter-spacing:.1em; }
.glove-left { left:12%; background:linear-gradient(145deg,#28d9f4,#0879b8); transform:rotate(9deg); }.glove-right { right:12%; background:linear-gradient(215deg,#ff6bae,#b11661); transform:rotate(-9deg); }
.glove-left.punching { animation:left-punch 330ms cubic-bezier(.2,.8,.2,1); }.glove-right.punching { animation:right-punch 330ms cubic-bezier(.2,.8,.2,1); }
@keyframes left-punch { 45%{transform:translate(150px,-155px) rotate(-25deg) scale(.76)} 100%{transform:rotate(9deg)} }
@keyframes right-punch { 45%{transform:translate(-150px,-155px) rotate(25deg) scale(.76)} 100%{transform:rotate(-9deg)} }
.fight-arena.guarding .glove-left { animation:left-guard 520ms ease; }.fight-arena.guarding .glove-right { animation:right-guard 520ms ease; }
@keyframes left-guard { 42%,70%{transform:translate(clamp(92px,26vw,340px),-105px) rotate(-40deg) scale(.82)} }
@keyframes right-guard { 42%,70%{transform:translate(clamp(-340px,-26vw,-92px),-105px) rotate(40deg) scale(.82)} }
.guard-button { position:absolute; z-index:8; bottom:8px; left:50%; display:grid; width:126px; height:84px; place-content:center; gap:1px; transform:translateX(-50%); border:2px solid rgba(159,245,255,.92); border-radius:24px 24px 36px 36px; color:white; background:linear-gradient(155deg,rgba(29,213,241,.94),rgba(112,55,218,.96) 58%,rgba(255,75,155,.9)); box-shadow:0 11px 0 rgba(15,5,39,.58),0 0 22px rgba(65,225,255,.56),inset 0 3px 12px rgba(255,255,255,.3); text-align:center; touch-action:manipulation; }
.guard-button::before { position:absolute; inset:5px; content:""; pointer-events:none; border:1px solid rgba(255,255,255,.28); border-radius:18px 18px 30px 30px; }
.guard-button span { position:absolute; top:8px; left:9px; display:grid; width:24px; height:24px; place-items:center; border-radius:50%; background:rgba(10,7,34,.5); font-size:11px; font-weight:1000; }
.guard-button b { font-size:15px; line-height:1.1; text-shadow:0 0 10px rgba(255,255,255,.8); }
.guard-button small { margin-top:3px; color:#fff5a8; font-size:8px; font-weight:1000; letter-spacing:.04em; }
.guard-button:hover { filter:brightness(1.12); }
.guard-button:focus-visible { outline:3px solid var(--yellow); outline-offset:4px; }
.guard-button.blocking { z-index:6; animation:guard-button-block 620ms ease; pointer-events:none; }
@keyframes guard-button-block { 0%{transform:translateX(-50%) scale(1)} 40%,72%{transform:translateX(-50%) scale(.74);filter:brightness(1.7)} 100%{transform:translateX(-50%) scale(1)} }

.monster.hit-left { animation:monster-hit-left 360ms ease; }.monster.hit-right { animation:monster-hit-right 360ms ease; }
@keyframes monster-hit-left { 42%{transform:translateX(-50%) rotate(9deg) scale(.94);filter:brightness(1.8)} }
@keyframes monster-hit-right { 42%{transform:translateX(-50%) rotate(-9deg) scale(.94);filter:brightness(1.8)} }
.monster.blocked-attacking .fist-left { animation:blocked-fist-left 620ms ease; }.monster.blocked-attacking .fist-right { animation:blocked-fist-right 620ms ease; }
@keyframes blocked-fist-left { 42%,62%{transform:translate(62px,80px) rotate(-18deg) scale(1.3);filter:brightness(1.7)} }
@keyframes blocked-fist-right { 42%,62%{transform:translate(-62px,80px) rotate(18deg) scale(1.3);filter:brightness(1.7)} }
.monster.attacking { animation:monster-attack 460ms ease; }.monster.heavy-attacking { animation:monster-heavy 650ms ease; }
@keyframes monster-attack { 45%{transform:translate(-50%,60px) scale(1.15)} }
@keyframes monster-heavy { 40%{transform:translate(-50%,92px) scale(1.32);filter:brightness(1.45) saturate(1.4)} }
.boxing-stage.player-hit { animation:stage-shake 420ms ease; }.boxing-stage.player-heavy-hit { animation:stage-heavy-shake 650ms ease; }
@keyframes stage-shake { 30%{transform:translateX(-7px)} 60%{transform:translateX(6px)} }
@keyframes stage-heavy-shake { 20%{transform:translate(-13px,4px)} 40%{transform:translate(11px,-5px)} 60%{transform:translate(-8px,3px)} 80%{transform:translate(6px,-2px)} }
.attack-flash { position:absolute; z-index:11; inset:0; pointer-events:none; opacity:0; background:radial-gradient(circle,transparent 20%,rgba(255,30,80,.7)); }
.attack-flash.show { animation:attack-flash 420ms ease; }.attack-flash.heavy { animation:attack-heavy-flash 650ms ease; }
@keyframes attack-flash { 30%{opacity:.75} 100%{opacity:0} } @keyframes attack-heavy-flash { 25%{opacity:1;background:radial-gradient(circle,rgba(255,230,80,.12),rgba(255,0,52,.9))} 100%{opacity:0} }

.shield-effect { position:absolute; z-index:10; top:120px; left:50%; display:grid; width:200px; height:160px; place-items:center; pointer-events:none; opacity:0; transform:translateX(-50%); border:6px solid var(--cyan); border-radius:50% 50% 60% 60%; color:white; background:rgba(62,212,255,.15); box-shadow:0 0 30px var(--cyan),inset 0 0 40px rgba(75,225,255,.35); }
.shield-effect span { font-size:22px; font-weight:1000; font-style:italic; text-shadow:0 0 12px white; }
.shield-effect.show { animation:shield-block 620ms ease; }
@keyframes shield-block { 0%{opacity:0;transform:translateX(-50%) scale(.3)} 35%{opacity:1;transform:translateX(-50%) scale(1.08)} 100%{opacity:0;transform:translateX(-50%) scale(1.25)} }

.boxing-controls { position:relative; z-index:12; display:flex; justify-content:center; gap:9px; margin-top:2px; }
.boxing-controls button { min-height:48px; border:1px solid rgba(255,255,255,.16); border-radius:13px; background:rgba(25,17,51,.9); box-shadow:0 8px 22px rgba(0,0,0,.26); }
.start-fight { display:flex; min-width:170px; align-items:center; justify-content:center; gap:10px; border:0!important; background:linear-gradient(135deg,#ff4f8e,#8f48ff)!important; }
.start-fight span { display:grid; width:29px; height:29px; place-items:center; border-radius:50%; color:#8d43df; background:white; }
.start-fight b { font-size:12px; letter-spacing:.06em; }
.control-fight { width:50px; color:rgba(255,255,255,.8); font-weight:900; }
.boxing-controls button:disabled { opacity:.36; cursor:not-allowed; }

.fight-countdown, .fight-result { position:absolute; z-index:30; inset:0; display:grid; place-items:center; background:rgba(5,4,16,.72); backdrop-filter:blur(5px); }
.fight-countdown[hidden], .fight-result[hidden] { display:none; }
.fight-countdown strong { color:var(--yellow); font-size:110px; text-shadow:0 0 40px #ff6d3c; }
.fight-result { align-content:center; text-align:center; }
.fight-result p { margin:0 0 5px; color:var(--cyan); font-size:9px; font-weight:900; letter-spacing:.22em; }
.fight-result h2 { margin:0; font-size:44px; }
.fight-result > strong { margin:8px 0 16px; color:var(--yellow); font-size:42px; }
.fight-result > div { display:flex; gap:18px; margin-bottom:18px; }
.fight-result > div span { min-width:90px; padding:10px; border:1px solid rgba(255,255,255,.13); border-radius:12px; color:rgba(255,255,255,.58); font-size:8px; }
.fight-result > div b { display:block; margin-top:3px; color:white; font-size:19px; }
.fight-result button { padding:12px 24px; border:0; border-radius:12px; color:white; background:linear-gradient(135deg,#24bde6,#864cff); font-weight:900; }

footer { display:flex; justify-content:space-between; gap:20px; padding:11px 5px 0; color:rgba(255,255,255,.46); font-size:9px; }
footer p { margin:0; } footer b { color:rgba(255,255,255,.75); }

@media (max-width: 720px) {
  .boxing-app { width:min(100% - 14px,1180px); padding-top:9px; }
  .boxing-nav { display:none; }
  .battle-hud { grid-template-columns:1fr 1fr; gap:9px; padding:10px; }
  .score-status { grid-column:1 / -1; grid-row:2; }
  .boxing-stage { min-height:660px; padding:10px 8px 14px; }
  .battle-rules { gap:9px; font-size:8px; }
  .boxing-track { height:170px; }
  .lane-english { top:49px; }.lane-korean { top:113px; }
  .boxing-note { top:23px; min-width:76px; height:43px; padding-left:24px; font-size:11px; }
  .boxing-note.korean { top:87px; }
  .fight-arena { height:380px; }
  .monster { top:35px; transform:translateX(-50%) scale(.82); }
  .glove-left { left:2%; }.glove-right { right:2%; }
  .boxing-glove { width:125px; height:108px; }
  .guard-button { bottom:10px; width:84px; height:72px; border-radius:19px 19px 28px 28px; }
  .guard-button span { top:6px; left:6px; width:20px; height:20px; font-size:9px; }
  .guard-button b { font-size:12px; }.guard-button small { font-size:6px; }
  @keyframes left-punch { 45%{transform:translate(80px,-145px) rotate(-25deg) scale(.7)} 100%{transform:rotate(9deg)} }
  @keyframes right-punch { 45%{transform:translate(-80px,-145px) rotate(25deg) scale(.7)} 100%{transform:rotate(-9deg)} }
  footer { flex-direction:column; gap:4px; }
}
