/* MoonBuzz 下载页 —— 按 Figma「二维码下载」frame（402×874，node 1901-44378）实现
   参考色：ink #171a1f / 按钮 #343434 / 高亮 #1bebca、#00f4cd / 光晕 #43d0ff #c2edff #b4fffb
   参考排版：标题 26/36 PingFang SC 600，图标 78，按钮 161×44 r12 #343434，图标网格 338×206，字标 151×19 */

:root {
  --ink: #171a1f;
  --ink-soft: #343434;
  --ink-mute: #8b929c;
  --ink-mute-2: #a6adb5;
  --teal: #1bebca;
  --teal-deep: #00f4cd;
  --line: rgba(23, 26, 31, 0.08);
  --radius-tile: 10px;
  --radius-button: 12px;
  --shell: 402px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

/* hidden 属性必须压过本文件里的 display 规则（曾导致微信引导在普通浏览器里也显示） */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #fff;
  color: var(--ink);
  font-family:
    'PingFang SC', -apple-system, BlinkMacSystemFont, 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei',
    'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ---------- 画布与光晕 ---------- */

.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #fff;
  display: flex;
  justify-content: center;
}

.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Ellipse 15：底部最大的一层（#43d0ff → #61ffe6） */
.glow-a {
  width: 445px;
  height: 551px;
  left: 50%;
  top: 33vh;
  transform: translateX(-52%);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(67, 208, 255, 0.32) 0%,
    rgba(97, 255, 230, 0.16) 48%,
    rgba(97, 255, 230, 0) 72%
  );
  filter: blur(62px);
}

/* Ellipse 17：中段偏右（#c2edff → #b4fffb） */
.glow-b {
  width: 354px;
  height: 420px;
  left: 50%;
  top: 24vh;
  transform: translateX(-18%);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(194, 237, 255, 0.46) 0%,
    rgba(180, 255, 251, 0.2) 55%,
    rgba(180, 255, 251, 0) 74%
  );
  filter: blur(52px);
}

/* Ellipse 12 / 18：右侧小团 */
.glow-c {
  width: 239px;
  height: 357px;
  left: 50%;
  top: 42vh;
  transform: translateX(12%);
  background: radial-gradient(circle at 50% 50%, rgba(194, 237, 255, 0.45), rgba(194, 237, 255, 0) 70%);
  filter: blur(48px);
}

/* ---------- 内容列 ---------- */

.content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  padding: clamp(56px, 9.6vh, 104px) 20px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- 微信内引导 ---------- */

.wechat-guide {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0 0 clamp(16px, 3vh, 26px);
  position: relative;
}

.wechat-badge {
  flex: 0 0 auto;
  width: 49px;
  height: 49px;
  border-radius: 12px;
}

.wechat-text {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  color: var(--ink);
  /* 给右上角箭头留出空间，避免长文案（非微信内置浏览器）被箭头压住 */
  padding-right: 92px;
}

/* 箭头贴右边缘：指向内置浏览器右上角的「···」菜单（那个菜单在页面之外，只能指向屏幕右上角） */
.wechat-arrow {
  position: absolute;
  right: -8px;
  top: -40px;
  width: 85px;
  height: 89px;
  pointer-events: none;
}

/* ---------- hero ---------- */

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.headline {
  margin: 0;
  max-width: 240px;
  font-size: 26px;
  line-height: 1.29;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
  white-space: pre-line;
  background: linear-gradient(96deg, #000 0%, #000 74%, var(--teal-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .headline {
    color: var(--ink);
  }
}

/* 素材导出尺寸是 124×124（含图标外投影），可视图标本体 78，靠负 margin 把布局盒子收成 78 */
.app-icon {
  width: 124px;
  height: 124px;
  margin: calc(clamp(20px, 3.6vh, 30px) - 23px) 0 -23px;
  display: block;
}

/* ---------- 主按钮 ---------- */

