/* ============================================================
   应用分发页 · 仿苹果风格样式（自适应 PC / 手机）
   ============================================================ */
:root {
  --blue: #0071e3;
  --blue-dark: #0077ed;
  --text: #1d1d1f;
  --gray: #86868b;
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --border: #e8e8ed;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
          "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-icon { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }

.nav-right { display: flex; align-items: center; gap: 14px; }
.ver-pill {
  font-size: 12px;
  color: var(--gray);
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 12px;
}
.nav-download {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border-radius: 980px;
  padding: 6px 18px;
  transition: background .2s;
}
.nav-download:hover { background: var(--blue-dark); }

/* ---------- 主视觉 ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 20px 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(0, 113, 227, .10), transparent 60%),
    radial-gradient(900px 420px at 80% 10%, rgba(94, 92, 230, .08), transparent 55%);
}

.hero-main { flex: 1; min-width: 0; text-align: center; }

.hero-icon-wrap { margin-bottom: 22px; }
.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 27%;
  object-fit: cover;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.hero-subtitle {
  margin-top: 10px;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--gray);
  font-weight: 500;
}

.hero-intro {
  margin-top: 14px;
  color: var(--gray);
  font-size: 1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-badges { margin-top: 14px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.badge {
  font-size: 12px;
  color: var(--gray);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
}

/* ---------- 下载区 ---------- */
.download-area { margin-top: 34px; }

.btn-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 34px;
  border-radius: 980px;
  font-size: 1.05rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }

.btn-ios { background: var(--blue); color: #fff; }
.btn-ios:hover { background: var(--blue-dark); box-shadow: 0 8px 20px rgba(0, 113, 227, .35); }
.btn-android { background: #1d1d1f; color: #fff; }
.btn-android:hover { background: #000; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }

.btn.primary {
  outline: 3px solid rgba(0, 113, 227, .25);
  outline-offset: 3px;
}
.btn-android.primary { outline-color: rgba(29, 29, 31, .25); }

.btn[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* 平台切换 */
.platform-switch {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.device-tip { font-size: 13px; color: var(--gray); }
.p-tabs { display: flex; gap: 8px; }
.p-tab {
  font-family: inherit;
  font-size: 13px;
  color: var(--gray);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
  transition: all .2s;
}
.p-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); }

.btn-note { margin-top: 14px; font-size: 13px; color: var(--gray); }
.btn-note.warn { color: #d97706; font-weight: 500; }

/* ---------- PC 二维码卡片 ---------- */
.qr-card {
  flex: 0 0 auto;
  width: 280px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .08);
  padding: 26px 24px 22px;
  text-align: center;
}
#qrCanvas {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  margin: 0 auto 14px;
  display: block;
}
.qr-title { font-size: 16px; font-weight: 600; }
.qr-sub { margin-top: 6px; font-size: 13px; color: var(--gray); }

/* ---------- 内容区块 ---------- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 8px;
}
.section-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 26px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .08); }
.feature-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #5e5ce6);
  margin-bottom: 14px;
}
.feature-title { font-size: 1.06rem; font-weight: 600; }
.feature-desc { margin-top: 6px; font-size: 14px; color: var(--gray); }

/* 更新日志 */
.changelog-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.changelog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.changelog-ver { font-weight: 700; color: var(--blue); }
.changelog-date { font-size: 13px; color: var(--gray); }
.changelog-list { list-style: none; }
.changelog-list li {
  position: relative;
  padding: 7px 0 7px 22px;
  font-size: 14px;
  color: #333;
}
.changelog-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 15px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* 公告 */
.notice {
  background: rgba(0, 113, 227, .07);
  border: 1px solid rgba(0, 113, 227, .2);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 14px;
  color: #333;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 56px;
  padding: 26px 20px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--gray);
}

/* ---------- 弹层（微信提示 / iOS 指引） ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.overlay.show { display: flex; animation: fadeIn .25s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.tip-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 24px;
  padding: 34px 30px 30px;
  text-align: center;
  animation: popIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 微信等内置浏览器提示：整体上移，箭头贴近右上角「···」 */
#browserTip {
  align-items: flex-start;
  justify-content: center;
  padding: 8px 20px 20px;
}
#browserTip .tip-card {
  position: relative;
  margin-top: 88px;
  padding-top: 26px;
}
#browserTip .tip-arrow {
  position: absolute;
  top: -54px;
  right: 4px;
  margin: 0;
}

.tip-arrow { position: relative; height: 64px; margin-bottom: 8px; }
.tip-arrow svg { animation: nudge 1.2s ease-in-out infinite; }
.tip-arrow span {
  position: absolute;
  right: 2px;
  top: -14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: rgba(0, 113, 227, .1);
  border-radius: 8px;
  padding: 3px 8px;
  white-space: nowrap;   /* 单行显示，不换行 */
}
@keyframes nudge {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -6px); }
}

.tip-title { font-size: 1.25rem; font-weight: 700; }
.tip-text { margin-top: 8px; font-size: 14px; color: var(--gray); }

.tip-steps {
  list-style: none;
  margin: 20px 0 4px;
  text-align: left;
}
.tip-steps li {
  position: relative;
  padding: 8px 0 8px 30px;
  font-size: 14px;
  color: #333;
  border-top: 1px solid var(--border);
}
.tip-steps li:first-child { border-top: 0; }
.tip-steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0; top: 9px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tip-steps { counter-reset: step; }

.tip-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); transform: none; }

/* iOS 描述文件：下载完成停留页（简洁安装指引） */
.done-overlay { background: rgba(255, 255, 255, .97); }
.done-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 26px;
  text-align: center;
  box-sizing: border-box;
}
.done-ico {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34c759, #1d9e45);
  color: #fff;
  font-size: 34px;
  line-height: 68px;
  box-shadow: 0 10px 24px rgba(52, 199, 89, .3);
}
.done-title { font-size: 15px; font-weight: 600; color: #86868b; letter-spacing: 1px; }
.done-ok { margin: 10px 0 26px; font-size: 26px; font-weight: 700; color: #1d1d1f; }
.done-hint { font-size: 14px; color: #86868b; margin-bottom: 14px; }
.done-path {
  display: block;
  margin: 8px 0;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(250, 173, 20, .16);
  color: #9a6700;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
  box-sizing: border-box;
}
.done-actions { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 响应式：手机 ---------- */
@media (max-width: 899px) {
  .hero { flex-direction: column; gap: 36px; padding-top: 44px; }
  /* 手机端显示小二维码，紧凑不占界面 */
  .qr-card {
    flex: none;
    width: auto;
    max-width: 230px;
    margin: 0 auto;
    padding: 14px 18px 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
  }
  #qrCanvas { width: 118px; height: 118px; margin-bottom: 8px; }
  .qr-title { font-size: 13px; }
  .qr-sub { display: none; }
  .hero-icon { width: 96px; height: 96px; }
  .btn { padding: 13px 26px; font-size: 1rem; flex: 1 1 auto; max-width: 280px; }
  .btn-row { width: 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding-top: 28px; }
  .ver-pill { display: none; }
}

@media (max-width: 480px) {
  .btn-row { flex-direction: column; align-items: center; }
  .tip-card { padding: 28px 22px 24px; }
}
