/* 桥上打僵尸10 · H5 竖屏生存射击 */
:root {
  --orange: #FF8A3D;
  --orange-deep: #F26522;
  --amber: #FFC24A;
  --cream: #FFF3E2;
  --muted: rgba(255, 240, 224, .62);
  --panel: rgba(11, 14, 20, .78);
  --panel-2: rgba(6, 8, 12, .92);
  --line: rgba(255, 176, 102, .28);
  --line-soft: rgba(255, 255, 255, .10);
  --shadow: 0 12px 30px rgba(0, 0, 0, .45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #06070b;
}
body {
  position: fixed;
  inset: 0;
  color: var(--cream);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 2px solid rgba(255, 194, 74, .9); outline-offset: 3px; }
.hidden { display: none !important; }

.app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100svh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #0a0b0f;
  isolation: isolate;
}

/* ---------- 场景 ---------- */
.world { position: absolute; inset: 0; overflow: hidden; z-index: 0; background: #17120f; }
.scene {
  position: absolute;
  inset: -3.5%;
  background-color: #17120f;
  background-image: url("images/gen/bridge_siege.png");
  background-size: cover;
  background-position: 50% 48%;
  background-repeat: no-repeat;
  transform: scale(1.055);
  animation: sceneDrift 34s ease-in-out infinite alternate;
  will-change: transform;
}
[data-state="playing"] .scene,
[data-state="paused"] .scene,
[data-state="over"] .scene {
  animation: none;
  transform: scale(1.035);
  filter: brightness(.9) saturate(.97) contrast(1.05);
  transition: filter .5s ease;
}
@keyframes sceneDrift {
  from { transform: scale(1.055) translate3d(0, 0, 0); }
  to { transform: scale(1.095) translate3d(0, -1.4%, 0); }
}
.scene-game {
  background-image: url("images/gen/bridge_siege_game.png");
  background-position: 50% 46%;
  opacity: 0;
  transform: scale(1.045);
  animation: none;
  transition: opacity .5s ease, transform 1.2s ease;
}
[data-state="playing"] .scene-game,
[data-state="paused"] .scene-game,
[data-state="over"] .scene-game {
  opacity: 1;
  transform: scale(1.035);
}

.scene-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(26% 13% at 96% 2%, rgba(2, 3, 7, .92), transparent 72%),
    linear-gradient(180deg,
      rgba(3, 5, 9, .82) 0%,
      rgba(3, 5, 9, .42) 13%,
      rgba(4, 5, 8, .04) 31%,
      rgba(4, 5, 8, 0) 52%,
      rgba(3, 4, 7, .52) 79%,
      rgba(2, 3, 6, .92) 100%),
    radial-gradient(120% 46% at 50% 37%, rgba(255, 132, 54, .16), transparent 68%),
    linear-gradient(90deg, rgba(2, 3, 6, .26), transparent 28%, transparent 72%, rgba(2, 3, 6, .26));
  pointer-events: none;
}
[data-state="playing"] .scene-shade,
[data-state="paused"] .scene-shade,
[data-state="over"] .scene-shade {
  background:
    radial-gradient(26% 13% at 96% 2%, rgba(2, 3, 7, .92), transparent 72%),
    linear-gradient(180deg,
      rgba(3, 5, 9, .9) 0%,
      rgba(3, 5, 9, .5) 12%,
      rgba(4, 5, 8, .1) 30%,
      rgba(4, 5, 8, 0) 50%,
      rgba(3, 4, 7, .58) 78%,
      rgba(2, 3, 6, .95) 100%),
    radial-gradient(90% 34% at 50% 45%, rgba(255, 126, 48, .12), transparent 70%),
    linear-gradient(90deg, rgba(2, 3, 6, .34), transparent 24%, transparent 76%, rgba(2, 3, 6, .34));
}