.cta {
  margin-top: clamp(18px, 3.2vh, 28px);
  min-width: 161px;
  height: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--ink-soft);
  color: #fff;
  font-family: 'Noto Sans SC', 'PingFang SC', -apple-system, 'Microsoft YaHei', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  background: #262626;
}

.cta:active {
  transform: translateY(1px);
}

.cta:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.cta[disabled] {
  background: #c8cdd3;
  cursor: not-allowed;
  transform: none;
}

.cta-glyph {
  flex: 0 0 auto;
}

.cta-label {
  white-space: nowrap;
}

.cta-note {
  margin: 10px 0 0;
  min-height: 17px;
  font-size: 12.5px;
  line-height: 17px;
  color: var(--ink-mute);
  text-align: center;
}

/* ---------- 平台切换 ---------- */

.platforms {
  margin-top: clamp(12px, 2.6vh, 20px);
  display: flex;
  align-items: center;
  gap: 20px;
}

.platforms button {
  position: relative;
  appearance: none;
  border: 0;
  background: none;
  padding: 7px 2px 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-mute-2);
  cursor: pointer;
  transition: color 0.16s ease;
}

.platforms button:hover {
  color: var(--ink-mute);
}

.platforms button[aria-selected='true'] {
  color: var(--ink);
  font-weight: 600;
}

.platforms button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: var(--teal);
}

.platforms button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

.channels {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.channels:empty {
  display: none;
}

.channel {
  appearance: none;
  border: 0;
  background: none;
  padding: 2px 0;
  font-family: inherit;
  font-size: 12.5px;
  color: #5f6670;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid rgba(27, 235, 202, 0.55);
}

.channel:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.channel-note {
  font-size: 11.5px;
  color: var(--ink-mute-2);
}

.status {
  width: 100%;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 17px;
  color: var(--ink-mute-2);
  text-align: center;
}

/* ---------- 图标网格（设计稿里的虚化 home 屏背景） ---------- */

.icon-grid {
  width: 100%;
  max-width: 338px;
  height: auto;
  margin-top: clamp(24px, 6vh, 56px);
  display: block;
  user-select: none;
}

/* ---------- 页脚 ---------- */

.foot {
  width: 100%;
  margin-top: clamp(28px, 7vh, 62px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.wordmark {
  width: 151px;
  height: 19px;
  display: block;
}

.help {
  width: 100%;
  max-width: 300px;
  text-align: left;
}

.help summary {
  list-style: none;
  cursor: pointer;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-mute);
  padding: 4px 0;
}

.help summary::-webkit-details-marker {
  display: none;
}

.help summary::after {
  content: ' ›';
  font-size: 12px;
}

.help[open] summary::after {
  content: ' ⌄';
}

.help ul {
  margin: 10px 0 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: var(--radius-tile);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 var(--line);
}

.help li {
  position: relative;
  padding-left: 12px;
  font-size: 12px;
  line-height: 19px;
  color: var(--ink-mute);
}

.help li + li {
  margin-top: 6px;
}

.help li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

.support {
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
}

.legal {
  margin: 0;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
}

.legal a {
  color: #5f6670;
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 26, 31, 0.16);
}

.legal a:hover {
  color: var(--ink);
}

.legal a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.support a {
  color: #0f9d8b;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 157, 139, 0.35);
}

.foot-meta {
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-mute-2);
  text-align: center;
}

/* ---------- 其它 ---------- */

.noscript {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(94vw, 380px);
  padding: 14px 16px;
  border-radius: var(--radius-button);
  background: #fff8e6;
  border: 1px solid #f0d9a8;
  color: #7a5b12;
  font-size: 13px;
  line-height: 20px;
  z-index: 5;
}

@media (max-width: 360px) {
  .headline {
    font-size: 23px;
  }

  .cta {
    min-width: 150px;
    font-size: 17px;
  }

  .wechat-arrow {
    right: 0;
    top: -28px;
    width: 74px;
    height: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
