:root {
  --color-bg: #0A0A0A;
  --color-surface: #111111;
  --color-border: rgba(201, 162, 63, 0.2);
  --color-gold: #C9A23F;
  --color-gold-light: #E8D5A3;
  --color-text-primary: #F5F5F5;
  --color-text-secondary: #9A9A9A;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --space-base: 1rem;
  --container-max: 1180px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --transition: 0.3s 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 {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-text-primary); line-height: 1.25; margin-bottom: calc(var(--space-base) * 0.8); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); border-left: 3px solid var(--color-gold); padding-left: 1rem; margin-top: 1.5rem; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p { margin-bottom: var(--space-base); }
a { color: var(--color-gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-gold-light); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; overflow: visible; }

/* Layout */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.section-wrapper { padding: 5rem 0; border-top: 1px solid var(--color-border); }
.section-wrapper:first-of-type { border-top: none; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.section-desc { max-width: 820px; margin: 0 auto 3rem; font-size: 1.05rem; color: var(--color-text-secondary); line-height: 1.8; }

/* Components */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.9rem 2rem; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer;
  transition: var(--transition); border: 1px solid transparent; font-size: 1rem; font-family: var(--font-body);
  outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(201, 162, 63, 0.5); }
.btn-primary { background: var(--color-gold); color: #0A0A0A; }
.btn-primary:hover { background: var(--color-gold-light); transform: translateY(-2px); text-decoration: none; }
.btn-outline { background: transparent; border-color: var(--color-gold); color: var(--color-gold); }
.btn-outline:hover { background: rgba(201, 162, 63, 0.08); text-decoration: none; }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 1.6rem; transition: var(--transition); display: flex; flex-direction: column; height: 100%;
}
.card:hover { border-color: var(--color-gold); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.card-icon { width: 42px; height: 42px; stroke: var(--color-gold); stroke-width: 1.5; margin-bottom: 1rem; flex-shrink: 0; }
.card-title { color: var(--color-text-primary); font-weight: 600; margin-bottom: 0.6rem; font-family: var(--font-heading); font-size: 1.15rem; }
.card-text { font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.65; flex-grow: 1; }

.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: rgba(201, 162, 63, 0.06); color: var(--color-gold); font-weight: 600; white-space: nowrap; }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

details { margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
summary {
  padding: 1rem 1.2rem; cursor: pointer; font-weight: 600; color: var(--color-text-primary);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  background: var(--color-surface); transition: var(--transition); font-size: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--color-gold); font-size: 1.3rem; font-weight: 400; transition: var(--transition); }
details[open] summary::after { content: '−'; }
details[open] summary { background: rgba(201, 162, 63, 0.05); }
details > div { padding: 1rem 1.2rem; color: var(--color-text-secondary); line-height: 1.7; background: var(--color-bg); }

/* Header & Nav */
header { position: sticky; top: 0; z-index: 100; background: rgba(10, 10, 10, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-heading); font-weight: 700; color: var(--color-text-primary); font-size: 1.25rem; }
.brand img { height: 38px; width: auto; }
nav ul { display: flex; list-style: none; gap: 1.8rem; }
nav a { color: var(--color-text-secondary); font-size: 0.95rem; position: relative; padding-bottom: 4px; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-gold); }
nav a[aria-current="page"]::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--color-gold); }

/* Footer */
footer { padding: 4rem 0 2.5rem; border-top: 1px solid var(--color-border); margin-top: 4rem; font-size: 0.9rem; text-align: center; }
footer p { margin-bottom: 0.6rem; }
footer a { color: var(--color-text-secondary); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--color-gold); }

/* SVG Animations */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.anim-rotate { animation: rotate-slow 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-rotate-rev { animation: rotate-slow-rev 16s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rotate-slow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes rotate-slow-rev { 0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); } }

.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-stroke 4.5s ease-in-out infinite alternate; }
@keyframes draw-stroke { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

.anim-fade-sync { animation: fade-sync 3s ease-in-out infinite alternate; }
@keyframes fade-sync { 0% { opacity: 0.4; } 100% { opacity: 1; } }

.anim-draw-circle { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-circle 5s ease-in-out infinite alternate; }
@keyframes draw-circle { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
