:root {
  --bg: #0b1221;
  --surface: #111a2e;
  --text: #e6efff;
  --muted: #8ba3c9;
  --primary: #3b82f6;
  --primary-deep: #1e40af;
  --accent: #00e5ff;
  --accent-glow: rgba(0, 229, 255, 0.35);
  --border: #2a3a5c;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --font-stack: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  font-family: var(--font-stack);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: .6rem; }

/* 排版 */
h1, h2, h3, h4 { color: var(--text); text-wrap: balance; line-height: 1.25; margin-bottom: 1rem; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3.8vw, 2.5rem); margin-top: 2.8rem; font-weight: 600; }
h3 { font-size: 1.35rem; margin-top: 1.5rem; font-weight: 600; }
p { margin-bottom: 1.3rem; color: var(--muted); font-size: 1.05rem; }
strong { color: var(--text); font-weight: 600; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5.5rem 0; position: relative; }
section::after {
  content: ""; position: absolute; bottom: 0; left: 8%; width: 84%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
section:last-of-type::after { display: none; }

/* 导航 */
header { position: sticky; top: 0; z-index: 100; background: rgba(11, 18, 33, .88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
nav { display: flex; justify-content: space-between; align-items: center; height: 74px; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand span { font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: .06em; }
.nav-list { display: flex; gap: 2.2rem; list-style: none; }
.nav-list a { font-weight: 500; font-size: .96rem; color: var(--muted); padding: .5rem 0; position: relative; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--accent); }
.nav-list a[aria-current="page"]::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
  background: var(--accent); border-radius: 2px;
}

/* 响应式修复：移动端折叠布局 */
@media (max-width: 768px) {
  #hero .container > div {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .svg-scene { margin-top: 2rem; }
}

@media (max-width: 640px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
  }
  .nav-list {
    width: 100%;
    justify-content: center;
    gap: 1rem;
    margin-top: 12px;
  }
  .btn {
    width: 100%;
    display: flex;
    box-sizing: border-box;
  }
  #hero .container > div > div:first-child {
    text-align: center;
  }
  #hero .container > div > div:first-child h1,
  #hero .container > div > div:first-child p {
    text-align: center;
  }
}

/* 页脚 */
footer { background: var(--surface); padding: 4.5rem 0 2.5rem; margin-top: 4.5rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; margin-bottom: 3.5rem; }
.footer-col h4 { font-size: 1rem; color: var(--text); margin-bottom: 1.2rem; letter-spacing: .02em; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: .7rem; }
.copyright { text-align: center; color: var(--muted); font-size: .88rem; padding-top: 2.2rem; border-top: 1px solid var(--border); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  padding: .95rem 2.1rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all .25s cubic-bezier(.4,0,.2,1); text-decoration: none; border: none;
  max-width: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff;
  box-shadow: 0 8px 28px rgba(30, 64, 175, .4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 38px rgba(30, 64, 175, .65); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(30, 64, 175, .12); color: var(--accent); border-color: var(--accent); }

/* 卡片与网格 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2rem; margin-top: 2.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2rem; margin-top: 2.2rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2.2rem; transition: transform .3s, box-shadow .3s, border-color .3s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--primary); }
.card-icon {
  width: 50px; height: 50px; background: rgba(30, 64, 175, .18); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.3rem;
}
.card-icon svg { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-top: 0; color: var(--text); font-size: 1.2rem; }
.card p { margin-bottom: 0; font-size: .98rem; line-height: 1.7; }

/* 表格 */
.table-wrapper { overflow-x: auto; margin: 2.2rem 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 1.2rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: rgba(30, 64, 175, .12); color: var(--accent); font-weight: 600; letter-spacing: .02em; }
td { color: var(--muted); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(30, 64, 175, .06); color: var(--text); }

/* FAQ */
details { margin-bottom: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
summary {
  padding: 1.3rem 1.6rem; cursor: pointer; font-weight: 600; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.6rem; color: var(--primary); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
details[open] summary { background: rgba(30, 64, 175, .08); }
.faq-answer { padding: 0 1.6rem 1.6rem; color: var(--muted); line-height: 1.75; }

/* 更新卡片 */
.update-card { display: flex; flex-direction: column; height: 100%; }
.update-meta { font-size: .85rem; color: var(--primary); margin-bottom: .8rem; font-weight: 500; }
.update-card h3 { margin-top: 0; font-size: 1.15rem; }
.update-card p { margin-bottom: 1rem; flex-grow: 1; }
.link-btn { font-size: .95rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }
.link-btn:hover { color: #fff; }

/* 相关链接 */
.related-list { list-style: none; padding: 0; columns: 2; column-gap: 3rem; }
.related-item { break-inside: avoid; margin-bottom: 1.6rem; padding: 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, transform .2s; }
.related-item:hover { border-color: var(--primary); transform: translateX(4px); }
.related-item h4 { margin: 0 0 .4rem; font-size: 1.05rem; }
.related-item p { margin: 0; font-size: .92rem; }

/* SVG 动效基础 */
.svg-scene { width: 100%; max-width: 640px; margin: 0 auto; aspect-ratio: 16/10; position: relative; }
.svg-scene svg { width: 100%; height: 100%; }
.star-dot { fill: var(--accent); opacity: .35; }
.star-dot.twinkle { animation: twinkle 5.5s ease-in-out infinite; }
.star-dot:nth-child(3n) { animation-delay: 1.2s; }
.star-dot:nth-child(5n) { animation-delay: 2.8s; }
.conn-line { stroke: var(--primary); stroke-width: 1.5; fill: none; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawConnect 9s ease-in-out infinite alternate; }
.pulse-ring { stroke: var(--accent); stroke-width: 1.2; fill: none; opacity: 0; animation: pulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes drawConnect { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes pulse { 0% { r: 8; opacity: 0; stroke-width: 2; } 50% { opacity: .6; stroke-width: 1; } 100% { r: 28; opacity: 0; stroke-width: .5; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .star-dot, .conn-line, .pulse-ring { animation: none !important; }
}

/* 无障碍焦点 */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
