:root {
  /* 按钮/气泡的「临近色系」默认色，每次切换画面会被 happy.js 覆盖 */
  --accent: #7fb6d6;
  --accent-deep: #4f8fb8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  background-color: #1b2230; /* 兜底底色：图片未就绪时深色，绝不会露出粉色 */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  -webkit-background-size: cover;
  -webkit-tap-highlight-color: transparent;
}

/* ===== 双层 <img> 背景：交叉淡入，iOS / Android 兼容最稳 ===== */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #1b2230; /* 兜底 */
  overflow: hidden;
}
.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity .8s ease;
  will-change: opacity;
}
.bg-layer.show { opacity: 1; }

/* 轻蒙版：顶部/底部稍暗保证文字可读，中部通透 */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,14,22,.46) 0%, rgba(10,14,22,0) 26%, rgba(10,14,22,0) 58%, rgba(10,14,22,.50) 100%);
}

/* ===== 标题：背景最上方 ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 3;
  text-align: center;
  padding: max(18px, env(safe-area-inset-top)) 16px 10px;
}
.brand {
  display: inline-block;
  margin: 0;
  padding: 9px 22px;
  font-size: clamp(20px, 5.2vw, 27px);
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  border-radius: 999px;
  background: rgba(18, 22, 32, .26);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

/* ===== 底部中下浮动区：按钮 + 文字 ===== */
.dock {
  position: fixed;
  left: 0; right: 0;
  bottom: 16vh;
  bottom: calc(16vh + env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.happy-btn {
  position: relative;
  border: none;
  cursor: pointer;
  padding: 17px 58px;
  border-radius: 999px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 8px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .32);
  transition: transform .12s ease, box-shadow .25s ease, filter .25s ease, background .5s ease;
  -webkit-tap-highlight-color: transparent;
}
.happy-btn:hover { filter: brightness(1.06); }
.happy-btn:active { transform: translateY(2px) scale(.97); }
.happy-btn.pop { animation: pop .42s cubic-bezier(.22, 1.4, .5, 1); }
@keyframes pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.happy-btn-spark {
  margin-left: 4px;
  opacity: .9;
  font-size: 17px;
}

/* 鸡汤药丸：半透明深色背板 + 模糊，在任何亮背景上都清晰可读 */
.hint {
  margin: 0;
  padding: 9px 20px;
  max-width: 80vw;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 700;
  color: #fff;
  background: rgba(18, 22, 32, .42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  letter-spacing: .5px;
  transition: opacity .45s ease, transform .45s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.hint.swap { opacity: 0; transform: translateY(8px); }

@media (max-width: 380px) {
  .brand { font-size: 20px; padding: 8px 16px; letter-spacing: 2px; }
  .happy-btn { padding: 15px 48px; font-size: 21px; letter-spacing: 6px; }
  .hint { font-size: 14px; padding: 8px 16px; }
}
