:root {
  --primary: #1e6fff;
  --primary-dark: #1557cc;
  --accent: #00c9a7;
  --text: #1a1a2e;
  --text-muted: #5a5a72;
  --bg: #f5f7fb;
  --white: #ffffff;
  --border: #e4e8f0;
  --shadow: 0 4px 24px rgba(30, 111, 255, 0.08);
  --radius: 12px;
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-link img { width: 44px; height: 44px; border-radius: 10px; }

.main-nav { display: flex; gap: 6px; list-style: none; }

.main-nav a {
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active { color: var(--primary); background: rgba(30,111,255,0.08); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: 0.3s;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1e6fff 0%, #00c9a7 100%);
  color: var(--white);
  padding: 60px 20px 80px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 16px;
  line-height: 1.35;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 680px;
  margin: 0 auto 28px;
}

.btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}

/* Sections */
.section { padding: 56px 0; }

.section-alt { background: var(--white); }

.section-title {
  font-size: 1.75rem;
  margin-bottom: 12px;
  color: var(--text);
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 720px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s;
}

.feature-card:hover { transform: translateY(-4px); }

.feature-card img { width: 100%; aspect-ratio: 9/16; object-fit: cover; object-position: top; max-height: 420px; }

.feature-card-body { padding: 20px; }

.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }

.feature-card p { color: var(--text-muted); font-size: 0.92rem; }

/* Content layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.article-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-content h1 { font-size: 1.8rem; margin-bottom: 20px; }

.article-content h2 {
  font-size: 1.35rem;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.article-content h3 { font-size: 1.1rem; margin: 24px 0 10px; color: var(--primary-dark); }

.article-content p { margin-bottom: 16px; color: var(--text); }

.article-content ul, .article-content ol { margin: 12px 0 16px 24px; }
.article-content li { margin-bottom: 8px; }

.article-content figure { margin: 28px 0; text-align: center; }

.article-content figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 280px;
  margin: 0 auto;
}

.article-content figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.img-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0;
}

.img-row figure { flex: 0 1 260px; }

.sidebar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}

.sidebar h3 { font-size: 1rem; margin-bottom: 14px; }

.sidebar ul { list-style: none; }

.sidebar li { margin-bottom: 8px; }

.sidebar a { font-size: 0.92rem; }

.toc-list a { color: var(--text-muted); }
.toc-list a:hover { color: var(--primary); }

/* Steps */
.steps { counter-reset: step; list-style: none; margin: 20px 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 56px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* FAQ */
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after { content: "+"; font-size: 1.2rem; color: var(--primary); }

.faq-item.open .faq-q::after { content: "−"; }

.faq-a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-a { padding: 0 20px 18px; max-height: 500px; }

/* CTA */
.cta-box {
  background: linear-gradient(135deg, #1e6fff, #00c9a7);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  margin: 40px 0;
}

.cta-box h2 { margin-bottom: 12px; }
.cta-box p { opacity: 0.9; margin-bottom: 24px; }

/* Footer */
.site-footer {
  background: #0f1629;
  color: rgba(255,255,255,0.75);
  padding: 48px 20px 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto 32px;
}

.footer-grid h4 { color: var(--white); margin-bottom: 14px; font-size: 1rem; }

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--white); }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-page h1 { font-size: 6rem; color: var(--primary); line-height: 1; }
.error-page h2 { margin: 16px 0; }
.error-page p { color: var(--text-muted); margin-bottom: 28px; }

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* Legal pages */
.legal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}

.legal-content h1 { font-size: 1.6rem; margin-bottom: 8px; }
.legal-content .updated { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 28px; }
.legal-content h2 { font-size: 1.15rem; margin: 28px 0 12px; }
.legal-content p, .legal-content li { color: var(--text); margin-bottom: 10px; }
.legal-content ul { margin-left: 24px; }

/* Responsive */
@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .main-nav.open { display: flex; }

  .hero { padding: 40px 20px 56px; }

  .article-content, .legal-content { padding: 24px 18px; }

  .feature-card img { max-height: 360px; }
}

@media (max-width: 480px) {
  .img-row figure { flex: 0 1 100%; }
  .article-content figure img { max-width: 100%; }
}
