:root {
  --color-bg: #0d0a1c;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --color-surface-glass: rgba(255, 255, 255, 0.06);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #f0f2f5;
  --color-text-muted: #9ca3b8;
  --color-primary: #c247cc;
  --color-secondary: #6b2cf5;
  --color-accent: #f472b6;
  --gradient-main: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  --gradient-subtle: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --spacing-section: clamp(64px, 10vw, 140px);
  --spacing-container: clamp(16px, 4vw, 48px);
  --font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --line-height: 1.75;
  --content-max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  line-height: var(--line-height);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--spacing-container);
}

.section {
  padding-block: var(--spacing-section);
  position: relative;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: clamp(24px, 3vw, 48px);
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}

.text-muted {
  color: var(--color-text-muted);
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(13, 10, 28, 0.75);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-name {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.nav-list {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  position: relative;
  padding-block: 4px;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-text);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 16px rgba(194, 71, 204, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(194, 71, 204, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  background: var(--color-surface);
  border-color: rgba(255,255,255,0.2);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--gradient-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Tables */
.version-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.version-table th, .version-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.version-table th {
  background: rgba(255,255,255,0.03);
  font-weight: 600;
  color: var(--color-text);
}

.version-table tr:last-child td {
  border-bottom: none;
}

.version-table td {
  color: var(--color-text-muted);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: background 0.2s ease;
}

.faq-item details[open] {
  background: var(--color-surface-glass);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.faq-item details[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .answer {
  margin-top: 12px;
  color: var(--color-text-muted);
  line-height: 1.65;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* Updates & Related */
.update-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.view-btn {
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 500;
  padding: 0;
  transition: opacity 0.2s;
}

.view-btn:hover {
  opacity: 0.8;
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
}

.related-item a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: border-color 0.2s;
}

.related-item a:hover {
  border-color: var(--color-primary);
}

.related-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.related-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* SVG Animation Classes */
.ring-anim {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-ring 6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}

.arc-anim {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-arc 8s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}

.pulse-anim {
  animation: pulse-opacity 4s ease-in-out infinite;
}

@keyframes draw-ring {
  0% { stroke-dashoffset: 1; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

@keyframes draw-arc {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Footer */
.site-footer {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--color-border);
  padding: clamp(40px, 6vw, 80px) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--color-text);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col li a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .version-table { font-size: 0.9rem; }
  .version-table th, .version-table td { padding: 10px 12px; }
}
