/* ============================================================
   火柴人快打 · 横屏格斗 H5
   ============================================================ */
:root {
  --orange: #FF8A3D;
  --orange-deep: #F0601E;
  --orange-soft: #FFB36B;
  --gold: #FFD9A0;
  --ink: #0A0812;
  --ink-2: #14101F;
  --panel: rgba(14, 11, 23, .72);
  --panel-line: rgba(255, 255, 255, .12);
  --text: #FFF7EF;
  --muted: rgba(255, 244, 232, .6);
  --shadow: 0 18px 44px rgba(0, 0, 0, .5);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #06050d;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:focus-visible { outline: 3px solid rgba(255, 179, 107, .85); outline-offset: 3px; }

#app { position: fixed; inset: 0; overflow: hidden; background: #06050d; }

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ------------------------------------------------------------
   HUD
   ------------------------------------------------------------ */
.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 0 calc(14px + var(--safe-l));
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.hud.hidden { opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none; }

.hud-left { display: flex; align-items: center; gap: 9px; min-width: 0; }

.avatar {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #2B1508;
  background:
    radial-gradient(circle at 34% 28%, #FFE2BE 0%, #FFB36B 42%, #FF8A3D 72%, #C84A12 100%);
  border: 2px solid rgba(255, 226, 190, .8);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, .18), 0 8px 18px rgba(0, 0, 0, .45);
}
.avatar .mp-icon { width: 23px; height: 23px; }

.vitals { min-width: 0; width: min(240px, 29vw); }

.name-row { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px 4px; }
.fighter-name {
  font-size: 13px; font-weight: 800; letter-spacing: .08em;
  color: #FFF4E8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .8);
}
.hp-num {
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--orange-soft);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}

