:root {
  --bg: #0d1117;
  --fg: #c9d1d9;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-soft: rgba(88,166,255,0.1);
  --card-bg: #161b22;
  --border: #30363d;
  --success: #3fb950;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.nav-links a {
  color: var(--fg);
  text-decoration: none;
  margin-left: 24px;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero {
  text-align: center;
  padding: 100px 20px 80px;
  position: relative;
  overflow: hidden;
  min-height: 520px;
}
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
}
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(88,166,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: pulseGlow 6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 3.2rem;
  background: linear-gradient(90deg, var(--accent), #a371f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.subtitle {
  font-size: 1.25rem;
  color: #8b949e;
  margin-bottom: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-btns { display: flex; gap: 16px; justify-content: center; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.btn-primary:hover::after {
  left: 100%;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Features */
.features { padding: 60px 20px; }
.features h2 { text-align: center; margin-bottom: 40px; font-size: 1.8rem; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: float 6s ease-in-out infinite;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(88,166,255,0.12);
  border-color: rgba(88,166,255,0.4);
}
.feature-card:nth-child(2) { animation-delay: -1s; }
.feature-card:nth-child(3) { animation-delay: -2s; }
.feature-card:nth-child(4) { animation-delay: -3s; }
.feature-card:nth-child(5) { animation-delay: -4s; }
.feature-card:nth-child(6) { animation-delay: -5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.feature-card h3 { color: var(--accent); margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: #8b949e; font-size: 0.95rem; }

/* Showcase / Compare */
.showcase { padding: 60px 20px; background: linear-gradient(180deg, transparent, rgba(88,166,255,0.03)); }
.showcase h2 { text-align: center; margin-bottom: 8px; font-size: 1.8rem; }
.section-desc { text-align: center; color: #8b949e; margin-bottom: 40px; }
.compare-table {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  transition: background 0.2s ease;
}
.compare-row:hover {
  background: rgba(88,166,255,0.04);
}
.compare-row:last-child { border-bottom: none; }
.compare-header { background: var(--card-bg); font-weight: 600; }
.compare-row .highlight { color: var(--accent); font-weight: 600; }
.compare-row span:first-child { color: #8b949e; }

/* Architecture */
.architecture { padding: 60px 20px; }
.architecture h2 { text-align: center; margin-bottom: 8px; font-size: 1.8rem; }
.arch-flow {
  max-width: 600px;
  margin: 0 auto;
  padding-top: 20px;
}
.arch-layer {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.arch-layer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(88,166,255,0.06), transparent);
  transition: left 0.6s ease;
}
.arch-layer:hover::before {
  left: 100%;
}
.arch-layer:hover {
  border-color: rgba(88,166,255,0.4);
  box-shadow: 0 4px 24px rgba(88,166,255,0.08);
}
.arch-layer h4 { color: var(--accent); margin-bottom: 6px; font-size: 1rem; }
.arch-layer p { color: #8b949e; font-size: 0.88rem; }
.arch-arrow {
  text-align: center;
  color: var(--accent);
  font-size: 1.4rem;
  padding: 8px 0;
}

/* Advanced features */
.advanced { background: linear-gradient(180deg, rgba(88,166,255,0.03), transparent); }

/* CTA */
.cta {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, transparent, rgba(88,166,255,0.05));
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(88,166,255,0.08) 0%, transparent 60%);
  border-radius: 50%;
  animation: pulseGlow 8s ease-in-out infinite;
  pointer-events: none;
}
.cta h2 { font-size: 1.8rem; margin-bottom: 12px; }
.cta p { color: #8b949e; margin-bottom: 24px; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: #6e7681;
  font-size: 0.9rem;
}

/* Download page */
.download-page { padding: 60px 20px; }
.download-page h1 { font-size: 2rem; margin-bottom: 8px; }
.version-info { color: #8b949e; margin-bottom: 32px; }
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.download-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.platform-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.download-card h3 { margin-bottom: 4px; }
.download-card p { color: #8b949e; font-size: 0.9rem; margin-bottom: 16px; }

.install-guide, .release-notes {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.install-guide h2, .release-notes h2 { margin-bottom: 16px; }
pre {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
}
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  color: #e6edf3;
}
.release-notes ul { padding-left: 20px; }
.release-notes li { margin-bottom: 8px; color: #c9d1d9; }

/* Docs page */
.docs-page {
  display: flex;
  gap: 32px;
  padding: 40px 20px;
  max-width: 1200px;
}
.docs-sidebar {
  width: 240px;
  flex-shrink: 0;
}
.docs-sidebar h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #8b949e;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.docs-sidebar ul { list-style: none; }
.docs-sidebar li { margin-bottom: 6px; }
.docs-sidebar a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
}
.docs-sidebar a:hover { background: var(--card-bg); color: var(--accent); }
.docs-content {
  flex: 1;
  min-width: 0;
}
.docs-content h1 { font-size: 2rem; margin-bottom: 16px; }
.docs-content h2 { font-size: 1.4rem; margin: 28px 0 12px; color: var(--accent); }
.docs-content h3 { font-size: 1.15rem; margin: 20px 0 8px; }
.docs-content p { margin-bottom: 12px; }
.docs-content ul { padding-left: 20px; margin-bottom: 16px; }
.docs-content li { margin-bottom: 6px; }
.docs-content a { color: var(--accent); }
.docs-content pre { margin: 16px 0; }
.docs-content code { background: rgba(110,118,129,0.15); padding: 2px 6px; border-radius: 4px; font-size: 0.88rem; }
.docs-content pre code { background: none; padding: 0; }

@media (max-width: 768px) {
  .docs-page { flex-direction: column; }
  .docs-sidebar { width: 100%; }
  .hero h1 { font-size: 2.2rem; }
  .compare-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .compare-row span:first-child { grid-column: 1 / -1; color: var(--accent); font-weight: 600; }
}
