/* 错题本官网 · 与 App 同一套视觉：橙主色 / 白卡片 / 大圆角 */
:root {
  --primary: #E8541E;
  --primary-bg: #FFF1EB;
  --primary-soft: #F9BFA4;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --sub: #5E6068;
  --weak: #9A9CA3;
  --line: #EFEFF2;
}

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

body {
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ── 首屏 ── */
.hero {
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg) 100%);
  padding: 88px 20px 72px;
  text-align: center;
}
.hero-badge {
  width: 84px; height: 84px;
  margin: 0 auto 20px;
  border-radius: 26px;
  background: var(--primary);
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  line-height: 84px;
  box-shadow: 0 18px 36px rgba(232, 84, 30, .24);
}
.hero h1 { font-size: 40px; letter-spacing: 2px; }
.tagline {
  font-size: 19px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 10px;
}
.sub { color: var(--sub); font-size: 15px; margin-top: 14px; }
.cta-row { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-note { margin-top: 16px; font-size: 13px; color: var(--weak); }

/* ── 按钮 ── */
.btn {
  display: inline-block;
  padding: 13px 34px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(232, 84, 30, .3);
}
.btn.ghost {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn.big { font-size: 18px; padding: 15px 44px; }

/* ── 区块 ── */
.section { max-width: 1020px; margin: 0 auto; padding: 64px 20px; }
.section.alt { max-width: none; background: #fff; }
.section.alt > * { max-width: 1020px; margin-left: auto; margin-right: auto; }
.section-title {
  font-size: 26px;
  text-align: center;
  margin-bottom: 40px;
}

/* ── 流程 ── */
.flow { display: flex; align-items: stretch; justify-content: center; gap: 12px; flex-wrap: wrap; }
.flow-step {
  flex: 1 1 190px;
  max-width: 230px;
  background: var(--card);
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.flow-icon { font-size: 34px; }
.flow-step h3 { font-size: 17px; margin: 10px 0 6px; }
.flow-step p { font-size: 13.5px; color: var(--sub); }
.flow-arrow {
  align-self: center;
  color: var(--primary-soft);
  font-size: 24px;
  font-weight: 700;
}
@media (max-width: 760px) { .flow-arrow { display: none; } }

/* ── 亮点 ── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--bg);
  border-radius: 18px;
  padding: 24px 22px;
}
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--sub); }

/* ── 下载 ── */
.download-card {
  background: var(--card);
  border-radius: 22px;
  padding: 48px 28px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.dl-soon { font-size: 17px; font-weight: 600; }
.dl-tip { font-size: 13.5px; color: var(--weak); margin-top: 10px; }
.download-card .btn { margin-top: 22px; }

/* ── 下载区三平台 ── */
.dl-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.dl-item {
  background: var(--bg);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: left;
}
.dl-item h3 { font-size: 16px; margin-bottom: 8px; }
.dl-item p { font-size: 14px; color: var(--sub); }
.dl-item .dl-tip { margin-top: 10px; font-size: 13px; }

/* ── 页脚 ── */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 20px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--weak);
}
footer a { color: var(--sub); }
.icp { margin-top: 6px; }
.icp a { color: var(--weak); }

/* ── 隐私政策页 ── */
.policy { max-width: 760px; margin: 0 auto; padding: 40px 22px 70px; }
.policy h1 { font-size: 26px; margin-bottom: 6px; }
.policy .updated { color: var(--weak); font-size: 13px; margin-bottom: 26px; }
.policy h2 { font-size: 18px; margin: 30px 0 10px; }
.policy h3 { font-size: 15px; margin: 18px 0 8px; }
.policy p { font-size: 14.5px; color: var(--sub); margin-bottom: 10px; }
.policy .back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}
.policy .note {
  font-size: 12.5px;
  color: var(--weak);
  background: var(--primary-bg);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 24px;
}

/* ── 全局平滑锚点滚动 ── */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .section { opacity: 1 !important; transform: none !important; }
}

/* ── 顶部导航栏 ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .5px;
}
.nav-logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(232, 84, 30, .22);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 18px;
  color: var(--sub);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-bg); }
.nav-toggle {
  display: none;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}
.nav-toggle:hover { background: var(--primary-bg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 16px;
    box-shadow: 0 14px 26px rgba(0, 0, 0, .07);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 15px; border-radius: 14px; }
}

/* ── 滚动淡入上移动画 ── */
.js .section {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .section.visible { opacity: 1; transform: none; }

/* ── 常见问题 FAQ ── */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: background .15s ease;
}
.faq-item summary:hover { background: var(--primary-bg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a {
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--sub);
}

/* ── 联系开发者 ── */
.contact-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 22px;
  padding: 44px 28px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
}
.contact-card p { color: var(--sub); font-size: 14.5px; margin-bottom: 18px; }
.contact-card .btn { margin-top: 4px; }
.contact-note {
  font-size: 12.5px;
  color: var(--weak);
  margin-top: 18px;
  margin-bottom: 0 !important;
}

/* ── 返回顶部 ── */
.back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(232, 84, 30, .3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  z-index: 90;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { box-shadow: 0 10px 24px rgba(232, 84, 30, .42); }

/* ── 404 页 ── */
.notfound {
  max-width: 560px;
  margin: 0 auto;
  padding: 90px 20px 70px;
  text-align: center;
}
.notfound .code {
  font-size: 84px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--primary);
  letter-spacing: 2px;
}
.notfound h1 { font-size: 24px; margin-top: 8px; }
.notfound p { color: var(--sub); font-size: 15px; margin: 14px 0 28px; }

/* ── 375px 手机宽度细节 ── */
@media (max-width: 400px) {
  .btn { padding: 12px 24px; font-size: 15px; }
  .btn.big { font-size: 16px; padding: 14px 30px; }
  .hero h1 { font-size: 34px; }
  .section { padding: 52px 16px; }
  .nav-inner { padding: 0 14px; }
  .back-top { right: 14px; bottom: 18px; }
}

/* ── 功能全景 ── */
.section-desc {
  text-align: center;
  color: var(--sub);
  font-size: 14px;
  margin: -24px 0 30px;
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.cap-item {
  background: var(--card);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
}
.cap-item h3 { font-size: 16px; margin-bottom: 8px; }
.cap-item p { font-size: 14px; color: var(--sub); }

/* ── 应用信息表格 ── */
.app-table-wrap {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
  overflow: hidden;
}
.app-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.app-table th,
.app-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.app-table tr:last-child th,
.app-table tr:last-child td { border-bottom: 0; }
.app-table th {
  width: 32%;
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}
.app-table td { color: var(--sub); }
.app-table td a { color: var(--primary); text-decoration: none; }
.app-table td a:hover { text-decoration: underline; }
.app-table code {
  background: var(--primary-bg);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 13px;
  color: var(--primary);
}
@media (max-width: 560px) {
  .app-table th { white-space: normal; width: 36%; }
  .app-table th, .app-table td { padding: 12px 14px; font-size: 13.5px; }
}

/* ── 更新动态 / 上架状态 ── */
.status-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 22px;
  padding: 34px 30px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
}
.status-head { font-size: 15.5px; margin-bottom: 16px; }
.status-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.status-list li {
  font-size: 14.5px;
  color: var(--sub);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.status-list code {
  background: var(--primary-bg);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 13px;
  color: var(--primary);
}
.status-done { color: #2E9E5B; font-weight: 700; }
.status-doing { color: var(--primary); }
.status-todo { color: var(--weak); }
.status-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--weak);
}

/* ═══════════════ 动画与动效（仅 transform/opacity，性能友好） ═══════════════ */

/* ── 首屏 hero 入场动画（badge→标题→副标题→按钮→提示 按顺序渐入/上浮/弹入，总时长约 1s） ── */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; }

