/* ==================== 设计变量 ==================== */
:root {
  --color-bg-deep: #0b0716;
  --color-bg-card: rgba(255, 255, 255, 0.06);
  --color-bg-card-hover: rgba(255, 255, 255, 0.10);
  --color-border-light: rgba(255, 255, 255, 0.12);
  --color-accent-purple: #8b5cf6;
  --color-accent-pink: #d946ef;
  --color-text-primary: #f4f3fa;
  --color-text-secondary: #c4bdd9;
  --color-text-muted: #8a82a6;
  --color-focus-ring: rgba(139, 92, 246, 0.6);
  
  --font-family-base: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --font-size-xxl: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);
  
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.25);
  --glow-accent: 0 0 16px rgba(139, 92, 246, 0.35);
}

/* ==================== 基础重置与排版 ==================== */
*, *::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: var(--font-size-base);
  line-height: 1.8;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-deep);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: var(--color-accent-pink);
}

button, [role="button"] {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ==================== 布局容器 ==================== */
.container {
  width: 100%;
  max-width: var(--container-width, 1140px);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.section {
  padding-block: var(--space-2xl);
  position: relative;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 40ch), 1fr));
  gap: var(--space-xl);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-lg);
}

/* ==================== 导航与页头 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 7, 22, 0.75);
  border-bottom: 1px solid var(--color-border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--color-text-primary);
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.main-nav {
  display: flex;
  gap: var(--space-lg);
}

.main-nav a {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding-block: var(--space-xs);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-accent-purple);
}

.main-nav .active {
  color: var(--color-accent-pink);
  border-bottom-color: currentColor;
}

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-pink));
  color: #fff;
  box-shadow: var(--glow-accent);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(217, 70, 239, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-accent-purple);
}

/* ==================== 卡片与玻璃态 ==================== */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.card:hover {
  background: var(--color-bg-card-hover);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(217, 70, 239, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--color-accent-pink);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

/* ==================== 标题排版 ==================== */
h1, h2, h3, h4 {
  color: var(--color-text-primary);
  text-wrap: balance;
  line-height: 1.3;
}

h1 {
  font-size: var(--font-size-xxl);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-lg);
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-purple), var(--color-accent-pink));
  border-radius: 2px;
}

h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  max-width: 65ch;
}

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ==================== 表格样式 ==================== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-primary);
  font-weight: 600;
}

td {
  color: var(--color-text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* ==================== FAQ (Details/Summary) ==================== */
.faq-item {
  margin-bottom: var(--space-md);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  overflow: hidden;
}

.faq-item[open] {
  border-color: rgba(139, 92, 246, 0.3);
}

.faq-summary {
  padding: var(--space-md);
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-accent-purple);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: var(--font-size-sm);
}

/* ==================== 新闻卡片 ==================== */
.news-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  display: block;
}

.news-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.news-summary {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.link-btn {
  font-size: var(--font-size-sm);
  color: var(--color-accent-pink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-btn:hover {
  color: var(--color-accent-purple);
}

.link-btn::after {
  content: "→";
  transition: transform 0.2s ease;
}

.link-btn:hover::after {
  transform: translateX(3px);
}

/* ==================== SVG 动效核心规则 ==================== */
.svg-anim-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.draw-loop {
  animation: drawPath 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.pulse-ring {
  animation: pulseRing 4s ease-in-out infinite;
}

.float-soft {
  animation: floatSoft 5s ease-in-out infinite;
}

.rotate-slow {
  transform-box: fill-box;
  transform-origin: center;
  animation: rotateSlow 12s linear infinite;
}

@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes pulseRing {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes rotateSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .section { padding-block: var(--space-xl); }
  h1 { font-size: var(--font-size-xl); }
  h2 { font-size: var(--font-size-lg); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
