/* =========================================
   Design System & Variables
   ========================================= */
:root {
  --color-bg-deep: #050b14;
  --color-bg-surface: #0b1628;
  --color-bg-card: #11203d;
  
  --color-primary: #0ea5e9;
  --color-primary-hover: #0284c7;
  --color-accent-neon: #38bdf8;
  --color-accent-glow: rgba(56, 189, 248, 0.3);
  
  --color-text-main: #f0f6fc;
  --color-text-muted: #8ba3c7;
  --color-border-subtle: rgba(106, 153, 200, 0.15);
  --color-border-strong: rgba(14, 165, 233, 0.4);

  --font-family-base: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Reset & Base Typography
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-family-base);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.75;
  color: var(--color-text-main);
  background-color: var(--color-bg-deep);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-text-main);
}
h1 { font-size: clamp(2rem, 1.5rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin-bottom: 1rem; color: var(--color-text-muted); max-width: 65ch; }
p strong { color: var(--color-text-main); font-weight: 600; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition-standard); }
ul, ol { list-style: none; padding: 0; }

/* =========================================
   Layout Containers
   ========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.section {
  padding: var(--space-xl) 0;
  position: relative;
}
.section-alt {
  background-color: var(--color-bg-surface);
}
.grid-auto {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 11, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--space-sm) 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand img { height: 32px; width: auto; }
nav ul { display: flex; gap: var(--space-md); align-items: center; }
nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}
nav a:hover, nav a[aria-current="page"] {
  color: var(--color-accent-neon);
  border-bottom-color: var(--color-accent-neon);
}

/* =========================================
   Components: Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-standard);
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-neon));
  color: #020813;
  box-shadow: 0 0 20px var(--color-accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.5);
}
.btn-outline {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-accent-neon);
}
.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--color-accent-neon);
}

/* =========================================
   Components: Cards & Tables
   ========================================= */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: var(--transition-standard);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--color-accent-neon);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}
.feature-icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent-neon);
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}
.card-body { flex-grow: 1; }
.card-body p { font-size: 0.95rem; line-height: 1.65; }

table.platform-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-md);
  font-size: 0.95rem;
}
table.platform-table th,
table.platform-table td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
table.platform-table th {
  color: var(--color-accent-neon);
  font-weight: 600;
  background: rgba(56, 189, 248, 0.05);
}
table.platform-table tr:last-child td { border-bottom: none; }

/* =========================================
   Components: FAQ
   ========================================= */
.faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem var(--space-md);
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text-main);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-item summary:hover { background: rgba(255,255,255,0.02); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-accent-neon);
  transition: transform 0.3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 1rem 1rem 1rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  border-top: 1px solid var(--color-border-subtle);
  margin-top: 0;
  padding-top: 1rem;
}

/* =========================================
   Components: News & Links
   ========================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}
.news-card .date { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5rem; display: block; }
.news-card .title { font-size: 1.1rem; font-weight: 600; color: var(--color-text-main); margin-bottom: 0.5rem; }
.related-list li { margin-bottom: 0.75rem; border-bottom: 1px solid var(--color-border-subtle); padding-bottom: 0.75rem; }
.related-list a { display: flex; justify-content: space-between; align-items: baseline; }
.related-list a span.desc { font-size: 0.85rem; color: var(--color-text-muted); margin-left: var(--space-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }

/* =========================================
   Footer
   ========================================= */
.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--space-lg) 0 var(--space-md);
  background: var(--color-bg-deep);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer-col h4 { color: var(--color-text-main); margin-bottom: var(--space-sm); font-size: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--color-accent-neon); }
.footer-bottom { text-align: center; border-top: 1px solid var(--color-border-subtle); padding-top: var(--space-md); }

/* =========================================
   SVG Animations
   ========================================= */
.svg-animate { overflow: visible; }
.node-dot {
  fill: var(--color-accent-neon);
  opacity: 0.2;
  animation: nodeLightUp 6s infinite ease-in-out;
}
.line-connect {
  stroke: var(--color-accent-neon);
  stroke-width: 2;
  fill: none;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: lineDraw 8s infinite ease-in-out;
}

@keyframes nodeLightUp {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); filter: drop-shadow(0 0 8px var(--color-accent-neon)); }
}
@keyframes lineDraw {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.3; }
  20% { stroke-dashoffset: 1; opacity: 0.8; }
  40%, 80% { stroke-dashoffset: 0; opacity: 0.5; }
}

.stagger-1 { animation-delay: 0.2s; }
.stagger-2 { animation-delay: 0.4s; }
.stagger-3 { animation-delay: 0.6s; }
.stagger-4 { animation-delay: 0.8s; }
.stagger-5 { animation-delay: 1.0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation: none;
  }
  .node-dot { opacity: 0.6; }
}

@media (max-width: 520px) {
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  .site-header .container {
    padding: 0 0.75rem;
  }
  .section {
    padding: 3rem 0;
  }
  .container {
    padding: 0 1rem;
  }
}

/* Accessibility Focus */
:focus-visible {
  outline: 2px solid var(--color-accent-neon);
  outline-offset: 4px;
}