.fog {
  position: absolute;
  inset: -18%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .55;
  background:
    radial-gradient(42% 24% at 28% 66%, rgba(255, 188, 140, .13), transparent 70%),
    radial-gradient(38% 20% at 72% 58%, rgba(255, 160, 100, .10), transparent 72%);
  filter: blur(14px);
  animation: fogA 24s ease-in-out infinite alternate;
}
.fog-b {
  opacity: .38;
  background:
    radial-gradient(48% 18% at 62% 74%, rgba(255, 214, 178, .12), transparent 72%),
    radial-gradient(40% 22% at 22% 52%, rgba(188, 198, 220, .08), transparent 74%);
  animation: fogB 33s ease-in-out infinite alternate;
}
@keyframes fogA {
  from { transform: translate3d(-2.5%, 1.5%, 0) scale(1); }
  to { transform: translate3d(3.5%, -2%, 0) scale(1.07); }
}
@keyframes fogB {
  from { transform: translate3d(3%, -1%, 0) scale(1.03); }
  to { transform: translate3d(-3.5%, 2%, 0) scale(1); }
}

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

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 78% at 50% 44%, transparent 42%, rgba(0, 0, 0, .34) 78%, rgba(0, 0, 0, .72) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .5), transparent 18%);
}
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px);
}

/* ---------- 通用按钮 ---------- */
.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 62px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 231, 177, .92);
  color: #2A1503;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .12em;
  background: linear-gradient(180deg, #FFE49B 0%, #FFC84E 30%, #FF9E31 64%, #ED7213 100%);
  box-shadow:
    0 14px 32px rgba(230, 100, 20, .38),
    0 2px 0 rgba(255, 245, 214, .55) inset,
    0 -4px 0 rgba(137, 54, 0, .34) inset;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -36%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-22deg);
  animation: shine 4.2s ease-in-out infinite;
}
.btn-primary:active {
  transform: translateY(2px) scale(.995);
  filter: brightness(.96);
  box-shadow:
    0 6px 16px rgba(230, 100, 20, .34),
    0 2px 0 rgba(255, 245, 214, .45) inset,
    0 -2px 0 rgba(137, 54, 0, .3) inset;
}
.btn-primary .mp-icon { width: 25px; height: 25px; color: #2A1503; }
.btn-primary .arrow { width: 19px; height: 19px; margin-left: 2px; transform: rotate(180deg); opacity: .72; }
@keyframes shine {
  0%, 62% { left: -36%; opacity: 0; }
  72% { opacity: .9; }
  88%, 100% { left: 112%; opacity: 0; }
}

.btn-ghost {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 242, 226, .72);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: background .15s ease, transform .12s ease;
}
.btn-ghost:active { transform: translateY(1px); background: rgba(255, 255, 255, .09); }

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease;
}
[data-state="playing"] .hud,
[data-state="paused"] .hud,
[data-state="over"] .hud { opacity: 1; visibility: visible; }
.hud button { pointer-events: auto; }
[data-state="over"] .hud-top,
[data-state="paused"] .hud-top { opacity: .35; }

.hud-top {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  left: 13px;
  right: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: opacity .3s ease;
}
.hud-btn {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #FFE2BD;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .08) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .12s ease, background .12s ease;
}
.hud-btn:active { transform: scale(.94); background: rgba(255, 138, 61, .2); }
.hud-btn .mp-icon { width: 20px; height: 20px; }

.hp-pill {
  flex: 1 1 auto;
  min-width: 74px;
  max-width: 132px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 1px 0 rgba(255, 255, 255, .07) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hp-heart {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #FF4D5C;
  filter: drop-shadow(0 0 7px rgba(255, 67, 86, .65));
}
.hp-track {
  flex: 1 1 auto;
  height: 9px;
  min-width: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .13);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .7) inset;
  overflow: hidden;
}
.hp-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #FF3A4C, #FF8A3D);
  box-shadow: 0 0 10px rgba(255, 78, 66, .75);
  transition: width .22s ease;
}
#hpNum {
  flex: 0 0 auto;
  min-width: 22px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: #FFE7CE;
  font-variant-numeric: tabular-nums;
}

