/* === 设计变量 === */
:root {
  --bg-page: #08080a;
  --bg-surface: #111114;
  --bg-card: #16161a;
  --bg-elevated: #1c1c21;
  --text-main: #f0f0f3;
  --text-sub: #a1a1aa;
  --text-muted: #6b6b73;
  --accent-gold: #d4af37;
  --accent-gold-light: #e8cc6b;
  --accent-gold-dark: #b8962e;
  --border-thin: rgba(212, 175, 55, 0.2);
  --border-ui: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 5.5rem;
  --container-max: 1180px;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-main);
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw + 0.5rem, 2.4rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.2rem, 2vw + 0.3rem, 1.5rem); margin-bottom: var(--space-sm); }
p, li, td, th { font-size: clamp(0.95rem, 1vw + 0.5rem, 1.05rem); color: var(--text-sub); }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }

/* === 布局容器 === */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; position: relative; }
.grid-auto { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* === 头部与导航 === */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-ui);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: var(--space-sm); }
.brand img { height: 32px; width: auto; }
.brand-name { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-main); font-weight: 500; }
nav ul { display: flex; gap: var(--space-md); }
nav a {
  font-size: 0.95rem; color: var(--text-sub); padding: 0.4rem 0; position: relative;
}
nav a:hover, nav a[aria-current="page"] { color: var(--accent-gold); }
nav a[aria-current="page"]::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--accent-gold);
}
.mobile-toggle { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; }

/* === 页脚 === */
.site-footer {
  background: var(--bg-surface); border-top: 1px solid var(--border-ui);
  padding: var(--space-lg) 0 var(--space-md);
  font-size: 0.9rem; color: var(--text-muted);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-col h4 { font-size: 1rem; color: var(--text-main); margin-bottom: var(--space-sm); font-family: var(--font-serif); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a:hover { color: var(--accent-gold); }
.footer-bottom { border-top: 1px solid var(--border-ui); padding-top: var(--space-md); text-align: center; color: var(--text-muted); }

/* === 通用组件 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 1rem; cursor: pointer; transition: all var(--transition-base);
  border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold)); color: #0a0a0c; box-shadow: 0 4px 14px rgba(212,175,55,0.3); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light)); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(212,175,55,0.4); }
.btn-outline { background: transparent; border-color: var(--accent-gold); color: var(--accent-gold); }
.btn-outline:hover { background: rgba(212,175,55,0.08); }
.focus-visible:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 4px; }

.card {
  background: var(--bg-card); border: 1px solid var(--border-ui);
  border-radius: var(--radius-md); padding: var(--space-md);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-2px); border-color: var(--border-thin); box-shadow: var(--shadow-sm); }

.tag {
  display: inline-block; padding: 0.25rem 0.6rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 500; background: rgba(212,175,55,0.1); color: var(--accent-gold); border: 1px solid rgba(212,175,55,0.2);
}

/* === 表格 === */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-ui); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--bg-card); min-width: 500px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-ui); }
th { background: var(--bg-elevated); color: var(--text-main); font-weight: 500; font-size: 0.95rem; }
td { color: var(--text-sub); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* === FAQ (原生 details) === */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-ui); border-radius: var(--radius-md); overflow: hidden; }
.faq-item summary {
  padding: 1.2rem 1.5rem; cursor: pointer; font-weight: 500; color: var(--text-main);
  display: flex; justify-content: space-between; align-items: center; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; color: var(--accent-gold); transition: transform var(--transition-base);
  transform-origin: center;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-content { padding: 0 1.5rem 1.5rem; color: var(--text-sub); line-height: 1.8; }

/* === SVG 动效基类 === */
.svg-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-float { animation: float-up 6s ease-in-out infinite alternate; }
.anim-float-delay { animation: float-up 7s ease-in-out infinite alternate-reverse; animation-delay: -2s; }
.anim-pulse { animation: pulse-glow 4s ease-in-out infinite; }

@keyframes float-up {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  50%, 80% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.6; }
}
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(212,175,55,0.2)); }
  50% { filter: drop-shadow(0 0 10px rgba(212,175,55,0.5)); }
}

/* === 响应式适配 === */
@media (max-width: 768px) {
  .section { padding: var(--space-lg) 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  nav { display: none; }
  .mobile-toggle { display: block; }
  .mobile-menu {
    position: absolute; top: 72px; left: 0; width: 100%; background: var(--bg-surface);
    border-bottom: 1px solid var(--border-ui); padding: var(--space-md);
    flex-direction: column; gap: var(--space-sm);
  }
  nav.open { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-float, .anim-float-delay, .anim-pulse, .svg-draw {
    animation: none !important;
  }
  .card, .btn, a {
    transition: none !important;
  }
}
