/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --bg-base: #0b0b0d;
  --bg-surface: #141417;
  --bg-elevated: #1c1c21;
  --border-light: rgba(212, 175, 55, 0.25);
  --border-strong: rgba(212, 175, 55, 0.65);
  --text-primary: #f2f2f5;
  --text-secondary: #a0a0a8;
  --text-muted: #6b6b75;
  --accent-gold: #d4af37;
  --accent-gold-hover: #e8c54a;
  --accent-gold-dark: #b89528;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --container-max: 1140px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4);
  --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;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   排版系统
   ========================================= */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), transparent);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin-bottom: var(--spacing-xs);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  text-wrap: pretty;
}

strong {
  color: var(--text-primary);
  font-weight: 500;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--accent-gold-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 4px;
  border-radius: 4px;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

/* =========================================
   布局网格与通用组件
   ========================================= */
.grid-auto {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center {
  text-align: center;
}

.mt-lg { margin-top: var(--spacing-lg); }
.mb-md { margin-bottom: var(--spacing-md); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gold);
  color: #0b0b0d;
  border: 1px solid var(--accent-gold);
}

.btn-primary:hover {
  background: var(--accent-gold-hover);
  border-color: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--accent-gold);
}

/* 卡片 */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.card-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: var(--bg-elevated);
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--accent-gold);
}

td {
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* 步骤列表 */
.step-list {
  list-style: none;
  counter-reset: step;
}

.step-list li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent-gold);
  font-size: 0.9rem;
}

/* FAQ Details */
details {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  transition: border-color var(--transition-base);
}

details[open] {
  border-color: var(--border-strong);
}

summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent-gold);
  transition: transform var(--transition-base);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details[open] summary {
  border-bottom: 1px solid var(--border-light);
}

details div {
  padding: 1rem 1.2rem;
  color: var(--text-secondary);
}

/* 图标工具类 */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* =========================================
   页头页脚
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.brand img {
  width: 110px;
  height: 30px;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.3rem 0;
  position: relative;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--accent-gold);
}

.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gold);
}

@media (max-width: 768px) {
  .main-nav ul { gap: 1rem; font-size: 0.9rem; }
  .brand img { width: 90px; height: 26px; }
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
  color: var(--accent-gold);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

/* =========================================
   SVG 动效关键帧
   ========================================= */
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotate-reverse-slow {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes sync-align {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
  50% { transform: translate(8px, -8px) rotate(15deg); opacity: 1; }
}

@keyframes float-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.svg-animated {
  transform-box: fill-box;
  transform-origin: center;
}

.rotate-cw { animation: rotate-slow 16s linear infinite; }
.rotate-ccw { animation: rotate-reverse-slow 20s linear infinite; }
.sync-move { animation: sync-align 8s ease-in-out infinite; }
.float-y { animation: float-subtle 6s ease-in-out infinite; }
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 3s ease forwards;
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  .rotate-cw, .rotate-ccw, .sync-move, .float-y, .draw-path {
    animation: none !important;
  }
  .card, .btn {
    transform: none !important;
  }
}