.hpbar {
  position: relative;
  height: 11px;
  border-radius: 99px;
  background: rgba(7, 5, 13, .78);
  border: 1px solid rgba(255, 255, 255, .18);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7), 0 4px 14px rgba(0, 0, 0, .35);
}
.hpfill {
  position: absolute;
  inset: 1px;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(180deg, #FFD9A0 0%, #FFA24C 34%, #FF7A2A 100%);
  box-shadow: 0 0 12px rgba(255, 138, 61, .55);
  transition: width .16s ease-out;
}
.hpfill.low { background: linear-gradient(180deg, #FFB9B9, #FF5A5A 45%, #C81E1E); animation: lowPulse .7s ease-in-out infinite alternate; }
.hpgloss {
  position: absolute; inset: 1px 1px auto 1px; height: 40%;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hud-center { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 1px; }
.stage-chip {
  display: flex; align-items: center; gap: 7px;
  height: 30px;
  padding: 0 15px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  color: #FFF4E8;
  background: linear-gradient(180deg, rgba(30, 22, 45, .82), rgba(10, 8, 18, .82));
  border: 1px solid rgba(255, 179, 107, .28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
.stage-chip em { color: var(--orange); font-style: normal; opacity: .9; }
.stage-chip span:first-child { color: var(--orange-soft); }

.stage-dots { display: flex; gap: 4px; align-items: center; height: 6px; }
.stage-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: all .2s;
}
.stage-dots i.alive { background: #FF6B5A; border-color: #FFB2A8; box-shadow: 0 0 7px rgba(255, 90, 70, .8); }
.stage-dots i.boss { width: 22px; border-radius: 4px; background: linear-gradient(90deg, #FFD166, #FF6A2A); border-color: #FFE2A1; }
.stage-dots i.done { opacity: .25; }

.hud-right { display: flex; align-items: flex-start; justify-content: flex-end; gap: 6px; }

.score-card {
  display: flex; align-items: baseline; gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(30, 22, 45, .82), rgba(10, 8, 18, .82));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
.score-label { font-size: 10px; color: var(--muted); letter-spacing: .12em; }
.score-card b { font-size: 16px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.score-card .best { font-size: 9.5px; color: rgba(255, 220, 180, .58); }
.score-card .best b { font-size: 10.5px; color: var(--orange-soft); font-weight: 700; }

.hud-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: rgba(255, 244, 232, .82);
  background: linear-gradient(180deg, rgba(30, 22, 45, .82), rgba(10, 8, 18, .82));
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  transition: transform .12s, color .12s, border-color .12s;
}
.hud-btn .mp-icon { width: 19px; height: 19px; }
.hud-btn:active { transform: scale(.9); color: var(--orange-soft); border-color: rgba(255, 138, 61, .5); }

/* ------------------------------------------------------------
   触屏操作
   ------------------------------------------------------------ */
.controls {
  position: absolute;
  inset: auto 0 0 0;
  height: 190px;
  z-index: 12;
  padding: 0 calc(20px + var(--safe-r)) calc(16px + var(--safe-b)) calc(20px + var(--safe-l));
  pointer-events: none;
  transition: opacity .25s ease;
}
.controls.hidden { opacity: 0; visibility: hidden; }

.joy {
  position: absolute;
  left: calc(22px + var(--safe-l));
  bottom: calc(20px + var(--safe-b));
  width: 116px; height: 116px;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .07), rgba(12, 9, 20, .55) 62%, rgba(12, 9, 20, .18) 100%);
  border: 1.5px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, .45), 0 10px 26px rgba(0, 0, 0, .32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.joy-ring {
  position: absolute; inset: 13px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 179, 107, .22);
  pointer-events: none;
}
.joy-knob {
  position: absolute;
  left: 50%; top: 50%;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: rgba(43, 21, 8, .8);
  background: radial-gradient(circle at 34% 28%, #FFE2BE 0%, #FFB36B 46%, #FF8A3D 100%);
  border: 1px solid rgba(255, 236, 214, .75);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 20px rgba(255, 138, 61, .3);
  will-change: transform;
}
.joy-knob .mp-icon { width: 21px; height: 21px; opacity: .55; }
.joy-hint {
  position: absolute;
  left: 50%; bottom: -19px;
  transform: translateX(-50%);
  font-size: 9.5px;
  letter-spacing: .2em;
  color: rgba(255, 244, 232, .38);
  white-space: nowrap;
}

.actions { position: absolute; right: calc(22px + var(--safe-r)); bottom: calc(18px + var(--safe-b)); width: 206px; height: 170px; pointer-events: none; }

.act {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  color: #FFF7EF;
  border: 1.5px solid rgba(255, 255, 255, .22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .18);
  transition: transform .09s ease, filter .09s ease;
  will-change: transform;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.act .mp-icon { width: 27px; height: 27px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.act span { font-size: 10.5px; font-weight: 800; letter-spacing: .18em; margin-left: .18em; }
.act:active, .act.pressed { transform: scale(.9); filter: brightness(1.15); }

.act-punch {
  right: 0; bottom: 0;
  width: 88px; height: 88px;
  background: radial-gradient(circle at 36% 28%, #FFD3A4 0%, #FF9E51 34%, #FF7A2A 66%, #D24A10 100%);
  border-color: rgba(255, 226, 190, .65);
  box-shadow: 0 12px 30px rgba(210, 74, 16, .45), inset 0 3px 0 rgba(255, 255, 255, .32), 0 0 0 5px rgba(255, 138, 61, .13);
}
.act-kick {
  right: 100px; bottom: 4px;
  width: 76px; height: 76px;
  background: radial-gradient(circle at 36% 28%, #E7C7FF 0%, #B57AE8 34%, #7C43B8 68%, #4A2478 100%);
  border-color: rgba(233, 210, 255, .55);
  box-shadow: 0 10px 26px rgba(60, 24, 98, .5), inset 0 3px 0 rgba(255, 255, 255, .25), 0 0 0 4px rgba(155, 96, 210, .12);
}
.act-kick .mp-icon { width: 25px; height: 25px; }
.act-jump {
  right: 30px; bottom: 96px;
  width: 64px; height: 64px;
  background: radial-gradient(circle at 36% 28%, #B9F0FF 0%, #55C5E8 36%, #2B7FA8 72%, #164A66 100%);
  border-color: rgba(197, 238, 255, .5);
  box-shadow: 0 10px 24px rgba(16, 74, 105, .48), inset 0 3px 0 rgba(255, 255, 255, .28), 0 0 0 4px rgba(85, 197, 232, .1);
}
.act-jump .mp-icon { width: 22px; height: 22px; }
.act-jump span { font-size: 9.5px; }

/* ------------------------------------------------------------
   连击 / 关卡横幅 / 提示
   ------------------------------------------------------------ */
.combo-pop {
  position: absolute;
  right: 12%;
  top: 33%;
  z-index: 11;
  display: flex;
  align-items: baseline;
  gap: 6px;
  opacity: 0;
  transform: translateY(12px) scale(.85) rotate(-4deg);
  transition: opacity .16s, transform .16s cubic-bezier(.2, 1.7, .5, 1);
  pointer-events: none;
  text-shadow: 0 3px 0 #7A2C0B, 0 8px 24px rgba(0, 0, 0, .65);
}
.combo-pop.show { opacity: 1; transform: translateY(0) scale(1) rotate(-4deg); }
.combo-pop b {
  font-size: clamp(34px, 5.4vw, 62px);
  font-weight: 900;
  font-style: italic;
  color: #FFD9A0;
  letter-spacing: -.03em;
}
.combo-pop span { font-size: 15px; font-weight: 900; color: var(--orange); letter-spacing: .1em; }
.combo-pop.hot b { color: #FF8A3D; }

.banner {
  position: absolute;
  left: 50%; top: 32%;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transform: translate(-50%, 16px) scale(.94);
  transition: opacity .28s, transform .34s cubic-bezier(.2, 1.4, .4, 1);
  pointer-events: none;
  text-align: center;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 14px 38px rgba(0, 0, 0, .7);
}
.banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.banner-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5em;
  margin-right: -.5em;
  color: var(--orange-soft);
}
.banner-title {
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
  color: #FFF7EF;
  -webkit-text-stroke: 1px rgba(255, 138, 61, .25);
}
.banner-sub { margin-top: 4px; font-size: 12px; color: rgba(255, 240, 225, .62); letter-spacing: .16em; }

.toast {
  position: absolute;
  left: 50%; bottom: 16%;
  z-index: 20;
  transform: translate(-50%, 10px);
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 12px;
  color: #FFF4E8;
  background: rgba(12, 9, 20, .86);
  border: 1px solid rgba(255, 179, 107, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------
   首页 / 标题
   ------------------------------------------------------------ */
.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  transition: opacity .4s ease, visibility .4s;
}
.screen.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.title-screen { overflow: hidden; background: #06050d; }

.title-bg {
  position: absolute;
  inset: -3%;
  background: #0A0812 url("images/arena.svg") center center / cover no-repeat;
  transform-origin: 58% 48%;
  animation: kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
  filter: saturate(1.08) contrast(1.03);
}
.title-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 5, 13, .96) 0%, rgba(6, 5, 13, .84) 30%, rgba(6, 5, 13, .38) 57%, rgba(6, 5, 13, .12) 74%, rgba(6, 5, 13, .45) 100%),
    radial-gradient(ellipse at 72% 62%, rgba(255, 138, 61, .16), transparent 48%),
    linear-gradient(180deg, rgba(6, 5, 13, .55) 0%, transparent 26%, transparent 70%, rgba(6, 5, 13, .88) 100%);
}
.title-shade::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
  opacity: .5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.slash { position: absolute; z-index: 2; pointer-events: none; transform: rotate(-22deg); border-radius: 99px; }
.slash.s1 {
  width: 46vw; height: 2px;
  right: -6vw; top: 23%;
  background: linear-gradient(90deg, transparent, rgba(255, 138, 61, .65), transparent);
  box-shadow: 0 0 26px rgba(255, 138, 61, .5);
  animation: slashPulse 3.6s ease-in-out infinite;
}
.slash.s2 {
  width: 32vw; height: 1.5px;
  right: 6vw; top: 29%;
  background: linear-gradient(90deg, transparent, rgba(255, 217, 160, .5), transparent);
  animation: slashPulse 3.6s ease-in-out .7s infinite;
}

.embers { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.embers i {
  position: absolute;
  bottom: -10px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #FFC078;
  box-shadow: 0 0 10px 2px rgba(255, 138, 61, .65);
  animation: rise 9s linear infinite;
  opacity: 0;
}

.hero-art {
  position: absolute;
  z-index: 4;
  right: 1.5%;
  bottom: -1%;
  height: 96%;
  width: auto;
  pointer-events: none;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .55)) drop-shadow(0 0 28px rgba(255, 138, 61, .18));
  animation: heroFloat 5.8s ease-in-out infinite;
  will-change: transform;
}

.title-inner {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: calc(26px + var(--safe-t)) calc(8vw + var(--safe-r)) calc(34px + var(--safe-b)) calc(8vw + var(--safe-l));
  max-width: 1020px;
}

.title-tag {
  animation: fadeIn .5s ease .05s both;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 13px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: #FFD9A0;
  background: rgba(255, 138, 61, .1);
  border: 1px solid rgba(255, 179, 107, .36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.tag-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px 2px rgba(255, 138, 61, .8);
  animation: blip 1.6s ease-in-out infinite;
}

.game-logo {
  animation: fadeIn .6s ease .1s both;
  margin: 15px 0 0;
  font-size: clamp(54px, 8.6vw, 118px);
  line-height: .9;
  font-weight: 900;
  letter-spacing: -.045em;
  display: flex;
  flex-direction: column;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55));
}
.logo-line {
  display: block;
  color: #FFF8F0;
  text-shadow:
    0 3px 0 #6E4A3A,
    0 6px 0 rgba(20, 10, 8, .9),
    0 15px 34px rgba(0, 0, 0, .6);
}
.logo-line.accent {
  margin-top: .04em;
  padding-right: .08em;
  font-size: 1.16em;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #FFE4BC 0%, #FFB36B 34%, #FF8A3D 62%, #F0601E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 0 rgba(86, 30, 8, .9)) drop-shadow(0 10px 26px rgba(255, 96, 20, .32));
}
.logo-sub {
  animation: fadeIn .6s ease .2s both;
  margin-top: 9px;
  font-size: clamp(10px, 1.3vw, 14px);
  font-weight: 800;
  letter-spacing: .62em;
  color: rgba(255, 200, 150, .72);
  padding-left: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

.tagline {
  animation: fadeIn .6s ease .26s both;
  margin: 16px 0 0;
  font-size: clamp(13px, 1.5vw, 17px);
  color: rgba(255, 244, 232, .74);
  letter-spacing: .1em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}

.feature-row { animation: fadeIn .6s ease .3s both; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.feature-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(255, 244, 232, .82);
  background: rgba(16, 12, 26, .6);
  border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.feature-row .mp-icon { width: 15px; height: 15px; color: var(--orange-soft); }

.start-btn {
  position: relative;
  margin-top: 24px;
  min-width: 236px;
  height: 62px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 18px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .16em;
  color: #2A1408;
  background: linear-gradient(180deg, #FFE0B4 0%, #FFB36B 26%, #FF8A3D 58%, #F0601E 100%);
  border: 1.5px solid rgba(255, 236, 214, .9);
  box-shadow:
    0 5px 0 #8E340C,
    0 16px 38px rgba(240, 96, 30, .38),
    inset 0 2px 0 rgba(255, 255, 255, .55);
  overflow: hidden;
  transition: transform .1s ease, box-shadow .1s ease, filter .1s ease;
  animation: fadeIn .6s ease .36s both;
}
.start-btn .mp-icon { width: 25px; height: 25px; margin-left: 2px; }
.start-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #8E340C, 0 8px 20px rgba(240, 96, 30, .3), inset 0 2px 0 rgba(255, 255, 255, .4); filter: brightness(1.06); }
.start-text { text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.start-glow {
  position: absolute;
  top: -60%; left: -30%;
  width: 34%; height: 220%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .62), transparent);
  animation: sweep 3.4s ease-in-out infinite;
  pointer-events: none;
}

.title-meta { animation: fadeIn .6s ease .42s both; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.best-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(255, 244, 232, .66);
}
.best-chip .mp-icon { width: 15px; height: 15px; color: #FFD166; }
.best-chip b { color: #FFD9A0; font-size: 13px; font-variant-numeric: tabular-nums; }
.control-tip { font-size: 10.5px; color: rgba(255, 244, 232, .4); letter-spacing: .04em; }

.title-foot {
  position: absolute;
  z-index: 5;
  left: 8vw; right: 8vw;
  bottom: calc(15px + var(--safe-b));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: .22em;
  color: rgba(255, 244, 232, .32);
}
.foot-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent); }

/* ------------------------------------------------------------
   暂停 / 结算
   ------------------------------------------------------------ */
.modal-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  background: rgba(5, 4, 11, .62);
  backdrop-filter: blur(10px) saturate(.9);
  -webkit-backdrop-filter: blur(10px) saturate(.9);
  z-index: 40;
}
.modal-screen.hidden { display: flex; opacity: 0; visibility: hidden; pointer-events: none; }

.modal-card {
  position: relative;
  width: min(390px, 88vw);
  max-height: 92%;
  overflow-y: auto;
  padding: 26px 26px 20px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 138, 61, .15), transparent 55%),
    linear-gradient(180deg, #1C1528 0%, #100C1A 100%);
  border: 1px solid rgba(255, 179, 107, .25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .09);
  animation: cardIn .34s cubic-bezier(.2, 1.4, .4, 1);
}
.modal-card::before {
  content: "";
  position: absolute; inset: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .05);
  pointer-events: none;
}
.modal-icon, .modal-emblem {
  width: 52px; height: 52px;
  margin: 0 auto 8px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--orange-soft);
  background: rgba(255, 138, 61, .1);
  border: 1px solid rgba(255, 179, 107, .28);
  box-shadow: 0 0 30px rgba(255, 138, 61, .12);
}
.modal-emblem { width: 58px; height: 58px; }
.modal-icon .mp-icon, .modal-emblem .mp-icon { width: 27px; height: 27px; }
.modal-card.lose .modal-emblem { color: #FF7A6A; background: rgba(255, 90, 70, .09); border-color: rgba(255, 120, 100, .26); }
.modal-card.win .modal-emblem { color: #FFD166; background: rgba(255, 209, 102, .1); border-color: rgba(255, 209, 102, .34); box-shadow: 0 0 34px rgba(255, 209, 102, .2); }

.modal-kicker { font-size: 10px; font-weight: 800; letter-spacing: .46em; margin-left: .46em; color: var(--orange-soft); }
.modal-card h2 { margin: 5px 0 0; font-size: 27px; font-weight: 900; letter-spacing: .04em; color: #FFF7EF; }
.modal-card > p { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: rgba(255, 244, 232, .5); }

.result-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0 4px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .07);
}
.result-score span { font-size: 10px; letter-spacing: .18em; color: rgba(255, 244, 232, .46); }
.result-score b { font-size: 36px; font-weight: 900; line-height: 1.1; color: #FFD9A0; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(255, 138, 61, .35); }
.result-score em { font-style: normal; font-size: 10px; color: rgba(255, 209, 160, .6); margin-top: 1px; }

.modal-stats { display: flex; justify-content: center; gap: 10px; margin: 10px 0 18px; }
.modal-stats div {
  flex: 1;
  max-width: 110px;
  padding: 8px 6px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .06);
}
.modal-stats span { display: block; font-size: 9.5px; letter-spacing: .1em; color: rgba(255, 244, 232, .42); }
.modal-stats b { display: block; margin-top: 2px; font-size: 18px; font-weight: 900; color: #FFF4E8; font-variant-numeric: tabular-nums; }

.primary-btn {
  display: block;
  width: 100%;
  height: 48px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .16em;
  color: #2A1408;
  background: linear-gradient(180deg, #FFD9A0 0%, #FFA24C 42%, #FF7A2A 100%);
  border: 1px solid rgba(255, 236, 214, .65);
  box-shadow: 0 4px 0 #8E340C, 0 12px 26px rgba(240, 96, 30, .28);
  transition: transform .1s, filter .1s;
}
.primary-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8E340C, 0 6px 16px rgba(240, 96, 30, .22); }
.ghost-btn {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 8px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(255, 244, 232, .66);
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: background .12s, color .12s;
}
.ghost-btn:active { background: rgba(255, 255, 255, .08); color: #FFF4E8; }

/* ------------------------------------------------------------
   动画
   ------------------------------------------------------------ */
@keyframes kenburns {
  0% { transform: scale(1.02) translate3d(0, 0, 0); }
  100% { transform: scale(1.1) translate3d(-1.4%, -1%, 0); }
}
@keyframes rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.6); }
  12% { opacity: .85; }
  70% { opacity: .55; }
  100% { opacity: 0; transform: translate3d(22px, -78vh, 0) scale(1.1); }
}
@keyframes sweep {
  0%, 58% { left: -40%; }
  86%, 100% { left: 120%; }
}
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroFloat {
  0%, 100% { transform: translateY(3px) rotate(-.15deg); }
  50% { transform: translateY(-9px) rotate(.2deg); }
}
@keyframes slashPulse { 0%, 100% { opacity: .18; } 50% { opacity: .75; } }
@keyframes lowPulse { from { filter: brightness(.9); } to { filter: brightness(1.2); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ------------------------------------------------------------
   适配
   ------------------------------------------------------------ */
@media (max-width: 860px), (max-height: 520px) {
  .hud { padding-top: calc(7px + var(--safe-t)); }
  .avatar { width: 34px; height: 34px; }
  .avatar .mp-icon { width: 19px; height: 19px; }
  .vitals { width: min(200px, 27vw); }
  .fighter-name { font-size: 11.5px; }
  .hpbar { height: 9px; }
  .stage-chip { height: 26px; padding: 0 11px; font-size: 11px; }
  .score-card { height: 26px; padding: 0 9px; }
  .score-card b { font-size: 14px; }
  .hud-btn { width: 28px; height: 28px; }
  .hud-btn .mp-icon { width: 16px; height: 16px; }
  .controls { height: 160px; }
  .joy { width: 98px; height: 98px; }
  .joy-knob { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .actions { transform: scale(.88); transform-origin: right bottom; }
  .title-inner { padding-left: calc(6vw + var(--safe-l)); }
  .game-logo { font-size: clamp(44px, 8.4vw, 74px); }
  .start-btn { height: 54px; min-width: 208px; font-size: 16.5px; margin-top: 18px; }
  .feature-row { margin-top: 12px; }
  .title-foot { display: none; }
  .modal-card { padding: 20px 20px 15px; }
  .modal-card h2 { font-size: 23px; }
  .modal-stats { margin-bottom: 13px; }
}

@media (max-width: 560px) {
  .hud { grid-template-columns: 1fr auto; }
  .hud-center { position: absolute; top: calc(7px + var(--safe-t)); left: 50%; transform: translateX(-50%); }
  .stage-dots { display: none; }
  .score-card .score-label, .score-card .best { display: none; }
  .hud-right { gap: 5px; }
  .vitals { width: 120px; }
  .title-tag { font-size: 10px; height: 25px; }
  .tagline { margin-top: 12px; }
  .feature-row span { height: 25px; font-size: 10px; padding: 0 8px; }
  .title-meta { margin-top: 13px; gap: 8px; }
  .control-tip { display: none; }
  .title-foot { display: none; }
}

@media (orientation: portrait) {
  .title-inner { align-items: center; text-align: center; padding-left: calc(7vw + var(--safe-l)); padding-right: calc(7vw + var(--safe-r)); max-width: none; }
  .title-shade { background: linear-gradient(180deg, rgba(6, 5, 13, .72) 0%, rgba(6, 5, 13, .45) 35%, rgba(6, 5, 13, .82) 100%); }
  .game-logo { align-items: center; font-size: clamp(46px, 15vw, 78px); }
  .feature-row { justify-content: center; }
  .title-meta { justify-content: center; }
  .best-chip { justify-content: center; }
  .hud-center { display: none; }
  .controls { height: 200px; }
  .combo-pop { top: 26%; right: 8%; }
  .banner { top: 24%; }
  .hero-art { display: none; }
}

/* 横屏小手机：压缩首页竖向空间，logo 横排 */
@media (orientation: landscape) and (max-height: 480px) {
  .title-inner {
    justify-content: center;
    padding-top: calc(10px + var(--safe-t));
    padding-bottom: calc(10px + var(--safe-b));
    padding-left: calc(6vw + var(--safe-l));
  }
  .hero-art { height: 100%; right: -2%; opacity: .92; }
  .title-tag { display: none; }
  .game-logo {
    margin-top: 0;
    flex-direction: row;
    align-items: baseline;
    gap: .08em;
    font-size: clamp(34px, 6.4vw, 56px);
    line-height: 1;
  }
  .logo-line { white-space: nowrap; }
  .logo-line.accent { margin-top: 0; font-size: 1.14em; }
  .logo-sub { margin-top: 4px; font-size: 9px; letter-spacing: .48em; }
  .tagline { display: none; }
  .feature-row { display: none; }
  .start-btn { margin-top: 13px; height: 47px; min-width: 184px; font-size: 15px; border-radius: 14px; }
  .start-btn .mp-icon { width: 20px; height: 20px; }
  .title-meta { margin-top: 10px; gap: 10px; }
  .control-tip { font-size: 9.5px; }
  .title-foot { display: none; }
  .modal-card { padding: 16px 20px 12px; }
  .modal-icon, .modal-emblem { width: 40px; height: 40px; margin-bottom: 5px; }
  .modal-icon .mp-icon, .modal-emblem .mp-icon { width: 21px; height: 21px; }
  .modal-card h2 { font-size: 22px; }
  .modal-card > p { margin-top: 5px; font-size: 11px; }
  .result-score { margin: 9px 0 2px; padding: 8px 14px; }
  .result-score b { font-size: 28px; }
  .modal-stats { margin: 8px 0 11px; }
  .modal-stats div { padding: 5px 4px; }
  .modal-stats b { font-size: 15px; }
  .primary-btn { height: 41px; font-size: 13.5px; }
  .ghost-btn { height: 34px; margin-top: 6px; font-size: 11.5px; }
}
