/* =========================================
   设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #0b0b0b;
  --color-surface: #161616;
  --color-surface-alt: #1e1e1e;
  --color-border: rgba(212, 175, 55, 0.25);
  --color-gold: #d4af37;
  --color-gold-hover: #e8c95e;
  --color-text: #f2f2f2;
  --color-text-secondary: #a8a8a8;
  --color-accent: #ffffff;
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', serif;
  --font-sans: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 0 1px var(--color-border), 0 8px 32px rgba(212, 175, 55, 0.08);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1120px;
  --spacing-section: clamp(3rem, 6vw, 6rem);
  --spacing-element: 1rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* =========================================
 排版与容器
  ========================================= */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.section { padding: var(--spacing-section) 0; position: relative; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.6em;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.section-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--color-text-secondary);
  max-width: 65ch;
  margin-bottom: 2rem;
  text-wrap: pretty;
}
.text-gold { color: var(--color-gold); }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: var(--spacing-section) 0;
}

/* =========================================
 页头与导航
  ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: 1.5rem; }
.nav-link {
  position: relative; padding: 0.4rem 0; font-size: 0.95rem; color: var(--color-text-secondary);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-gold); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px;
  background: var(--color-gold); border-radius: 2px;
}
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }

/* =========================================
 组件：按钮与卡片
  ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; font-weight: 600; border-radius: var(--radius-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  cursor: pointer; border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), #b8922a); color: #0a0a0a;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35); }
.btn-outline {
  background: transparent; border-color: var(--color-border); color: var(--color-gold);
}
.btn-outline:hover { background: rgba(212, 175, 55, 0.08); }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 1.5rem; transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card-grid { display: grid; gap: 1.5rem; }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--color-gold); }
.card-title { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--color-accent); }
.card-body { font-size: 0.95rem; color: var(--color-text-secondary); }

/* =========================================
 表格与表单元素
  ========================================= */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.styled-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.styled-table th, .styled-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.styled-table th { background: var(--color-surface-alt); font-weight: 600; color: var(--color-gold); }
.styled-table tr:last-child td { border-bottom: none; }
.styled-table tr:hover td { background: rgba(212, 175, 55, 0.04); }

details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 0.8rem; overflow: hidden; }
summary {
  padding: 1rem 1.2rem; cursor: pointer; font-weight: 600; color: var(--color-accent);
  background: var(--color-surface); user-select: none; display: flex; align-items: center; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; color: var(--color-gold); transition: transform var(--transition-base); }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { background: var(--color-surface-alt); border-bottom: 1px solid var(--color-border); }
details p { padding: 1rem 1.2rem; font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.6; }

/* =========================================
 SVG 动效系统
  ========================================= */
.svg-anim-wrap { position: relative; width: 100%; height: auto; overflow: visible; }
.svg-anim-wrap svg { width: 100%; height: auto; display: block; }
.geo-shape { transform-box: fill-box; transform-origin: center; }
.rotate-slow { animation: geoRotate 14s linear infinite; }
.rotate-reverse { animation: geoRotateReverse 18s linear infinite; }
.pulse-scale { animation: geoPulse 6s ease-in-out infinite alternate; }
.draw-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: geoDraw 4s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  .rotate-slow, .rotate-reverse, .pulse-scale, .draw-line { animation: none !important; }
}
@keyframes geoRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes geoRotateReverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes geoPulse { 0% { transform: scale(0.95); opacity: 0.8; } 100% { transform: scale(1.05); opacity: 1; } }
@keyframes geoDraw { 0% { stroke-dashoffset: 1; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }

/* =========================================
 响应式适配
  ========================================= */
@media (max-width: 768px) {
  .mobile-toggle { display: block; color: var(--color-gold); }
  .nav-list {
    position: fixed; top: 56px; left: 0; right: 0; background: var(--color-bg);
    flex-direction: column; padding: 1.5rem; border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%); transition: transform var(--transition-base);
  }
  .nav-list.is-open { transform: translateY(0); }
  .card-grid { grid-template-columns: 1fr; }
  .section-title { margin-bottom: 1rem; }
}
/* Focus visible for accessibility */
*:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
