/* 星际矿工 · 移动端 H5
   主色 #FF8A3D / 深空蓝 #050A18
   画面使用 gpt-image 生成的矿区主视觉，UI 为玻璃质感深空面板 */

:root {
  --orange: #FF8A3D;
  --orange-hot: #FFB35C;
  --orange-deep: #F2630C;
  --gold: #FFD36B;
  --bg: #050A18;
  --bg-2: #081226;
  --ink: #F8F4EB;
  --muted: #A2AEC5;
  --dim: #6F7C95;
  --line: rgba(255, 255, 255, 0.10);
  --glass: rgba(11, 22, 43, 0.72);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

[hidden] { display: none !important; }

.app {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

/* =========================================================
   首页
   ========================================================= */
.home {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 14px);
  background: var(--bg);
}

.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/gen/gptimg_1795241811_look.png");
  background-size: cover;
  background-position: 32% 46%;
  background-repeat: no-repeat;
  transform: scale(1.015);
  transform-origin: 34% 44%;
  animation: scene-in 1.2s ease-out both;
}

.scene-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 9, 22, 0.96) 0%, rgba(4, 9, 22, 0.82) 10%, rgba(4, 9, 22, 0.35) 18%, rgba(4, 9, 22, 0) 28%),
    linear-gradient(180deg, rgba(5, 10, 24, 0) 33%, rgba(5, 10, 24, 0.46) 54%, rgba(5, 10, 24, 0.92) 76%, #050A18 100%),
    radial-gradient(130% 90% at 60% 30%, transparent 48%, rgba(2, 5, 14, 0.55) 100%);
}

