/* 设计变量 */
:root {
  --color-primary: #7c3aed;
  --color-primary-light: #8b5cf6;
  --color-secondary: #db2777;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text-main: #0f172a;
  --color-text-sub: #475569;
  --color-border: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-soft: 0 4px 24px rgba(128, 90, 213, 0.08);
  --shadow-hover: 0 8px 32px rgba(128, 90, 213, 0.15);
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text-main);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: var(--color-primary);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 排版 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-top: var(--space-xl);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-sub);
}

strong {
  font-weight: 600;
  color: var(--color-text-main);
}

ul, ol {
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

li {
  margin-bottom: 0.5rem;
}

/* 头部与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 1.125rem;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item a {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-sub);
}

.nav-item a:hover,
.nav-item.current a {
  color: var(--color-primary);
  background: rgba(128, 90, 213, 0.06);
}

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-xl);
  text-align: center;
  color: var(--color-text-sub);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  list-style: none;
}

/* 通用组件 */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), filter 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 90, 213, 0.35);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(0);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.section-intro {
  max-width: 720px;
  margin-bottom: var(--space-lg);
}

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-md) 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  min-width: 600px;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: rgba(128, 90, 213, 0.04);
  font-weight: 600;
  color: var(--color-text-main);
}

td {
  color: var(--color-text-sub);
}

tr:last-child td {
  border-bottom: none;
}

/* 按钮变体 */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-sub);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(128, 90, 213, 0.04);
}

/* FAQ 样式 */
.faq-details {
  margin-top: var(--space-md);
}

details {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--color-border);
}

summary {
  cursor: pointer;
  font-weight: 600;
  outline: none;
  list-style: none;
  position: relative;
  padding-left: 28px;
  font-size: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0.15em;
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.25s var(--ease-out);
}

details[open] summary::before {
  content: "−";
  transform: rotate(90deg);
}

details[open] summary {
  color: var(--color-primary);
}

details p {
  margin-top: 12px;
  color: var(--color-text-sub);
  line-height: 1.8;
}

/* SVG 图标基础 */
.icon-svg {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.15em;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* SVG 动效 */
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawArc 12s ease-in-out infinite alternate;
}

.anim-draw-slow {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawArcSlow 18s ease-in-out infinite alternate;
}

.anim-pulse {
  animation: softPulse 6s ease-in-out infinite alternate;
}

@keyframes drawArc {
  0%, 100% { stroke-dashoffset: 1; opacity: 0.4; }
  50% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes drawArcSlow {
  0%, 100% { stroke-dashoffset: 1; opacity: 0.3; }
  40% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes softPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .anim-draw, .anim-draw-slow, .anim-pulse, * {
    animation: none !important;
    transition: none !important;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .nav-list { display: none; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