.wave-pill {
  flex: 0 0 78px;
  width: 78px;
  height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(24, 18, 14, .88), rgba(8, 9, 13, .9));
  border: 1px solid rgba(255, 173, 92, .38);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 213, 164, .1) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wave-line { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: rgba(255, 233, 208, .82); white-space: nowrap; }
.wave-line b { font-size: 14px; color: #FFC24A; }
.wave-line em { font-style: normal; color: rgba(255, 233, 208, .45); }
.wave-sub { display: flex; align-items: center; gap: 3px; font-size: 9px; color: rgba(255, 226, 195, .55); }
.wave-sub .mp-icon { width: 9px; height: 9px; color: #FF8A3D; }
.wave-sub b { color: #FFD9A4; font-size: 10px; }

.kills-pill {
  margin-left: auto;
  flex: 0 0 50px;
  width: 50px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 1px 0 rgba(255, 255, 255, .07) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.kills-pill span { font-size: 8px; letter-spacing: .1em; color: rgba(255, 240, 224, .5); }
.kills-pill b { font-size: 16px; font-weight: 900; color: #FFCB6B; line-height: 1.05; font-variant-numeric: tabular-nums; }

.wave-banner {
  position: absolute;
  top: 23%;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2, .8, .3, 1.1);
  text-shadow: 0 4px 22px rgba(0, 0, 0, .9);
}
.wave-banner.show { opacity: 1; transform: translateY(0) scale(1); }
.wb-kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5em;
  color: #FFA95F;
  margin-bottom: 4px;
}
.wave-banner strong {
  display: block;
  font-size: 38px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: .03em;
  color: #FFF6E7;
}
.wave-banner strong em { font-style: normal; color: #FFC24A; }
.wb-sub { display: block; margin-top: 4px; font-size: 12px; letter-spacing: .18em; color: rgba(255, 234, 209, .7); }
.wave-banner.clear .wb-kicker { color: #8FE8A8; }
.wave-banner.clear strong { color: #DFFFE8; }

.hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 112px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(7, 9, 13, .74);
  border: 1px solid rgba(255, 178, 105, .2);
  color: rgba(255, 232, 208, .82);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.hint .mp-icon { width: 13px; height: 13px; color: #FFA45A; }
.hint.fade { opacity: 0; transform: translate(-50%, 6px); }

.hud-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 16px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.weapon-card {
  position: relative;
  flex: 0 1 214px;
  min-width: 0;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px 10px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(22, 26, 34, .92), rgba(7, 9, 14, .96));
  border: 1px solid rgba(255, 176, 102, .32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .09) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.weapon-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #FFC24A, #FF6B2C);
  box-shadow: 0 0 12px rgba(255, 138, 61, .7);
}
.weapon-art { flex: 0 0 62px; width: 62px; opacity: .95; filter: drop-shadow(0 3px 8px rgba(255, 120, 40, .25)); }
.weapon-art svg { display: block; width: 100%; height: auto; }
.weapon-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1; }
.weapon-name { font-size: 9px; letter-spacing: .1em; color: rgba(255, 228, 200, .48); white-space: nowrap; }
.ammo-line { display: flex; align-items: baseline; gap: 3px; margin-top: 5px; }
.ammo-line b { font-size: 27px; font-weight: 900; color: #FFF0D9; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.ammo-line em { font-style: normal; font-size: 11px; font-weight: 700; color: rgba(255, 233, 208, .4); }
.reload-label {
  display: none;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #FFAA5C;
  animation: blink 1s ease-in-out infinite;
}
.weapon-card.reloading .reload-label { display: block; }
.weapon-card.reloading .ammo-line { opacity: .55; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.reload-btn {
  position: relative;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 50%;
  color: #FFE3C0;
  background:
    radial-gradient(circle at 36% 30%, rgba(84, 52, 28, .95), rgba(20, 14, 10, .98) 68%);
  border: 1px solid rgba(255, 182, 108, .5);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, .52),
    0 2px 0 rgba(255, 228, 190, .18) inset,
    0 -4px 0 rgba(0, 0, 0, .36) inset;
  transition: transform .12s ease, filter .12s ease;
}
.reload-btn:active { transform: scale(.94); filter: brightness(1.12); }
.reload-btn .mp-icon { width: 23px; height: 23px; color: #FFC98B; }
.reload-text { font-size: 9px; font-weight: 800; letter-spacing: .12em; color: rgba(255, 226, 192, .72); }
.reload-btn.reloading { color: #FFB35F; }
.reload-btn.reloading .mp-icon { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.reload-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(#FFB14A var(--p, 0deg), rgba(255, 255, 255, .07) 0deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.reload-btn.reloading .reload-ring { opacity: 1; }

.damage-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(120% 80% at 50% 50%, transparent 32%, rgba(198, 20, 18, .5) 78%, rgba(128, 5, 5, .9) 100%);
  mix-blend-mode: screen;
  transition: opacity .1s linear;
}
.low-hp {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(110% 80% at 50% 50%, transparent 45%, rgba(150, 8, 8, .5) 100%);
  transition: opacity .4s ease;
}
[data-lowhp="1"] .low-hp { opacity: 1; animation: heartBeat 1.15s ease-in-out infinite; }
@keyframes heartBeat {
  0%, 100% { opacity: .28; }
  12% { opacity: .7; }
  24% { opacity: .34; }
  36% { opacity: .58; }
  50% { opacity: .3; }
}

/* ---------- 首页 ---------- */
.screen { position: absolute; inset: 0; z-index: 20; }
.start-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 14px) 20px calc(var(--safe-bottom) + 18px);
  background:
    radial-gradient(88% 38% at 50% 36%, rgba(255, 138, 61, .12), transparent 70%),
    linear-gradient(180deg, rgba(3, 5, 9, .2), transparent 32%, rgba(3, 4, 8, .45) 76%, rgba(3, 4, 8, .82) 100%);
  transition: opacity .35s ease, transform .35s ease, filter .35s ease;
}
.screen.leaving { opacity: 0; transform: scale(1.035); filter: blur(2px); pointer-events: none; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.start-top { display: flex; align-items: center; justify-content: space-between; height: 42px; animation: fadeIn .45s ease both; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 184, 112, .28);
  background: rgba(7, 9, 13, .55);
  color: #FFD8AA;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .26em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand .mp-icon { width: 15px; height: 15px; color: #FF9C4C; }
.sound-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #FFDDB8;
  border: 1px solid rgba(255, 184, 112, .3);
  background: rgba(7, 9, 13, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform .12s ease, background .12s ease;
}
.sound-btn:active { transform: scale(.92); background: rgba(255, 138, 61, .18); }
.sound-btn .mp-icon { width: 19px; height: 19px; }
.sound-btn.muted { color: rgba(255, 221, 184, .5); }

.start-hero { position: relative; margin-top: 7.5vh; padding-left: 2px; animation: riseIn .7s cubic-bezier(.2, .75, .3, 1) both .04s; }
.start-hero::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255, 166, 90, .22);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.4%, rgba(255, 166, 90, .3) 49.4% 50.6%, transparent 50.6%),
    linear-gradient(0deg, transparent 49.4%, rgba(255, 166, 90, .3) 49.4% 50.6%, transparent 50.6%);
  opacity: .8;
  pointer-events: none;
}
.start-hero::before {
  content: "";
  position: absolute;
  right: 51px;
  top: 28px;
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, transparent, rgba(255, 166, 90, .5), transparent);
  pointer-events: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .24em;
  color: rgba(255, 214, 174, .88);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF8A3D;
  box-shadow: 0 0 10px rgba(255, 138, 61, .9);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.75); }
}
.start-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(48px, 13.4vw, 60px);
  line-height: .99;
  font-weight: 900;
  letter-spacing: .015em;
  color: #FFF7EA;
  text-shadow:
    0 2px 0 rgba(96, 44, 10, .5),
    0 8px 30px rgba(0, 0, 0, .72),
    0 0 40px rgba(255, 138, 61, .18);
}
.start-hero h1 span {
  color: transparent;
  background: linear-gradient(180deg, #FFE19A 0%, #FFB24F 44%, #FF7A26 78%, #EC5E16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 6px 16px rgba(255, 104, 32, .32));
  letter-spacing: .04em;
}
.lead {
  margin: 16px 0 0;
  max-width: 268px;
  font-size: 13px;
  line-height: 1.72;
  letter-spacing: .03em;
  color: rgba(255, 244, 231, .72);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}

.start-foot { display: flex; flex-direction: column; gap: 12px; animation: riseIn .7s cubic-bezier(.2, .75, .3, 1) both .12s; }
.best-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 178, 106, .24);
  background: linear-gradient(135deg, rgba(27, 24, 22, .82), rgba(9, 11, 16, .9));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .34), 0 1px 0 rgba(255, 255, 255, .07) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.best-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 138, 61, .12);
  border: 1px solid rgba(255, 164, 86, .3);
  color: #FFB25E;
}
.best-icon .mp-icon { width: 20px; height: 20px; }
.best-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.best-label { font-size: 9px; letter-spacing: .14em; color: rgba(255, 238, 221, .45); }
.best-record { display: flex; align-items: baseline; gap: 3px; color: rgba(255, 239, 221, .66); }
.best-record b { font-size: 23px; font-weight: 900; color: #FFD08A; line-height: 1.05; font-variant-numeric: tabular-nums; }
.best-record small { font-size: 10px; color: rgba(255, 239, 221, .52); }
.best-sep { width: 1px; height: 15px; margin: 0 7px; background: rgba(255, 255, 255, .14); align-self: center; }
.best-badge {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #A9F5BB;
  border: 1px solid rgba(112, 224, 142, .35);
  background: rgba(66, 179, 94, .12);
}
.quick-tips {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 4px;
  font-size: 10px;
  letter-spacing: .04em;
  color: rgba(255, 235, 213, .5);
}
.quick-tips span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.quick-tips .mp-icon { width: 12px; height: 12px; color: rgba(255, 160, 86, .8); }

/* ---------- 弹窗 ---------- */
.modal-screen {
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: rgba(3, 5, 9, .6);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 336px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 24px 20px 18px;
  border-radius: 22px;
  text-align: center;
  border: 1px solid rgba(255, 177, 103, .28);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 138, 61, .12), transparent 62%),
    linear-gradient(180deg, rgba(26, 25, 30, .98), rgba(8, 10, 15, .99));
  box-shadow: 0 28px 70px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .09) inset;
  animation: cardIn .34s cubic-bezier(.18, .9, .32, 1.12) both;
}
.modal-card::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF8A3D, transparent);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #FFC27C;
  border: 1px solid rgba(255, 166, 90, .38);
  background: radial-gradient(circle at 40% 30%, rgba(255, 138, 61, .2), rgba(255, 138, 61, .05));
  box-shadow: 0 0 26px rgba(255, 120, 40, .14);
}
.modal-icon .mp-icon { width: 25px; height: 25px; }
.modal-kicker { display: block; font-size: 9px; font-weight: 800; letter-spacing: .4em; color: rgba(255, 169, 95, .8); }
.modal-card h2 { margin: 5px 0 0; font-size: 27px; font-weight: 900; letter-spacing: .02em; color: #FFF4E6; }
.modal-copy { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: rgba(255, 236, 216, .58); }
.mini-stats {
  display: flex;
  margin: 16px 0 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.mini-stats div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mini-stats div + div { border-left: 1px solid rgba(255, 255, 255, .08); }
.mini-stats span { font-size: 9px; letter-spacing: .1em; color: rgba(255, 236, 216, .44); }
.mini-stats b { font-size: 18px; font-weight: 900; color: #FFD399; font-variant-numeric: tabular-nums; }

.result-emblem {
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #FFBB73;
  border: 1px solid rgba(255, 166, 90, .4);
  background: radial-gradient(circle at 40% 30%, rgba(255, 138, 61, .24), rgba(255, 138, 61, .04));
  box-shadow: 0 0 34px rgba(255, 120, 40, .18), 0 0 0 7px rgba(255, 138, 61, .05);
}
.result-emblem .mp-icon { width: 31px; height: 31px; }
.result-card.win .result-emblem {
  color: #A7F4B8;
  border-color: rgba(112, 224, 142, .45);
  background: radial-gradient(circle at 40% 30%, rgba(70, 200, 108, .22), rgba(70, 200, 108, .04));
  box-shadow: 0 0 34px rgba(70, 200, 108, .18), 0 0 0 7px rgba(70, 200, 108, .05);
}
.result-card.win .modal-kicker { color: #8FE8A8; }
.result-card.win h2 { color: #E8FFEF; }
.result-card.lose .result-emblem {
  color: #FF9C86;
  border-color: rgba(255, 104, 82, .42);
  background: radial-gradient(circle at 40% 30%, rgba(200, 38, 24, .24), rgba(200, 38, 24, .04));
  box-shadow: 0 0 34px rgba(220, 48, 30, .16), 0 0 0 7px rgba(220, 48, 30, .04);
}
.result-card.lose .modal-kicker { color: #FF9273; }
.result-stats {
  display: flex;
  margin: 16px 0 12px;
  padding: 11px 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .07);
}
.result-stats div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.result-stats div + div { border-left: 1px solid rgba(255, 255, 255, .08); }
.result-stats span { font-size: 9px; letter-spacing: .04em; color: rgba(255, 236, 216, .44); }
.result-stats b { font-size: 20px; font-weight: 900; color: #FFD7A4; font-variant-numeric: tabular-nums; }
.new-best {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 auto 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #FFE3A6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  border: 1px solid rgba(255, 194, 74, .36);
  background: rgba(255, 178, 60, .12);
}
.new-best .mp-icon { width: 13px; height: 13px; }
.result-card .btn-primary { height: 56px; font-size: 18px; margin-top: 2px; }


/* ---------- 适配 ---------- */
@media (max-height: 720px) {
  .start-hero { margin-top: 4.5vh; }
  .start-hero h1 { font-size: clamp(42px, 12vw, 52px); }
  .lead { margin-top: 11px; font-size: 12px; }
  .best-card { min-height: 58px; }
  .btn-primary { height: 56px; }
  .quick-tips { font-size: 9px; }
  .hud-bottom { bottom: calc(var(--safe-bottom) + 12px); }
  .weapon-card, .reload-btn { height: 70px; }
  .reload-btn { width: 70px; height: 70px; flex-basis: 70px; }
  .hint { bottom: calc(var(--safe-bottom) + 100px); }
}
@media (max-width: 350px) {
  .start-screen { padding-left: 16px; padding-right: 16px; }
  .start-hero h1 { font-size: 44px; }
  .hp-pill { max-width: 112px; }
  .weapon-card { flex-basis: 190px; }
  .weapon-art { display: none; }
  .wave-pill { flex-basis: 72px; width: 72px; }
}
@media (min-width: 560px) {
  body { background: #05060a; }
  .app {
    max-width: 480px;
    border-radius: 0;
    box-shadow: 0 0 90px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .05);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene, .fog, .btn-primary::after, .eyebrow-dot, .reload-btn.reloading .mp-icon,
  .start-top, .start-hero, .start-foot, .modal-card { animation: none !important; }
}
