/* ============================================================
   骑行通知朗读 · 官网样式
   浅/深色自适应（跟随系统，右上角按钮可手动覆盖）
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --font: "Noto Sans SC", system-ui, -apple-system, "PingFang SC",
          "Microsoft YaHei", sans-serif;

  /* 浅色（日间：暖米 + 赤陶） */
  --bg:        #F0E8DE;
  --bg-alt:    #EAE0D4;
  --card:      #EAE0D4;
  --text:      #4A4238;
  --text-sub:  #8B7F6E;
  --accent:    #C4785A;
  --accent-ink:#F5EDE4;
  --line:      #D8CCBC;
  --radius:    16px;
  --wrap:      1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* 深色（夜间：深紫 + 淡紫） */
    --bg:        #1E1A28;
    --bg-alt:    #272233;
    --card:      #2C2739;
    --text:      #EDE5F0;
    --text-sub:  #A898B8;
    --accent:    #C8A8D8;
    --accent-ink:#2A2530;
    --line:      #443C55;
  }
}

/* 手动覆盖 */
[data-theme="light"] {
  --bg:        #F0E8DE;
  --bg-alt:    #EAE0D4;
  --card:      #EAE0D4;
  --text:      #4A4238;
  --text-sub:  #8B7F6E;
  --accent:    #C4785A;
  --accent-ink:#F5EDE4;
  --line:      #D8CCBC;
}
[data-theme="dark"] {
  --bg:        #1E1A28;
  --bg-alt:    #272233;
  --card:      #2C2739;
  --text:      #EDE5F0;
  --text-sub:  #A898B8;
  --accent:    #C8A8D8;
  --accent-ink:#2A2530;
  --line:      #443C55;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; letter-spacing: 1px;
}
.brand-icon { width: 26px; height: 26px; color: var(--accent); }
.nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.nav a { color: var(--text-sub); }
.nav a:hover { color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--line); background: none;
  color: var(--text-sub); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 15px;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 640px) {
  .nav { display: none; } /* 移动端只留品牌 + 主题切换，页面短，直接下滑 */
}

/* ---------- Hero（整屏首页） ---------- */
.hero {
  min-height: 100vh;      /* 回退 */
  min-height: 100dvh;     /* 移动端动态视口 */
  display: flex; align-items: center; justify-content: center;
  padding: 72px 0 56px; text-align: center;
}
.hero-tag {
  display: inline-block; font-size: 12px; letter-spacing: 3px;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 4px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.35; letter-spacing: 2px; font-weight: 700;
}
.hero-sub {
  margin: 18px auto 0; max-width: 520px;
  color: var(--text-sub); font-size: clamp(14px, 3.4vw, 17px);
}
.hero-actions {
  margin-top: 30px; display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 12px;
  font-size: 15px; letter-spacing: 1px;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { border: 1.5px solid var(--accent); color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--accent-ink); }
.hero-note { margin-top: 16px; font-size: 12px; color: var(--text-sub); }
.hero .wrap { width: 100%; }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  text-align: center; font-size: clamp(21px, 4.5vw, 28px);
  letter-spacing: 3px; margin-bottom: 34px;
}
.section-title::after {
  content: ""; display: block; width: 42px; height: 3px;
  background: var(--accent); margin: 12px auto 0; border-radius: 2px;
}

/* ---------- 功能卡片 ---------- */
.cards {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px)  { .cards { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 24px 22px; border: 1px solid var(--line);
}
.card-icon {
  width: 40px; height: 40px; color: var(--accent); margin-bottom: 12px;
}
.card-icon svg { width: 100%; height: 100%; }
.card h3 { font-size: 17px; letter-spacing: 1px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-sub); }

/* ---------- 三步 ---------- */
.steps { list-style: none; max-width: 560px; margin: 0 auto; }
.steps li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: none; }
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; margin-top: 3px;
}
.steps h3 { font-size: 16px; margin-bottom: 2px; }
.steps p { font-size: 14px; color: var(--text-sub); }

/* ---------- 下载 ---------- */
.download-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr; max-width: 640px; margin: 0 auto;
}
@media (min-width: 640px) { .download-grid { grid-template-columns: 1fr 1fr; } }
.download-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.download-card:hover { border-color: var(--accent); }
.download-card h3 { font-size: 17px; letter-spacing: 1px; color: var(--accent); }
.download-card p { font-size: 13px; color: var(--text-sub); margin-top: 4px; }

.fine-print {
  max-width: 640px; margin: 22px auto 0;
  font-size: 12px; color: var(--text-sub); text-align: center;
}

/* ---------- 更新日志 ---------- */
.changelog { max-width: 640px; margin: 0 auto; }
.changelog details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); margin-bottom: 12px; overflow: hidden;
}
.changelog summary {
  cursor: pointer; padding: 16px 20px; list-style: none;
  display: flex; align-items: center; gap: 14px; font-weight: 700;
}
.changelog summary::-webkit-details-marker { display: none; }
.changelog summary::after { content: "＋"; margin-left: auto; color: var(--text-sub); }
.changelog details[open] summary::after { content: "－"; }
.ver { color: var(--accent); letter-spacing: 1px; }
.date { font-size: 12px; color: var(--text-sub); font-weight: 400; }
.changelog ul {
  margin: 0 20px 16px 22px; padding-left: 4px;
}
.changelog li {
  font-size: 14px; color: var(--text-sub); margin: 4px 0;
}

/* ---------- FAQ ---------- */
.faq { max-width: 640px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 16px 20px; list-style: none;
  font-weight: 700; font-size: 15px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: var(--text-sub); }
.faq details[open] summary::after { content: "－"; }
.faq-body { padding: 0 20px 16px; font-size: 14px; color: var(--text-sub); }
.faq-body p { margin: 4px 0; }
.faq-body b { color: var(--text); }

/* ---------- 动效（克制的微动画） ---------- */
.card, .download-card, .btn, .nav a, .footer-nav a,
.theme-toggle, .changelog details, .faq details,
body, .site-header, .section-alt {
  transition: background-color .25s ease, border-color .25s ease,
              color .25s ease, opacity .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.download-card:hover { transform: translateY(-2px); }
.card:hover { transform: translateY(-2px); }
.btn:active, .download-card:active { transform: translateY(0); }
.changelog details[open] summary, .faq details[open] summary { color: var(--accent); }

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

/* ---------- 支持 ---------- */
.support { text-align: center; }
.support-text { color: var(--text-sub); font-size: 15px; }
.support-qr { margin: 26px auto 10px; width: 240px; }
.qr-img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.qr-caption { margin-top: 10px; font-size: 12px; color: var(--text-sub); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 40px; text-align: center;
}
.footer-slogan { font-size: 12px; letter-spacing: 2px; color: var(--text-sub); }
.footer-nav {
  margin: 16px 0; display: flex; gap: 22px; justify-content: center;
  font-size: 13px;
}
.footer-nav a { color: var(--text-sub); }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--text-sub); }
