:root {
  --bg-primary: #0B0C10;
  --bg-secondary: #12131A;
  --bg-tertiary: #1A1C26;
  --text-primary: #F0F0F0;
  --text-secondary: #A0A4B0;
  --text-muted: #6B7080;
  --gold-primary: #D4AF37;
  --gold-hover: #E5C55A;
  --gold-subtle: rgba(212, 175, 55, 0.15);
  --border-thin: rgba(212, 175, 55, 0.25);
  --border-light: rgba(255, 255, 255, 0.08);
  --font-heading: 'Noto Serif SC', 'Songti SC', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --max-width: 1200px;
  --space-section: clamp(64px, 10vw, 120px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo img {
  height: 32px;
  width: auto;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
}

nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
  text-decoration: none;
}

/* Sections */
.section {
  padding: var(--space-section) 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold-primary);
  color: #0B0C10;
  border: 1px solid var(--gold-primary);
}

.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: #0B0C10;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-border, var(--gold-primary));
}

.btn-outline:hover {
  background: var(--gold-subtle);
  text-decoration: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: var(--border-thin);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  stroke: var(--gold-primary);
  stroke-width: 1.5;
  fill: none;
}

.card-content h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.card-content p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Table */
.version-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.version-table th, .version-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.version-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--gold-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.version-table tr:last-child td {
  border-bottom: none;
}

.version-table td {
  color: var(--text-secondary);
  vertical-align: top;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

details {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--gold-primary);
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details > div {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
}

details:focus-within {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

/* Updates & Related */
.update-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.update-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.related-list {
  list-style: none;
  columns: 2;
  column-gap: 24px;
}

.related-list li {
  break-inside: avoid;
  margin-bottom: 16px;
  padding-left: 20px;
  position: relative;
}

.related-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold-primary);
  border-radius: 50%;
}

.related-list a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 4px;
}

.related-list a:hover {
  color: var(--gold-primary);
  text-decoration: none;
}

.related-list .related-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 48px 0 32px;
  margin-top: var(--space-section);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--gold-primary);
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

/* SVG Animation Classes */
.anim-spin {
  animation: spin 16s linear infinite;
}

.anim-spin-reverse {
  animation: spin-reverse 20s linear infinite;
}

.anim-pulse {
  animation: pulse-opacity 6s ease-in-out infinite alternate;
}

.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 4s ease forwards;
}

.geo-shape {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulse-opacity {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-spin, .anim-spin-reverse, .anim-pulse, .anim-draw {
    animation: none !important;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    flex-wrap: wrap;
    gap: 16px;
  }
  .related-list {
    columns: 1;
  }
  .version-table th, .version-table td {
    padding: 12px;
    font-size: 0.9rem;
  }
}
