/* ==================== 设计变量与基础重置 ==================== */
:root {
  --color-bg: #f5f3fa;
  --color-surface: rgba(255, 255, 255, 0.68);
  --color-surface-solid: #ffffff;
  --color-primary: #8b5cf6;
  --color-secondary: #ec4899;
  --color-gradient: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --color-text: #1e1b4b;
  --color-text-muted: #5b5873;
  --color-border: rgba(139, 92, 246, 0.15);
  --color-border-hover: rgba(236, 72, 153, 0.35);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 4px 24px rgba(139, 92, 246, 0.08);
  --shadow-lift: 0 12px 32px rgba(139, 92, 246, 0.18);
  --spacing-section: clamp(3.5rem, 6vw, 6.5rem);
  --spacing-component: 1.5rem;
  --font-main: "PingFang SC", "HarmonyOS Sans", "Microsoft YaHei UI", "Noto Sans SC", system-ui, sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.85;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==================== 排版与容器 ==================== */
.container {
  width: min(92%, 1180px);
  margin: 0 auto;
}

section {
  padding: var(--spacing-section) 0;
  position: relative;
}

h1, h2, h3 {
  line-height: 1.35;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1.8rem;
  color: var(--color-text);
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

p {
  margin: 0 0 1.2rem 0;
  color: var(--color-text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: var(--color-secondary);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==================== 页头与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 250, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--color-text);
  font-size: 1.1rem;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 600px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.6rem;
  }
  .nav-list {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem 0.8rem;
  }
}

.nav-link {
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-primary);
  background: rgba(139, 92, 246, 0.06);
}

.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.85);
  padding: 3.5rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #fff;
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ==================== 组件：卡片与按钮 ==================== */
.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--color-border-hover);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-gradient);
  color: #fff;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover, .btn-primary:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: rgba(139, 92, 246, 0.08);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

/* ==================== 网格与列表 ==================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.news-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.6rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==================== 表格样式 ==================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  backdrop-filter: blur(10px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  min-width: 540px;
}

.data-table th, .data-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background: rgba(139, 92, 246, 0.06);
  font-weight: 600;
  color: var(--color-text);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ==================== FAQ (Details/Summary) ==================== */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  margin-bottom: 0.8rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.faq-summary {
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--color-primary);
  transition: transform 0.2s;
}

.faq-item[open] .faq-summary::after {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 1.4rem 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ==================== SVG 动效系统 ==================== */
@keyframes draw-progress {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes float-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.anim-progress-ring {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-progress 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.anim-sync-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-progress 5.5s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse;
}

.anim-float {
  animation: float-subtle 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .anim-progress-ring, .anim-sync-line, .anim-float {
    stroke-dashoffset: 0;
    animation: none;
  }
}