.stars {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.9;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 16%, rgba(255, 255, 255, 0.95), transparent 60%),
    radial-gradient(1.1px 1.1px at 22% 9%, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(1.8px 1.8px at 77% 12%, rgba(255, 214, 155, 0.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 88% 31%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1.6px 1.6px at 12% 41%, rgba(168, 206, 255, 0.9), transparent 60%),
    radial-gradient(1.1px 1.1px at 62% 24%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 92% 54%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.2px 1.2px at 5% 63%, rgba(255, 255, 255, 0.65), transparent 60%),
    radial-gradient(2px 2px at 48% 7%, rgba(255, 138, 61, 0.9), transparent 60%),
    radial-gradient(1.3px 1.3px at 72% 43%, rgba(255, 255, 255, 0.55), transparent 60%);
  animation: twinkle 5.5s ease-in-out infinite alternate;
}

/* 顶部玩家与资源 */
.home-hud {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(23, 41, 72, 0.84), rgba(7, 15, 32, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.avatar {
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  border: 2px solid rgba(255, 179, 92, 0.82);
  background-color: #13203a;
  background-image: url("images/gen/gptimg_1795241811_look.png");
  background-size: 390px auto;
  background-position: 27% 36%;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.12), 0 4px 12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta { flex: 1 1 auto; min-width: 0; max-width: 130px; }

.player-name {
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #FFF9EE;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.player-level {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--orange-hot);
}

.levelbar {
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}

.levelbar i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFB35C, #FF8A3D);
  box-shadow: 0 0 8px rgba(255, 138, 61, 0.7);
  transition: width 0.4s ease;
}

.wallet {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.res {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(23, 41, 72, 0.84), rgba(7, 15, 32, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 800;
  color: #FFF4DC;
}

.res .mp-icon {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.res-gem .mp-icon { color: #D98BFF; }

.sector-badge {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 7px 11px 7px 9px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(23, 40, 69, 0.72), rgba(7, 14, 29, 0.48));
  border: 1px solid rgba(255, 179, 92, 0.20);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sector-badge-text { display: flex; flex-direction: column; gap: 1px; }
.sector-badge-text b { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: #FFE8CB; }
.sector-badge-text small { font-size: 9px; color: var(--muted); letter-spacing: 0.08em; }

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7CFFB2;
  box-shadow: 0 0 0 0 rgba(124, 255, 178, 0.55);
  animation: ping 2.2s ease-out infinite;
}

/* 底部主面板 */
.home-panel {
  position: relative;
  z-index: 5;
  margin-top: auto;
  padding: 20px 18px calc(14px + var(--safe-bottom));
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(20, 34, 60, 0.86) 0%, rgba(8, 17, 35, 0.96) 38%, rgba(5, 11, 25, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    0 -24px 70px rgba(0, 0, 0, 0.60),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 0 1px rgba(255, 138, 61, 0.04);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  animation: panel-in 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

.home-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 34px;
  right: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 179, 92, 0.85), transparent);
  filter: drop-shadow(0 0 6px rgba(255, 138, 61, 0.8));
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.panel-title-wrap { min-width: 0; }

.eyebrow {
  margin: 0 0 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--orange-hot);
  text-transform: uppercase;
}

.panel-head h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #FFF9EF;
  text-shadow: 0 2px 18px rgba(255, 138, 61, 0.18);
}

.best-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(255, 179, 92, 0.08);
  border: 1px solid rgba(255, 179, 92, 0.20);
  font-size: 10px;
  color: #FFDDAE;
  white-space: nowrap;
}

.best-badge .mp-icon { width: 15px; height: 15px; color: var(--gold); }
.best-badge b { font-size: 12px; font-weight: 800; }

.panel-desc {
  margin: 11px 0 13px;
  font-size: 12px;
  line-height: 1.68;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 10px;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.stat-label {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.stat strong {
  font-size: 17px;
  line-height: 1;
  font-weight: 800;
  color: #FFF4DC;
  letter-spacing: 0.01em;
}

/* 开始按钮 */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin-top: 13px;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FFC06B 0%, #FF9A45 32%, #FF7A1F 68%, #F2630C 100%);
  color: #2A1607;
  box-shadow:
    0 12px 30px rgba(255, 122, 31, 0.36),
    0 2px 0 rgba(255, 226, 178, 0.55) inset,
    0 -9px 20px rgba(166, 62, 0, 0.28) inset;
  overflow: hidden;
  touch-action: manipulation;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cta::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -34%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-22deg);
  animation: shine 3.8s ease-in-out infinite;
  pointer-events: none;
}

.cta:active {
  transform: scale(0.975);
  box-shadow: 0 6px 16px rgba(255, 122, 31, 0.30), 0 2px 0 rgba(255, 226, 178, 0.4) inset;
}

.cta-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(43, 22, 5, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cta-icon svg { width: 28px; height: 28px; }

.cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.cta-text b {
  font-size: 19px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.cta-text small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  opacity: 0.68;
}

.cta-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  margin-left: auto;
  border-radius: 50%;
  background: rgba(43, 22, 5, 0.14);
}

.cta-arrow .mp-icon { width: 19px; height: 19px; color: #2A1607; }

.hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 0;
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.hint .mp-icon { width: 13px; height: 13px; color: var(--orange); }

/* =========================================================
   采矿玩法
   ========================================================= */
.mine {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 10;
  width: 100%;
  max-width: 560px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 16px);
  background: #040814;
}

.mine-bg {
  position: absolute;
  inset: -20px;
  background-image: url("images/gen/gptimg_1795241811_look.png");
  background-size: cover;
  background-position: 34% 38%;
  filter: blur(9px) brightness(0.34) saturate(1.18);
  transform: scale(1.06);
}

.mine-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 55% at 50% 48%, rgba(255, 138, 61, 0.10) 0%, transparent 62%),
    radial-gradient(120% 85% at 50% 45%, transparent 34%, rgba(2, 5, 14, 0.80) 100%),
    linear-gradient(180deg, rgba(4, 8, 20, 0.92) 0%, rgba(4, 8, 20, 0.18) 22%, rgba(4, 8, 20, 0.28) 70%, rgba(4, 8, 20, 0.96) 100%);
}

.mine-stars {
  position: absolute;
  inset: 0;
  opacity: 0.65;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 18%, #FFF, transparent),
    radial-gradient(1px 1px at 78% 12%, #FFE0BA, transparent),
    radial-gradient(1.6px 1.6px at 88% 44%, #FFF, transparent),
    radial-gradient(1.1px 1.1px at 20% 56%, #AFD5FF, transparent),
    radial-gradient(1.3px 1.3px at 63% 31%, #FFF, transparent),
    radial-gradient(1.6px 1.6px at 38% 8%, #FFF1DB, transparent),
    radial-gradient(1.1px 1.1px at 6% 82%, #FFF, transparent),
    radial-gradient(1.4px 1.4px at 94% 73%, #FFC78F, transparent);
  animation: twinkle 4.2s ease-in-out infinite alternate;
}

.mine-hud {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(14, 26, 49, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.1s ease;
}

.round-btn:active { transform: scale(0.92); }
.round-btn .mp-icon { width: 21px; height: 21px; color: #FFE8CB; }

.timer {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(14, 26, 49, 0.78);
  border: 1px solid rgba(255, 179, 92, 0.24);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #FFE9CC;
}

.timer .mp-icon { width: 16px; height: 16px; color: var(--orange-hot); }
.timer b { font-size: 15px; font-weight: 800; letter-spacing: 0.08em; }

.timer.urgent {
  border-color: rgba(255, 96, 84, 0.55);
  color: #FFB6AC;
  animation: urgent 0.8s ease-in-out infinite;
}

.timer.urgent .mp-icon { color: #FF7264; }

.run-ore {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(14, 26, 49, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 13px;
  color: #FFF2D8;
}

.run-ore .mp-icon { width: 16px; height: 16px; color: var(--gold); }
.run-ore b { font-weight: 800; letter-spacing: 0.02em; }

.time-track {
  position: relative;
  z-index: 5;
  height: 3px;
  margin: 10px 2px 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.time-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFD36B, #FF8A3D 55%, #FF5C3D);
  box-shadow: 0 0 10px rgba(255, 138, 61, 0.7);
  transition: width 0.12s linear;
}

.combo {
  position: absolute;
  z-index: 6;
  top: calc(var(--safe-top) + 76px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.22), rgba(20, 22, 42, 0.82));
  border: 1px solid rgba(255, 179, 92, 0.40);
  box-shadow: 0 6px 24px rgba(255, 106, 20, 0.22);
  color: #FFE9C8;
  font-size: 11px;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translate(-50%, -8px) scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.2, 1.4, 0.4, 1);
  pointer-events: none;
  white-space: nowrap;
}

.combo.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.combo b { font-size: 15px; font-weight: 800; color: var(--orange-hot); }
.combo small {
  padding-left: 7px;
  border-left: 1px solid rgba(255, 179, 92, 0.28);
  font-size: 10px;
  font-weight: 800;
  color: #FFD36B;
}

.mine-main {
  position: relative;
  z-index: 4;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2vh 0 1vh;
}

.mine-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 1.5vh;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 216, 174, 0.72);
  text-transform: uppercase;
}

.scan-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7CFFB2;
  box-shadow: 0 0 8px rgba(124, 255, 178, 0.8);
  animation: ping 2s ease-out infinite;
}

.rock-stage {
  position: relative;
  width: min(76vw, 330px);
  max-width: 330px;
  aspect-ratio: 1 / 1;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
  animation: rock-in 0.55s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}

.rock-stage:active { cursor: grabbing; }

.rock-flare {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 118%;
  height: 118%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.26) 0%, rgba(255, 138, 61, 0.10) 34%, transparent 66%);
  filter: blur(10px);
  animation: flare 3s ease-in-out infinite;
  pointer-events: none;
}

.asteroid {
  position: absolute;
  inset: 5% 5% 8%;
  transform-origin: 50% 88%;
  animation: rock-float 4.2s ease-in-out infinite;
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.52));
  will-change: transform;
}

.asteroid.shake { animation: rock-shake 0.18s linear; }
.asteroid.breaking { animation: rock-break 0.32s ease-out both; }

.rock-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.crack-lines .crack {
  opacity: 0;
  transition: opacity 0.14s ease;
}

.asteroid[data-low="true"] .rock-svg {
  filter: drop-shadow(0 0 14px rgba(255, 138, 61, 0.55));
}

.pickaxe {
  position: absolute;
  z-index: 3;
  right: -9%;
  top: 15%;
  width: 41%;
  transform-origin: 28% 88%;
  transform: rotate(-12deg);
  filter: drop-shadow(0 10px 9px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  will-change: transform;
}

.pickaxe svg { display: block; width: 100%; height: auto; }
.pickaxe.swing { animation: pick-swing 0.24s cubic-bezier(0.3, 0.7, 0.3, 1); }
.pickaxe.swing-alt { animation: pick-swing-alt 0.24s cubic-bezier(0.3, 0.7, 0.3, 1); }

.impact-ring {
  position: absolute;
  z-index: 2;
  left: 46%;
  top: 48%;
  width: 46%;
  height: 46%;
  border: 2px solid rgba(255, 196, 116, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
}

.impact-ring.burst { animation: ring-burst 0.34s ease-out; }

.floats {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}

.float-num {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #FFE2A8;
  text-shadow: 0 2px 0 rgba(90, 39, 0, 0.55), 0 0 18px rgba(255, 163, 74, 0.85);
  animation: float-up 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  white-space: nowrap;
}

.float-num.gem { color: #E7B1FF; text-shadow: 0 2px 0 rgba(53, 9, 82, 0.55), 0 0 18px rgba(208, 120, 255, 0.85); }
.float-num.bonus { font-size: 13px; color: #FFF0CF; }

.spark {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: var(--s, 5px);
  height: var(--s, 5px);
  border-radius: 50%;
  background: var(--c, #FFB35C);
  box-shadow: 0 0 8px var(--c, #FFB35C);
  pointer-events: none;
  animation: spark-fly 0.66s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

.flash {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 170, 0.8), rgba(255, 138, 61, 0.25) 45%, transparent 70%);
  pointer-events: none;
  animation: flash-out 0.34s ease-out forwards;
}

.rock-hp {
  width: min(76vw, 330px);
  margin-top: 2.2vh;
}

.hp-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.hp-label b { font-size: 10px; color: #FFD9A8; font-weight: 800; }

.hp-track {
  height: 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.hp-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FF8A3D, #FFC46A);
  box-shadow: 0 0 10px rgba(255, 138, 61, 0.65);
  transition: width 0.12s ease;
}

.hp-track i.low { background: linear-gradient(90deg, #FF4F3D, #FF8A3D); }

.mine-foot {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding-bottom: 2px;
}

.combo-tip {
  min-height: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #FFD9A6;
  text-shadow: 0 0 14px rgba(255, 138, 61, 0.5);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.combo-tip.show { opacity: 1; transform: translateY(0); }

.tap-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: rgba(162, 174, 197, 0.78);
}

.tap-circle {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 179, 92, 0.55);
}

.tap-circle::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--orange);
  animation: tap-pulse 1.4s ease-out infinite;
}

/* =========================================================
   结算
   ========================================================= */
.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade-in 0.22s ease-out both;
}

.result-card {
  position: relative;
  width: min(340px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 22px 20px 18px;
  border-radius: 26px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 138, 61, 0.16), transparent 58%),
    linear-gradient(180deg, #162743 0%, #0A1528 58%, #071020 100%);
  border: 1px solid rgba(255, 179, 92, 0.32);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 0 54px rgba(255, 138, 61, 0.12);
  animation: result-in 0.4s cubic-bezier(0.2, 1.25, 0.4, 1) both;
}

.result-glow {
  position: absolute;
  top: -70px;
  left: 50%;
  width: 220px;
  height: 160px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 179, 92, 0.32), transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}

.result-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.result-top .eyebrow { margin-bottom: 0; }

.rating {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: -6px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 211, 107, 0.22), rgba(255, 122, 31, 0.18));
  border: 1px solid rgba(255, 211, 107, 0.44);
  color: var(--gold);
  font-size: 21px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 211, 107, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.result-card h2 {
  position: relative;
  margin: 6px 0 4px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #FFF8EC;
}

.result-sub {
  position: relative;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.result-score {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 16px 0 14px;
  padding: 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 179, 92, 0.16);
}

.result-score span { font-size: 18px; font-weight: 800; color: var(--orange-hot); }
.result-score b {
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #FFE7B8;
  text-shadow: 0 0 24px rgba(255, 179, 92, 0.35);
}
.result-score small { margin-left: 2px; font-size: 11px; color: var(--muted); }

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.result-grid > div {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 3px;
}

.result-grid > div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.result-grid span { font-size: 9px; color: var(--dim); letter-spacing: 0.05em; }
.result-grid b { font-size: 15px; font-weight: 800; color: #FFF0D2; }

.cta-small {
  min-height: 58px;
  margin-top: 0;
  border-radius: 16px;
}

.cta-small .cta-text { margin: 0 auto; align-items: center; }
.cta-small .cta-text b { font-size: 17px; }
.cta-small .cta-arrow { margin-left: 0; }

.text-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.text-btn:active { background: rgba(255, 255, 255, 0.05); color: #FFF0D8; }

/* =========================================================
   动效
   ========================================================= */
@keyframes scene-in {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1.015); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes twinkle {
  from { opacity: 0.45; }
  to { opacity: 0.95; }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(124, 255, 178, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(124, 255, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 255, 178, 0); }
}

@keyframes shine {
  0%, 58% { left: -34%; opacity: 0; }
  66% { opacity: 1; }
  82%, 100% { left: 118%; opacity: 0; }
}

@keyframes flare {
  0%, 100% { opacity: 0.72; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes rock-in {
  from { opacity: 0; transform: scale(0.82) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes rock-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes rock-shake {
  0% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-5px, 2px) rotate(-1.5deg); }
  45% { transform: translate(5px, -2px) rotate(1.5deg); }
  70% { transform: translate(-3px, 1px) rotate(-0.8deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

@keyframes rock-break {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  100% { transform: scale(0.2) rotate(-16deg); opacity: 0; }
}

@keyframes pick-swing {
  0% { transform: rotate(-12deg); }
  34% { transform: rotate(-58deg) translate(-7px, -7px); }
  62% { transform: rotate(12deg) translate(-1px, 5px); }
  100% { transform: rotate(-12deg); }
}

@keyframes pick-swing-alt {
  0% { transform: rotate(-9deg); }
  34% { transform: rotate(-52deg) translate(-6px, -5px); }
  62% { transform: rotate(16deg) translate(-1px, 4px); }
  100% { transform: rotate(-9deg); }
}

@keyframes ring-burst {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.16); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.75); }
  22% { opacity: 1; transform: translate(-50%, -58%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(0.92); }
}

@keyframes spark-fly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.25); }
}

@keyframes flash-out {
  0% { opacity: 0.9; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.3); }
}

@keyframes tap-pulse {
  0% { transform: scale(0.5); opacity: 0.9; }
  80%, 100% { transform: scale(1.5); opacity: 0; }
}

@keyframes urgent {
  0%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 rgba(255, 90, 70, 0); }
  50% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 90, 70, 0.45); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   小屏适配
   ========================================================= */
@media (max-height: 700px) {
  .home { padding-top: calc(var(--safe-top) + 10px); }
  .home-panel { padding: 16px 16px calc(10px + var(--safe-bottom)); border-radius: 24px; }
  .panel-head h1 { font-size: 24px; }
  .panel-desc { margin: 8px 0 10px; font-size: 11px; }
  .stat { padding: 7px 4px 8px; }
  .stat strong { font-size: 15px; }
  .cta { min-height: 58px; margin-top: 10px; }
  .cta-icon { width: 37px; height: 37px; }
  .cta-text b { font-size: 17px; }
  .hint { margin-top: 7px; }
  .mine-label { margin-bottom: 0.8vh; }
  .rock-hp { margin-top: 1.2vh; }
  .mine-foot { gap: 4px; }
}

@media (max-height: 620px) {
  .sector-badge { display: none; }
  .panel-desc { display: none; }
  .home-panel { padding-top: 14px; }
}

@media (max-width: 359px) {
  .home { padding-left: 12px; padding-right: 12px; }
  .player-meta { max-width: 96px; }
  .player-name { font-size: 12px; }
  .res { padding: 0 8px; gap: 4px; }
  .res .mp-icon { width: 14px; height: 14px; }
  .res b { font-size: 11px; }
  .home-panel { padding-left: 14px; padding-right: 14px; }
  .panel-head h1 { font-size: 24px; }
}

@media (min-width: 420px) {
  .player-name { max-width: 150px; }
  .res { padding: 0 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
