/* ================= 基础重置与设计变量 ================= */
:root {
  --bg-base: #080c18;
  --bg-surface: #111827;
  --bg-card: #162032;
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-accent: rgba(6, 182, 212, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --color-primary: #3b82f6;
  --color-neon: #06b6d4;
  --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --shadow-glow: 0 8px 30px rgba(59, 130, 246, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", ui-rounded, sans-serif;
  --spacing-section: clamp(3.5rem, 8vw, 6rem);
  --container-max: 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(--bg-base);
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: clamp(15px, 1.2vw, 17px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

/* ================= 排版与流体字号 ================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

section {
  padding: var(--spacing-section) 0;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================= 布局组件 ================= */
.grid-auto {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(6, 182, 212, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-neon);
  color: var(--color-neon);
}

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.1);
}

/* ================= 表格样式 ================= */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-neon);
  font-weight: 600;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.03); }

/* ================= FAQ (details/summary) ================= */
details.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

details.faq-item summary {
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  position: relative;
  transition: background 0.2s;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  transition: transform 0.3s;
}

details.faq-item[open] summary {
  background: rgba(59, 130, 246, 0.06);
  color: var(--color-neon);
}

details.faq-item[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ================= 页头与页脚 ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.8rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-group img {
  height: 36px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 1.8rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0;
  position: relative;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--text-primary);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-neon);
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1.5rem;
  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: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.footer-col a:hover { color: var(--color-neon); }

.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* ================= SVG 动效系统 ================= */
.svg-stage {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  overflow: visible;
}

.star {
  fill: var(--color-neon);
  animation: twinkle 5s ease-in-out infinite alternate;
}

.line.draft {
  stroke: var(--color-primary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  pathLength: 1;
  animation: drawLinePath 6s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes drawLinePath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

.float-soft {
  animation: floatSoft 8s ease-in-out infinite;
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .star, .line.draft, .float-soft {
    animation: none !important;
    opacity: 0.8;
    transform: none !important;
  }
}
