:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(59, 130, 246, 0.3);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --code-bg: #030712;
  --nav-height: 72px;
  --max-width: 1240px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 30px -5px rgba(59, 130, 246, 0.25);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 40%),
              radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.06), transparent 40%),
              var(--bg-primary);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-cyan);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-brand svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-cyan);
}

.nav-brand span.badge-version {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 2px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}

.hero-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 820px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Hero Stats / Badges */
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 60px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.badge-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-cyan);
}

.badge-item strong {
  color: var(--text-primary);
}

/* Terminal / Quickstart Window */
.terminal-window {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  max-width: 900px;
  margin: 0 auto 80px;
  overflow: hidden;
  text-align: left;
}

.terminal-header {
  background: #111827;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-tabs {
  display: flex;
  gap: 4px;
}

.terminal-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
}

.terminal-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: #e5e7eb;
}

.terminal-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.terminal-prompt {
  color: var(--accent-green);
  user-select: none;
  margin-right: 12px;
}

.terminal-cmd {
  color: #f3f4f6;
  flex-grow: 1;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* Sections */
.section {
  padding: 80px 0;
  position: relative;
}

.section-alt {
  background: rgba(17, 24, 39, 0.4);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.section-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-glow);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-card-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon-wrapper svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-cyan);
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Protocol Pills */
.protocol-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.protocol-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* Platform Download Cards */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.download-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.download-os-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-os-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-cyan);
}

.download-card-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.download-card-type {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-file-list {
  list-style: none;
  margin: 16px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.download-file-item span.size {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Documentation Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
  padding-right: 16px;
}

.docs-nav-group {
  margin-bottom: 24px;
}

.docs-nav-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-nav-list a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: block;
  transition: all 0.2s ease;
}

.docs-nav-list a:hover,
.docs-nav-list a.active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.1);
  border-left: 2px solid var(--accent-blue);
}

.docs-content {
  min-width: 0;
}

.docs-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.docs-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.docs-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.docs-content p,
.docs-content ul,
.docs-content ol {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
  padding-left: 24px;
}

.docs-content li {
  margin-bottom: 8px;
}

.docs-content code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.docs-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}

.docs-content pre code {
  background: transparent;
  color: #e5e7eb;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Callout Box */
.callout {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  border-left: 4px solid var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

.callout.warning {
  border-left-color: var(--accent-orange);
  background: rgba(245, 158, 11, 0.08);
}

.callout.success {
  border-left-color: var(--accent-green);
  background: rgba(16, 185, 129, 0.08);
}

.callout.danger {
  border-left-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.08);
}

.callout-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: #111827;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Footer */
footer {
  margin-top: auto;
  background: #070a11;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-links.show {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
