:root {
  --bg-deep: #0a0f1c;
  --bg-surface: #111827;
  --bg-card: #1f2937;
  --bg-card-hover: #263045;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-neon: #00e5ff;
  --accent-glow: rgba(0, 229, 255, 0.35);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --spacing-section: clamp(3.5rem, 8vw, 7rem);
  --spacing-element: clamp(1rem, 2.5vw, 1.5rem);
  --max-width: 1240px;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --line-height-loose: 1.75;
}

*, *::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-deep);
  color: var(--text-primary);
  line-height: var(--line-height-loose);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-element);
}

/* Typography */
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-element);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
}

.section {
  padding: var(--spacing-section) 0;
  position: relative;
}

.section-grid {
  display: grid;
  gap: var(--spacing-section);
}

.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-element);
  align-items: center;
}

@media (max-width: 900px) {
  .section-split {
    grid-template-columns: 1fr;
  }
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.8rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  padding: 0.5rem 0;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--accent-neon);
}

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-neon);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 229, 255, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-neon);
  outline-offset: 3px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* Feature Item */
.feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-card);
  color: var(--accent-cyan);
  font-weight: 600;
}

td {
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* Details / FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

details {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s ease;
}

details[open] {
  border-color: rgba(0, 229, 255, 0.3);
}

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent-cyan);
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin-top: 0.85rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Updates Cards */
.update-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.update-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.update-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.update-title {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.update-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex-grow: 1;
}

.update-link {
  align-self: flex-start;
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 500;
  margin-top: auto;
}

.update-link:hover {
  text-decoration: underline;
}

/* Related Links */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.related-item {
  padding: 0.75rem;
  border-left: 2px solid var(--border-subtle);
  transition: border-color 0.2s ease;
}

.related-item:hover {
  border-left-color: var(--accent-neon);
}

.related-title {
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.35rem;
}

.related-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--accent-neon);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* SVG Animations */
@keyframes grid-pulse {
  0%, 100% { opacity: 0.25; filter: drop-shadow(0 0 0px transparent); }
  50% { opacity: 1; fill: var(--accent-neon); filter: drop-shadow(0 0 6px var(--accent-glow)); }
}

.grid-node {
  animation: grid-pulse 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.delay-1 { animation-delay: 0.0s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.8s; }
.delay-4 { animation-delay: 1.2s; }
.delay-5 { animation-delay: 1.6s; }
.delay-6 { animation-delay: 2.0s; }
.delay-7 { animation-delay: 2.4s; }
.delay-8 { animation-delay: 2.8s; }
.delay-9 { animation-delay: 3.2s; }
.delay-10 { animation-delay: 3.6s; }
.delay-11 { animation-delay: 4.0s; }
.delay-12 { animation-delay: 4.4s; }
.delay-13 { animation-delay: 4.8s; }
.delay-14 { animation-delay: 5.2s; }
.delay-15 { animation-delay: 5.6s; }
.delay-16 { animation-delay: 6.0s; }

svg[data-animation="grid"] circle {
  transition: fill 0.3s ease, opacity 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grid-node { animation: none !important; opacity: 0.6; }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.accent-text { color: var(--accent-cyan); }
.bg-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}
