/* ========== 基础变量 ========== */
:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f4f7fb;
  --c-dark: #0f1b33;
  --c-dark-2: #17284a;
  --c-text: #1f2a3d;
  --c-muted: #64748b;
  --c-primary: #2563eb;
  --c-primary-hover: #1d4ed8;
  --c-border: #e2e8f0;
  --c-ok: #16a34a;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 27, 51, .12);
  --container: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-primary); text-decoration: none; }
img, svg { display: block; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* ========== 顶部导航 ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 27, 51, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 17px; }
.nav { display: none; gap: 28px; }
.nav a { color: rgba(255, 255, 255, .78); font-size: 15px; transition: color .2s; }
.nav a:hover { color: #fff; }

/* ========== 首屏 ========== */
.hero {
  background: radial-gradient(1200px 500px at 50% -10%, #23407a 0%, transparent 70%), linear-gradient(180deg, var(--c-dark) 0%, var(--c-dark-2) 100%);
  color: #fff;
  text-align: center;
  padding: 40px 0 44px;
}
.hero__title { font-size: 30px; font-weight: 700; letter-spacing: .5px; }
.hero__sub { margin-top: 8px; color: rgba(255, 255, 255, .72); font-size: 15px; }

/* 自动推荐 */
.recommend { margin: 28px auto 0; max-width: 420px; }
.recommend__tip { font-size: 14px; color: rgba(255, 255, 255, .7); margin-bottom: 12px; }
.recommend__tip strong { color: #fff; }
.recommend__meta { margin-top: 10px; font-size: 13px; color: rgba(255, 255, 255, .55); min-height: 1em; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn__icon { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .35); }
.btn--primary:hover { background: var(--c-primary-hover); }
.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--ghost:hover { background: rgba(37, 99, 235, .06); }
.btn--lg { width: 100%; height: 54px; font-size: 17px; border-radius: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn-row + .btn-row { margin-top: 12px; }

/* 平台入口：移动端 2 列 */
.platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 32px auto 0;
  max-width: 880px;
}
.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 10px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  transition: background .2s, border-color .2s, transform .2s;
}
.platform:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); transform: translateY(-2px); }
.platform.is-match { border-color: #60a5fa; background: rgba(96, 165, 250, .16); }
.platform__icon { width: 34px; height: 34px; }
.platform__name { font-size: 15px; font-weight: 600; }
.platform__meta { font-size: 12px; color: rgba(255, 255, 255, .55); min-height: 1.4em; }

/* 应用商店徽章：移动端 2 列 */
.stores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px auto 0;
  max-width: 880px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 12px;
  border-radius: 10px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  text-align: left;
  transition: border-color .2s, transform .2s;
}
.store:hover { border-color: rgba(255, 255, 255, .6); transform: translateY(-2px); }
.store.is-match { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96, 165, 250, .35); }
.store__icon { width: 26px; height: 26px; flex: none; }
.store__icon--huawei { color: #ef4444; }
.store__icon--android { color: #3ddc84; }
.store__text { display: flex; flex-direction: column; line-height: 1.15; font-size: 15px; font-weight: 600; }
.store__text small { font-size: 10px; font-weight: 400; opacity: .8; letter-spacing: .3px; }
.store--solid { min-width: 168px; }

/* 二维码 */
.qr {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 14px 20px 14px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  text-align: left;
}
.qr img { background: #fff; border-radius: 8px; padding: 6px; }
.qr p { margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, .65); max-width: 240px; }

/* ========== 平台介绍区块 ========== */
#sections { display: flex; flex-direction: column; }
.feature { padding: 48px 0; background: var(--c-bg); }
.feature--alt { background: var(--c-bg-alt); }
.feature__inner { display: flex; flex-direction: column; gap: 32px; }
.feature h2 { font-size: 24px; font-weight: 700; color: var(--c-dark); }
.feature__lead { margin-top: 12px; color: var(--c-muted); font-size: 15px; }
.feature__media { display: flex; justify-content: center; }

.checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.checklist svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--c-ok); }

.hint { margin-top: 14px; font-size: 13px; color: var(--c-muted); }

/* Linux 命令 */
.code {
  position: relative;
  margin-top: 20px;
  padding: 14px 72px 14px 14px;
  background: var(--c-dark);
  border-radius: 10px;
  color: #cbd5e1;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.code__copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.code__copy:hover { background: rgba(255, 255, 255, .22); }

/* 设备示意图 */
.mock { background: #1e293b; box-shadow: var(--shadow); overflow: hidden; }
.mock__bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #263449; }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; }
.mock__bar i:nth-child(2) { background: #f59e0b; }
.mock__bar i:nth-child(3) { background: #22c55e; }
.mock__url { margin-left: 10px; padding: 1px 12px; border-radius: 10px; background: #0f172a; color: #94a3b8; font-size: 11px; }
.mock__screen { width: 100%; height: 100%; }
.mock--desktop, .mock--browser { width: 100%; max-width: 520px; border-radius: 10px; }
.mock--desktop .mock__screen, .mock--browser .mock__screen { height: auto; aspect-ratio: 16 / 9; }
.mock--phone { width: 200px; height: 400px; border-radius: 30px; border: 8px solid #111827; }
.terminal { width: 100%; max-width: 520px; border-radius: 10px; overflow: hidden; background: #0b1426; box-shadow: var(--shadow); }
.terminal pre { margin: 0; padding: 18px; color: #e2e8f0; font: 13px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; }
.t-p { color: #60a5fa; }
.t-m { color: #94a3b8; }
.t-ok { color: #4ade80; }

/* ========== 页脚 ========== */
.footer { background: var(--c-dark); color: rgba(255, 255, 255, .6); padding: 32px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 13px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; }
.footer__links a { color: rgba(255, 255, 255, .8); }
.footer__disclaimer { line-height: 1.7; }
.footer__copy { margin-top: 12px; }

/* ========== 微信引导层 / 提示 ========== */
.wx-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 110px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  text-align: center;
  font-size: 17px;
  line-height: 1.9;
}
.wx-mask__arrow { position: absolute; top: 8px; right: 22px; font-size: 64px; line-height: 1; }
.wx-mask .btn { margin-top: 28px; color: #fff; border-color: #fff; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 110;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ========== 平板及以上 ========== */
@media (min-width: 640px) {
  .platforms { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .stores { grid-template-columns: repeat(4, 1fr); }
  .hero__title { font-size: 38px; }
}

/* ========== 桌面端 ========== */
@media (min-width: 960px) {
  .nav { display: flex; }
  .topbar__inner { height: 64px; }
  .hero { padding: 72px 0 64px; }
  .hero__title { font-size: 48px; }
  .hero__sub { font-size: 18px; margin-top: 12px; }
  .platform { padding: 26px 12px 20px; }
  .platform__icon { width: 42px; height: 42px; }
  .platform__name { font-size: 17px; }
  .feature { padding: 88px 0; }
  .feature__inner { flex-direction: row; align-items: center; gap: 64px; }
  .feature__text, .feature__media { flex: 1 1 0; min-width: 0; }
  .feature--alt .feature__inner { flex-direction: row-reverse; }
  .feature h2 { font-size: 34px; }
  .feature__lead { font-size: 17px; }
  .mock--phone { width: 240px; height: 480px; }
}

/* 移动端：按钮撑满，便于点击 */
@media (max-width: 639px) {
  .btn-row .btn { flex: 1 1 100%; }
  .btn-row .store { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .feature__media { display: none; }
  .recommend + .platforms { margin-top: 24px; }
}

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