.js .hero-badge,
.js .hero h1,
.js .tagline,
.js .sub,
.js .cta-row,
.js .cta-note { opacity: 0; }

.js .hero-badge { animation: heroPop .5s cubic-bezier(.2, .9, .3, 1.35) .05s both; }
.js .hero h1     { animation: heroUp .5s ease-out .13s both; }
.js .tagline     { animation: heroUp .5s ease-out .21s both; }
.js .sub         { animation: heroUp .5s ease-out .29s both; }
.js .cta-row     { animation: heroUp .5s ease-out .37s both; }
.js .cta-note    { animation: heroFade .5s ease-out .5s both; }

@keyframes heroPop {
  from { opacity: 0; transform: scale(.6) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes heroUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── hero 背景柔和浮动光斑（radial-gradient + transform/opacity，无 blur 动画） ── */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  width: 420px; height: 420px;
  top: -130px; left: -90px;
  background: radial-gradient(circle, rgba(232, 84, 30, .14) 0%, transparent 70%);
  animation: glowFloat 9s ease-in-out infinite alternate;
}
.hero::after {
  width: 360px; height: 360px;
  bottom: -120px; right: -70px;
  background: radial-gradient(circle, rgba(249, 191, 164, .22) 0%, transparent 70%);
  animation: glowFloat 11s ease-in-out infinite alternate-reverse;
}
@keyframes glowFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(28px, 24px) scale(1.08); }
}

