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

html, body {
  height: 100%;
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #16294d 0%, #0b1d3a 55%, #060f22 100%);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: #eaf3ff;
  touch-action: none;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  display: block;
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(90, 160, 255, .18), 0 0 0 1px rgba(160, 200, 255, .12);
}

footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(200, 220, 255, .45);
  padding: 6px 10px 8px;
  pointer-events: none;
  letter-spacing: .5px;
}

.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(94vw, calc(94vh * 0.5625));
  max-width: 660px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  pointer-events: none;
}
#warmthWrap { flex: 1; display: flex; align-items: center; gap: 8px; }
#warmthIcon { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
#warmthTrack {
  flex: 1; height: 16px;
  background: rgba(10, 25, 50, .55);
  border: 1px solid rgba(170, 210, 255, .35);
  border-radius: 10px;
  overflow: hidden;
}
#warmthBar {
  height: 100%; width: 75%;
  border-radius: 10px;
  background: linear-gradient(90deg, #4facfe 0%, #7ee8fa 40%, #ffd166 70%, #ff6b6b 100%);
  transition: width .2s ease;
  box-shadow: 0 0 12px rgba(126, 232, 250, .5);
}
#stats {
  font-size: 14px; font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,.5);
  white-space: nowrap;
}
#stats .dot { opacity: .5; margin: 0 4px; }
#muteBtn {
  pointer-events: auto;
  border: 1px solid rgba(170, 210, 255, .4);
  background: rgba(10, 25, 50, .55);
  color: #fff; font-size: 15px;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer;
}
#muteBtn:active { transform: scale(.92); }

/* ---------- 寒潮横幅 ---------- */
#banner {
  position: absolute;
  top: 24%; left: 50%;
  transform: translateX(-50%);
  font-size: clamp(22px, 5.4vmin, 34px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 18px #ff4d4d, 0 3px 6px rgba(0,0,0,.6);
  background: rgba(120, 10, 20, .35);
  border: 2px solid rgba(255, 90, 90, .8);
  border-radius: 14px;
  padding: 10px 26px;
  white-space: nowrap;
  animation: bannerPulse .5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes bannerPulse {
  from { transform: translateX(-50%) scale(1); }
  to   { transform: translateX(-50%) scale(1.06); }
}

/* ---------- 面板 ---------- */
.panelWrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}
.panel {
  width: min(88vw, 420px);
  max-height: 92%;
  overflow-y: auto;
  background: linear-gradient(170deg, rgba(28, 52, 96, .92), rgba(13, 28, 58, .94));
  border: 1px solid rgba(150, 195, 255, .35);
  border-radius: 22px;
  padding: 26px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
}
h1 {
  font-size: clamp(26px, 6.5vmin, 36px);
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 4px 0 rgba(30, 60, 120, .8), 0 8px 24px rgba(80, 160, 255, .35);
}
h1 .hl { color: #7ee8fa; }
.subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: #9fc3f5;
  letter-spacing: 2px;
}
.story {
  margin: 16px 0 12px;
  font-size: 14px;
  line-height: 1.75;
  color: #d7e6ff;
}
.story .money { color: #ffd166; font-size: 16px; }
.story .hl2 { color: #7ee8fa; }
.howto {
  list-style: none;
  text-align: left;
  font-size: 13px;
  line-height: 2;
  color: #b9d2f2;
  background: rgba(10, 25, 55, .5);
  border: 1px solid rgba(120, 170, 240, .25);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.bigBtn {
  display: block; width: 100%;
  border: none;
  border-radius: 16px;
  padding: 15px 0;
  font-size: 19px; font-weight: 900;
  font-family: inherit;
  color: #08243f;
  background: linear-gradient(180deg, #9ff0ff, #4db8f0);
  box-shadow: 0 6px 0 #2a7fb8, 0 12px 24px rgba(60, 160, 255, .35);
  cursor: pointer;
  letter-spacing: 2px;
  transition: transform .08s ease, box-shadow .08s ease;
}
.bigBtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #2a7fb8; }
.bestLine { margin-top: 12px; font-size: 13px; color: #9fc3f5; }
.bestLine b { color: #ffd166; }

/* ---------- 结算 ---------- */
.overTitle {
  font-size: clamp(24px, 6vmin, 32px);
  font-weight: 900;
  text-shadow: 0 0 20px rgba(140, 220, 255, .6);
}
.overMeme { margin: 8px 0 14px; font-size: 13px; color: #9fc3f5; }
.statsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat {
  background: rgba(10, 25, 55, .6);
  border: 1px solid rgba(120, 170, 240, .25);
  border-radius: 12px;
  padding: 10px 2px;
}
.stat b { display: block; font-size: 20px; color: #7ee8fa; }
.stat span { font-size: 11px; color: #9fb9de; }
.titleBadge {
  background: rgba(255, 209, 102, .12);
  border: 1px solid rgba(255, 209, 102, .45);
  border-radius: 12px;
  padding: 10px;
  font-size: 15px;
  margin-bottom: 16px;
}
.titleBadge b { color: #ffd166; font-size: 17px; }
.titleBadge span { display: block; font-size: 12px; color: #c8b98a; margin-top: 3px; }
.btnRow { display: flex; flex-direction: column; gap: 10px; }
.midBtn {
  border: 1px solid rgba(150, 195, 255, .45);
  background: rgba(20, 40, 80, .6);
  color: #eaf3ff;
  border-radius: 14px;
  padding: 11px 0;
  font-size: 15px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.midBtn:active { transform: scale(.97); }
.copyTip { margin-top: 10px; font-size: 12px; color: #7ee8fa; }

@media (max-height: 620px) {
  .story { margin: 10px 0 8px; font-size: 13px; }
  .howto { line-height: 1.7; margin-bottom: 12px; }
  .panel { padding: 18px 18px 16px; }
}
