:root {
  --bg: #0b0b0d;
  --bg-2: #141418;
  --bg-3: #1c1c22;
  --text: #f2f2f2;
  --muted: #a8a8b3;
  --line: #2a2a32;
  --accent: #3ddc84;
  --accent-2: #e11d48;
  --warn: #f59e0b;
  --radius: 12px;
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.25rem; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin: 1.5rem 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 1.2rem 0 0.6rem; }
p { margin-bottom: 0.9rem; color: rgba(242, 242, 242, 0.92); }

.container { width: min(100% - 2rem, var(--max)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}
.nav a:hover, .nav a.active { color: var(--accent); text-decoration: none; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

/* Hero */
.hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(61, 220, 132, 0.12), transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(225, 29, 72, 0.1), transparent 45%),
    linear-gradient(180deg, #101014 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}
.hero-tag {
  display: inline-block;
  color: var(--accent);
  background: rgba(61, 220, 132, 0.12);
  border: 1px solid rgba(61, 220, 132, 0.35);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}
.hero p.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 36rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #3ddc84, #22c55e);
  color: #04140a !important;
}
.btn-secondary {
  background: var(--bg-3);
  color: var(--text) !important;
  border-color: var(--line);
}
.btn-danger {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff !important;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.hero-visual {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.hero-visual img {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 14px;
}

/* Sections */
.section { padding: 2.5rem 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head {
  margin-bottom: 1.25rem;
}
.section-head p {
  color: var(--muted);
  max-width: 48rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0.4rem; font-size: 0.95rem; color: var(--muted); }
.card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #000;
}
.feature-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}
.feature-row.reverse { grid-template-columns: 1.1fr 0.9fr; }
.feature-row.reverse .feature-media { order: 2; }
.feature-media {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem;
}
.feature-media img {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 12px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}
.feature-text h3 { color: var(--accent); }
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
}
.badge {
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.28);
  color: #b7f7d1;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
}
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.steps li {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 3.2rem;
  position: relative;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: #04140a;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}
.toc {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1rem 0 1.5rem;
}
.toc h2 { margin-top: 0; font-size: 1.1rem; }
.toc ol { margin: 0.4rem 0 0; }
.toc a { color: #d1fae5; }
.prose { max-width: 48rem; }
.prose h2 { padding-top: 0.5rem; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: 0; }
.faq details {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.7rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}
.faq details[open] summary { color: var(--accent); margin-bottom: 0.5rem; }
.note {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.links-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.8rem;
}
.page-hero {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #121218, var(--bg));
}
.page-content { padding: 2rem 0 3rem; }
.page-content .prose { max-width: 52rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #08080a;
  padding: 2rem 0 1.5rem;
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.site-footer h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.site-footer p, .site-footer a { color: var(--muted); font-size: 0.92rem; }
.site-footer a:hover { color: var(--accent); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.copyright {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: #777;
  font-size: 0.85rem;
  text-align: center;
}

/* Error pages */
.error-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}
.error-wrap .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  color: var(--accent-2);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-wrap h1 { margin-bottom: 0.6rem; }

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .feature-row,
  .feature-row.reverse,
  .grid-2,
  .grid-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .feature-row.reverse .feature-media { order: 0; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 2rem));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: rgba(20, 20, 24, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 120;
  }
  .nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
  }
  .nav a:hover, .nav a.active {
    background: rgba(61, 220, 132, 0.1);
  }
  .nav.open { display: flex; }
  .header-inner { flex-wrap: nowrap; }
  .hero { padding-top: 1.5rem; }
  .hero-visual { max-width: 280px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  body { font-size: 15px; }
  .card img, .feature-media img { max-height: 420px; }
}
