/* ========== 设计变量 ========== */
:root {
  --bg-deep: #050508;
  --bg-page: #08080d;
  --bg-card: #0e0e16;
  --bg-surface: #14141f;
  --border-subtle: #1c1c2a;
  --border-card: rgba(34, 204, 127, .12);

  --accent-green: #22cc7f;
  --accent-green-light: #52ffc6;
  --accent-warm: #ffbe6b;
  --accent-warm-deep: #f59e40;

  --text-primary: #eaeaf2;
  --text-secondary: #9898a6;
  --text-muted: #5e5e6e;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --shadow-glow: 0 0 40px rgba(34, 204, 127, .15);
  --shadow-card: 0 2px 20px rgba(0, 0, 0, .35);

  --nav-h: 64px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ========== Typography ========== */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
p { max-width: 68ch; }
.lead { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--text-secondary); }

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: .5em;
  position: relative;
}
.section-desc {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 64ch;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; }
section:first-of-type { padding-top: calc(var(--nav-h) + 48px); }

/* Gradient text helper */
.gradient-text {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-md);
  font-weight: 600; font-size: .95rem; cursor: pointer; border: none;
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 3px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-warm-deep));
  color: #000; box-shadow: 0 4px 20px rgba(34, 204, 127, .25);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(34, 204, 127, .35); }
.btn-outline {
  background: transparent; color: var(--accent-green);
  border: 1.5px solid rgba(34, 204, 127, .4);
}
.btn-outline:hover { background: rgba(34, 204, 127, .08); }

.btn-sm { padding: 8px 18px; font-size: .85rem; border-radius: var(--radius-sm); }

/* ========== Header / Nav ========== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(5, 5, 8, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--text-primary); }

.nav-list { display: flex; gap: 28px; align-items: center; }
.nav-link {
  font-size: .9rem; color: var(--text-secondary);
  transition: color .15s ease; position: relative;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent-green); }
.nav-link[aria-current="page"]::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-warm));
}

.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 4px; }

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px;
  background: var(--bg-deep);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.footer-brand p { color: var(--text-muted); font-size: .88rem; margin-top: 12px; max-width: 30ch; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { font-size: .9rem; color: var(--text-secondary); transition: color .15s; }
.footer-col a:hover { color: var(--accent-green); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--text-muted); }

/* ========== Cards ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); border-color: rgba(34, 204, 127, .25); }

.icon-box {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 204, 127, .1); color: var(--accent-green);
  margin-bottom: 16px;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

.row-flex { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.col-half { flex: 1; min-width: 280px; }

/* ========== Table ========== */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
}
thead th { text-align: left; padding: 14px 18px; background: var(--bg-surface); color: var(--text-muted); font-weight: 600; white-space: nowrap; }
tbody td { padding: 14px 18px; border-top: 1px solid var(--border-subtle); }
tbody tr:hover { background: rgba(34, 204, 127, .04); }

/* ========== Steps ========== */
.step-list { counter-reset: step; }
.step-item { counter-increment: step; position: relative; padding-left: 48px; margin-bottom: 24px; }
.step-item::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: #000;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-warm-deep));
}
.step-item h3 { font-size: 1rem; margin-bottom: 4px; }
.step-item p { color: var(--text-secondary); font-size: .92rem; margin-bottom: 0; }

/* ========== FAQ ========== */
.faq-list { max-width: 780px; }
details {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  margin-bottom: 12px; background: var(--bg-card); overflow: hidden;
  transition: border-color .2s;
}
details[open] { border-color: rgba(34, 204, 127, .2); }
summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: .96rem;
  list-style: none; display: flex; align-items: center; gap: 10px;
  user-select: none; transition: color .15s;
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent-green); }
summary::marker { display: none; }
.summary-icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--accent-green); }
.details-body { padding: 0 20px 16px; font-size: .92rem; color: var(--text-secondary); line-height: 1.75; }

/* ========== Article cards ========== */
.article-card { display: flex; flex-direction: column; height: 100%; }
.article-card .card { flex: 1; display: flex; flex-direction: column; }
.article-date { font-size: .78rem; color: var(--text-muted); margin-bottom: 8px; }
.article-card h3 { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.article-card p { color: var(--text-secondary); font-size: .88rem; flex: 1; }
.article-card .btn-sm { margin-top: 16px; align-self: flex-start; }

/* ========== Related links ========== */
.related-links { columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .related-links { columns: 1; } }
.related-links li { break-inside: avoid; margin-bottom: 14px; }
.related-links a { font-size: .92rem; color: var(--text-secondary); display: flex; gap: 8px; align-items: baseline; transition: color .15s; }
.related-links a:hover { color: var(--accent-green); }
.link-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-green); flex-shrink: 0; margin-top: 6px; }

/* ========== Hero canvas ========== */
.hero-canvas {
  position: relative; width: 100%; aspect-ratio: 16/9; max-height: 420px;
  border-radius: var(--radius-xl); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border-card);
}
.hero-canvas svg { width: 100%; height: 100%; }

/* ========== Interface mockup ========== */
.interface-mockup {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); overflow: hidden;
}
.mockup-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 16px;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle);
}
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #ffbd2e; }
.mockup-dot:nth-child(3) { background: #28c840; }
.mockup-body { padding: 24px; min-height: 180px; }

/* ========== SVG Animations ========== */
@keyframes twinkle {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes dashDraw {
  0% { stroke-dashoffset: 1; }
  30%, 70% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(34,204,127,.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(34,204,127,.6)); }
}
@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.star-point { animation: twinkle 4s ease-in-out infinite alternate; }
.star-point.d1 { animation-delay: .8s; }
.star-point.d2 { animation-delay: 1.6s; }
.star-point.d3 { animation-delay: 2.4s; }
.star-point.d4 { animation-delay: 3.2s; }

.orbit-line {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: dashDraw 8s ease-in-out infinite;
}

.pulse-ring { animation: pulseGlow 3s ease-in-out infinite; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
  section:first-of-type { padding-top: calc(var(--nav-h) + 32px); }
  .row-flex { flex-direction: column; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
