:root {
  --color-bg: #0a0f1d;
  --color-surface: #111827;
  --color-surface-hover: #1a2332;
  --color-primary: #0ea5e9;
  --color-accent: #00f0ff;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-focus: var(--color-primary);
  --font-main: ui-rounded, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --spacing-section: clamp(60px, 10vw, 120px);
  --max-width: 1200px;
  --header-height: 72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.3;
  text-wrap: balance;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-text);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  margin-bottom: clamp(16px, 3vw, 32px);
  color: var(--color-text);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 500;
  margin-bottom: 8px;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

/* Layout Sections */
section {
  padding: var(--spacing-section) 0;
  position: relative;
}

.section-bg {
  background: linear-gradient(180deg, transparent 0%, rgba(14, 165, 233, 0.05) 50%, transparent 100%);
}

/* Header & Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img {
  width: 140px;
  height: 42px;
  object-fit: contain;
  vertical-align: middle;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

nav a:hover, nav a:focus-visible {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
  outline: none;
}

nav a[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.site-footer {
  padding: 60px 0 30px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: var(--color-text);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-col a:hover, .footer-col a:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.footer-bottom {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #000;
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.55);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-3px);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid > * {
  min-width: 0;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  white-space: normal;
  word-break: break-word;
}

th {
  background: rgba(14, 165, 233, 0.08);
  font-weight: 600;
  color: var(--color-text);
}

td {
  color: var(--color-text-muted);
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

details {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

summary::-webkit-details-marker { display: none; }
summary::marker { display: none; content: ""; }

summary:hover, summary:focus-visible {
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}

summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  padding: 0 24px 20px;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin: 0;
}

/* Cards (Updates) */
.update-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.update-meta {
  font-size: 0.85rem;
  color: var(--color-accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.update-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.update-link {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.update-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Related Links */
.related-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.related-item {
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.related-item:hover {
  border-color: var(--color-primary);
}

.related-title {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.related-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* SVG Animation Classes */
@keyframes star-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes dash-draw {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes float-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.star {
  animation: star-twinkle 5s ease-in-out infinite;
}

.line-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dash-draw 8s ease-in-out infinite;
}

.float-group {
  animation: float-pulse 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .star, .line-draw, .float-group {
    animation: none !important;
  }
  .line-draw {
    stroke-dashoffset: 0;
  }
}

/* Utility & Focus */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

svg[aria-hidden="true"] {
  display: block;
}

.icon-svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  color: var(--color-accent);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.15);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 12px;
  flex-shrink: 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.step-item p {
  margin: 0;
  padding-top: 2px;
}

.cta-box {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(0, 240, 255, 0.06));
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 64px);
  text-align: center;
  margin-top: 40px;
}

.cta-box h2 {
  margin-bottom: 16px;
}

.cta-box p {
  max-width: 600px;
  margin: 0 auto 24px;
  color: var(--color-text);
}
