:root {
  --bg: #f7f7f7;
  --bg-alt: #ededed;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-2: #666666;
  --border: #e2e2e2;
  --accent: #07c160;
  --accent-dark: #06ad56;
  --accent-text: #ffffff;
  --header-bg: rgba(247, 247, 247, 0.9);
  --code-bg: #f0f0f0;
  --shadow: none;
}

[data-theme="dark"] {
  --bg: #141414;
  --bg-alt: #1c1c1c;
  --card: #1e1e1e;
  --text: #f2f2f2;
  --text-2: #9a9a9a;
  --border: #333333;
  --accent: #07c160;
  --accent-dark: #0ab968;
  --accent-text: #ffffff;
  --header-bg: rgba(20, 20, 20, 0.9);
  --code-bg: #2a2a2a;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 760px;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--text);
  font-size: 15px;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}

.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: inline;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* ===== Hero ===== */
.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero h1 {
  font-size: 56px;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: contain;
  margin-bottom: 20px;
}

.hero-lead {
  max-width: 620px;
  margin: 20px auto 0;
  color: var(--text-2);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 13px;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--card);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== 通用区块 ===== */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 28px;
  text-align: center;
}

.section-desc {
  margin-top: 10px;
  text-align: center;
  color: var(--text-2);
}

/* ===== 功能卡片 ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: rgba(7, 193, 96, 0.12);
  color: var(--accent);
  font-size: 20px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-2);
  font-size: 14px;
}

/* ===== 界面预览 ===== */
.preview-toolbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 30px;
}

.preview-tab {
  padding: 8px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.preview-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.preview-item {
  margin: 0;
  text-align: center;
}

.preview-item img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.preview-item figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-2);
}

/* ===== 下载 ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.download-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.download-card h3 {
  font-size: 18px;
}

.download-card p {
  color: var(--text-2);
  font-size: 14px;
}

.download-card code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  word-break: break-all;
}

.download-note {
  margin-top: 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
}

/* ===== FAQ ===== */
.faq-list {
  margin-top: 36px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 12px;
}

.faq-item summary {
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.faq-item p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14px;
}

/* ===== 关于 / 页脚 ===== */
.about-text {
  margin-top: 20px;
  text-align: center;
  color: var(--text-2);
}

.about-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
}

/* ===== 滚动显现 ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== 移动端 ===== */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 64px 0 48px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .feature-grid,
  .download-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 8px 20px;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .site-nav .theme-toggle {
    margin: 12px 0;
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
