/* ============================================================
   青桔错题本 · 统一视觉规范
   ============================================================ */
:root {
  /* 品牌绿 */
  --brand: #0d9466;
  --brand-strong: #047857;
  --brand-deep: #064e3b;
  --brand-soft: #e6f5ef;
  --brand-faint: #f1f9f5;

  /* 墨色 */
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #98a2b3;

  /* 表面与背景 */
  --bg: #fbfdfc;
  --surface: #ffffff;
  --line: #e7ece8;

  /* 几何 */
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 10px 30px -12px rgba(4, 120, 87, .22);
  --shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, .28);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .3px;
}
.brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  transition: color .15s ease;
}
.nav a:hover { color: var(--brand); }

/* ---------- 页面容器 ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 72px 24px 64px;
  background:
    radial-gradient(900px 420px at 50% -8%, var(--brand-soft) 0%, rgba(230, 245, 239, 0) 60%),
    var(--bg);
}
.hero-icon {
  width: 108px;
  height: 108px;
  margin: 0 auto 26px;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}
.hero h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: 1px;
  font-weight: 800;
}
.hero .slogan {
  margin: 16px 0 0;
  font-size: 21px;
  color: var(--brand-strong);
  font-weight: 600;
}
.hero .sub {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-3);
}
.hero .meta {
  margin: 26px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .3px;
}

/* ---------- 下载区 ---------- */
.download {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 34px;
}

/* App Store 徽章 */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 11px 22px 11px 20px;
  background: #0b0b0f;
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.appstore-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.appstore-badge .badge-logo { width: 26px; height: 26px; flex: none; }
.appstore-badge .badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.appstore-badge .badge-top { font-size: 11px; font-weight: 500; opacity: .82; }
.appstore-badge .badge-bottom { font-size: 18px; font-weight: 700; letter-spacing: .2px; }

/* PC 悬停二维码 */
.qr-wrap { position: relative; display: inline-block; }
.qr-pop {
  position: absolute;
  top: 50%;
  left: calc(100% + 24px);
  transform: translateY(-50%) translateX(8px);
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 9999;
}
.qr-wrap:hover .qr-pop,
.qr-wrap:focus-within .qr-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}
.qr-pop::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.qr-pop img {
  display: block;
  width: 210px;
  height: 210px;
  max-width: none;
  border-radius: 6px;
}
.qr-pop .qr-cap {
  margin: 9px 0 0;
  font-size: 11px;
  color: var(--ink-2);
  text-align: center;
}

/* 响应式下载：手机显示直链，PC 显示二维码 */
.download-direct { display: none; }
.download-desktop { display: inline-block; }
@media (max-width: 768px) {
  .download-direct { display: inline-flex; }
  .download-desktop { display: none; }
}

/* ---------- 内容区块 ---------- */
.section { padding: 64px 0 8px; }
.section h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
  text-align: center;
}
.section .lead {
  margin: 0 auto 42px;
  max-width: 520px;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
}

/* 功能卡片 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .feature-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 22px;
  margin-bottom: 16px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; color: var(--brand-deep); }
.feature p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* 使用步骤 */
.steps { max-width: 640px; margin: 0 auto; }
.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 24px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.step .num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step .step-txt { font-size: 15px; color: var(--ink); padding-top: 3px; }
.step .step-txt b { color: var(--brand-deep); }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 24px 40px;
  text-align: center;
}
.footer .footer-links { margin-bottom: 14px; }
.footer .footer-links a {
  margin: 0 12px;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
}
.footer .footer-links a:hover { color: var(--brand); }
.footer .footer-copy { font-size: 13px; color: var(--ink-3); line-height: 1.9; }
.footer .footer-copy a { color: var(--ink-3); }
.footer .footer-copy a:hover { color: var(--brand); }

/* ---------- 法务/支持页面 ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 48px 24px 32px; }
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 40px 44px;
  box-shadow: var(--shadow-sm);
}
.doc h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: .5px; }
.doc .doc-meta { margin: 0 0 28px; font-size: 13px; color: var(--ink-3); }
.doc h2 {
  margin: 30px 0 10px;
  font-size: 17px;
  color: var(--brand-deep);
  font-weight: 700;
}
.doc h2:first-of-type { margin-top: 0; }
.doc p { margin: 8px 0; font-size: 15px; color: var(--ink-2); }
.doc ul { margin: 8px 0; padding-left: 20px; }
.doc li { font-size: 15px; color: var(--ink-2); margin: 6px 0; }
.doc strong { color: var(--ink); }

/* ---------- 通用小屏适配 ---------- */
@media (max-width: 640px) {
  .hero { padding: 54px 20px 48px; }
  .hero h1 { font-size: 32px; }
  .hero .slogan { font-size: 18px; }
  .hero-icon { width: 92px; height: 92px; border-radius: 22px; }
  .nav { gap: 14px; }
  .section { padding: 48px 0 4px; }
  .doc-card { padding: 28px 22px 32px; }
}
