/* ========================================
   全局设计变量与基础重置
   ======================================== */
:root {
  --color-bg: #0b1220;
  --color-surface: #111a2e;
  --color-surface-hover: #162238;
  --color-border: #1e2d4a;
  --color-primary: #2d7af5;
  --color-accent: #00e5ff;
  --color-text: #e2e8f0;
  --color-text-muted: #8a9bbd;
  --color-success: #10b981;
  --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 18px rgba(45, 122, 245, 0.25);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1180px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 1rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ========================================
   排版系统（流体字号）
   ======================================== */
h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}

h1 { font-size: clamp(2rem, 5vw + 0.5rem, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw + 0.25rem, 2.25rem); font-weight: 600; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.125rem, 2vw + 0.25rem, 1.375rem); font-weight: 600; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--color-text-muted); }
strong, b { color: #fff; font-weight: 600; }

/* ========================================
   通用布局与容器
   ======================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 4rem 0;
  position: relative;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 2rem 0;
  border: none;
}

/* ========================================
   页头与页脚
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--color-surface-hover);
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    gap: 0.5rem;
  }
}

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ========================================
   按钮组件
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #1c5bd1);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(45, 122, 245, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0, 229, 255, 0.05);
}

.btn-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* ========================================
   卡片与网格
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  fill: none;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ========================================
   表格样式
   ======================================== */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: rgba(45, 122, 245, 0.1);
  font-weight: 600;
  color: var(--color-accent);
}

td {
  color: var(--color-text-muted);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ========================================
   FAQ (Details/Summary)
   ======================================== */
.faq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: border-color var(--transition-fast);
}

.faq-item details[open] {
  border-color: var(--color-primary);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-accent);
  transition: transform var(--transition-fast);
}

.faq-item details[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .answer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========================================
   新闻卡片
   ======================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.news-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.news-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.news-card p {
  font-size: 0.9rem;
  margin: 0;
  flex-grow: 1;
}

.news-card .btn {
  align-self: flex-start;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  margin-top: auto;
}

/* ========================================
   相关阅读
   ======================================== */
.related-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.related-list li {
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.related-list li:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
}

.related-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.related-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ========================================
   SVG 动效系统
   ======================================== */
@keyframes starBlink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

.star-point {
  fill: var(--color-accent);
  animation: starBlink 4s ease-in-out infinite;
}

.connect-line {
  stroke: var(--color-primary);
  stroke-width: 1.5;
  fill: none;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 6s ease-in-out infinite;
}

.mono-svg-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  vertical-align: middle;
}

/* 减少动态效果适配 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.grid-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) {
  .grid-alt { grid-template-columns: 1fr; }
  .grid-alt .visual-side { order: -1; }
}
.step-list {
  list-style: none;
  counter-reset: step-counter;
}
.step-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.25rem;
}
.step-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-accent);
}
