/* 设计变量与基础设定 */
:root {
  --color-bg: #08080a;
  --color-surface: #111114;
  --color-surface-hover: #1a1a1e;
  --color-border: rgba(204, 170, 85, 0.25);
  --color-gold: #ccaa55;
  --color-gold-light: #f5e6b8;
  --color-text: #e6e6e6;
  --color-text-muted: #8c8c92;
  --color-accent: #ffffff;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-heading: 'Georgia', 'Noto Serif SC', 'Songti SC', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --container-max: 1200px;
  --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; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  -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; }

/* 排版系统 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--spacing-md); }

.section { padding: var(--spacing-xl) 0; position: relative; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; color: var(--color-accent); text-wrap: balance; letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: var(--spacing-sm); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: var(--spacing-md); padding-bottom: var(--spacing-xs); border-bottom: 1px solid var(--color-border); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin-bottom: var(--spacing-xs); }

p { margin-bottom: var(--spacing-sm); color: var(--color-text); }
.text-muted { color: var(--color-text-muted); }
.gold-text { color: var(--color-gold); }

/* 布局工具 */
.grid-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); align-items: center; }
.grid-6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--spacing-md); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--spacing-sm); align-items: center; }
.horizontal-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--spacing-md); padding-bottom: var(--spacing-sm); -webkit-overflow-scrolling: touch; }
.gallery-item { flex: 0 0 320px; scroll-snap-align: start; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem; border-radius: var(--radius-sm);
  font-weight: 500; cursor: pointer; transition: all var(--transition-base);
  border: 1px solid var(--color-gold); background: transparent; color: var(--color-gold);
  text-decoration: none; font-size: 0.95rem;
}
.btn:hover, .btn:focus-visible { background: var(--color-gold); color: var(--color-bg); outline: none; box-shadow: 0 0 12px rgba(204, 170, 85, 0.3); }
.btn-primary { background: var(--color-gold); color: var(--color-bg); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-gold-light); border-color: var(--color-gold-light); }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 卡片 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--spacing-md);
  transition: transform var(--transition-base), border-color var(--transition-base);
}
.card:hover { transform: translateY(-4px); border-color: var(--color-gold); }

/* 表格 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: rgba(204, 170, 85, 0.08); color: var(--color-gold); font-weight: 600; white-space: nowrap; }
td { color: var(--color-text); }
tr:last-child td { border-bottom: none; }

/* FAQ */
details[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
summary {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 1rem 1.2rem; cursor: pointer;
  font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center;
  transition: all var(--transition-base);
}
summary::-webkit-details-marker { display: none; }
summary:hover, summary:focus-visible { border-color: var(--color-gold); background: var(--color-surface-hover); }
summary::after { content: "+"; color: var(--color-gold); font-size: 1.2rem; font-weight: 400; transition: transform 0.3s; }
details[open] summary::after { content: "−"; transform: rotate(180deg); }
.summary-content { background: var(--color-surface); border: 1px solid var(--color-border); border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md); padding: 1rem 1.2rem; color: var(--color-text-muted); }

/* 页头页脚 */
.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(--color-border); padding: 0.8rem 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-heading); font-size: 1.1rem; color: var(--color-gold); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; gap: 1.5rem; }
nav a { font-size: 0.95rem; color: var(--color-text-muted); position: relative; padding: 0.2rem 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-gold); }
nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--color-gold); }
.mobile-toggle { display: none; background: none; border: none; color: var(--color-gold); cursor: pointer; }

.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 3rem 0 1.5rem; margin-top: var(--spacing-xl); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--spacing-lg); margin-bottom: 2rem; }
.footer-col h4 { color: var(--color-gold); margin-bottom: 1rem; font-size: 1rem; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-accent); }
.copyright { text-align: center; color: var(--color-text-muted); font-size: 0.85rem; border-top: 1px solid var(--color-border); padding-top: 1.5rem; }

/* SVG 通用样式 */
.svg-icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw { animation: drawLine 3s ease-in-out infinite alternate; }

/* SVG 动效关键帧 */
@keyframes floatCard1 { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(-1deg); } }
@keyframes floatCard2 { 0%, 100% { transform: translateY(0) rotate(1deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes floatCard3 { 0%, 100% { transform: translateY(0) rotate(-0.5deg); } 50% { transform: translateY(-15px) rotate(0deg); } }
@keyframes drawLine { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pulseOpacity { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

.hero-svg-card:nth-child(1) { animation: floatCard1 6s ease-in-out infinite; }
.hero-svg-card:nth-child(2) { animation: floatCard2 7s ease-in-out infinite; }
.hero-svg-card:nth-child(3) { animation: floatCard3 8s ease-in-out infinite; }
.decorative-divider { width: 100%; height: 2px; margin: var(--spacing-lg) 0; background: linear-gradient(90deg, transparent, var(--color-gold), transparent); opacity: 0.3; }

/* 响应式适配 */
@media (max-width: 900px) {
  .grid-split { grid-template-columns: 1fr; gap: var(--spacing-md); }
  .mobile-toggle { display: block; }
  nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 1rem; }
  nav ul.active { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .hero-svg-card, .anim-draw, .decorative-divider { animation: none !important; }
}