/* ── 按钮：主按钮光晕扫过（伪元素 + transform）、按压缩放、ghost hover 微变 ── */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: translateX(0) skewX(-18deg);
  transition: transform .55s ease;
  pointer-events: none;
}
.btn.primary:hover::before { transform: translateX(340%) skewX(-18deg); }
.btn.primary:active { transform: translateY(0) scale(.96); }
.btn.ghost:hover { background: var(--primary-bg); }

/* ── 卡片交互动效：功能全景 / 亮点 / 下载卡片 hover 上浮 + 阴影加深 + 标题图标摆动 ── */
.feature, .cap-item, .dl-item { transition: transform .22s ease, box-shadow .22s ease; }
.feature:hover, .cap-item:hover, .dl-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .09);
}
.feature:hover h3, .cap-item:hover h3 { animation: emojiWiggle .45s ease; }
.dl-item:hover h3 { color: var(--primary); }
@keyframes emojiWiggle {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.14) rotate(-3deg); }
  60%  { transform: scale(1.08) rotate(2deg); }
  100% { transform: scale(1); }
}

/* ── 流程卡片 hover：上浮 + 边框高亮（box-shadow spread 模拟）+ 图标缩放 ── */
.flow-step { transition: transform .22s ease, box-shadow .22s ease; }
.flow-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1.5px var(--primary-soft), 0 14px 26px rgba(0, 0, 0, .08);
}
.flow-icon { transition: transform .22s ease; }
.flow-step:hover .flow-icon { transform: scale(1.14); }

/* ── 流程箭头左右呼吸 ── */
.flow-arrow { animation: arrowFloat 2.2s ease-in-out infinite; }
@keyframes arrowFloat {
  0%, 100% { transform: translateX(0); opacity: .85; }
  50%      { transform: translateX(7px); opacity: 1; }
}

/* ── 滚动动效：section 标题渐变下划线随可见状态展开 ── */
.section-title { position: relative; }
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 72px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .6s cubic-bezier(.22, .8, .3, 1);
}
.js .section.visible .section-title::after { transform: translateX(-50%) scaleX(1); }

/* ── 导航栏滚动后阴影 / 毛玻璃增强 ── */
.navbar { transition: box-shadow .25s ease, background .25s ease; }
.navbar.scrolled {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .07);
  background: rgba(255, 255, 255, .96);
}

/* ── 返回顶部 hover 微浮 ── */
.back-top.show:hover { transform: translateY(-2px); }

/* ── 移动端 ≤760px：关闭装饰动画，保证流畅 ── */
@media (max-width: 760px) {
  .hero::before, .hero::after { display: none; }
  .flow-arrow { animation: none; }
  .section-title::after { display: none; }
}

/* ── 动效降级：prefers-reduced-motion 全部关闭动画 ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .section { opacity: 1 !important; transform: none !important; }
  .js .hero-badge, .js .hero h1, .js .tagline, .js .sub, .js .cta-row, .js .cta-note {
    opacity: 1;
    animation: none !important;
  }
  .hero::before, .hero::after { display: none; }
  .btn.primary::before { display: none; }
  .btn:hover, .btn:active { transform: none; }
  .btn.ghost:hover { background: #fff; }
  .feature:hover, .cap-item:hover, .dl-item:hover, .flow-step:hover { transform: none; box-shadow: none; }
  .flow-icon, .flow-step:hover .flow-icon { transform: none; }
  .feature:hover h3, .cap-item:hover h3 { animation: none; }
  .dl-item:hover h3 { color: inherit; }
  .flow-arrow { animation: none; }
  .section-title::after { transform: translateX(-50%) scaleX(1); transition: none; }
  .navbar.scrolled { box-shadow: none; }
  .back-top.show:hover { transform: none; }
}
