:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #12131c;
  --bg-tertiary: #1a1c29;
  --border: #26293d;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-green: #10b981;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --code-bg: #07080c;
  --sidebar-width: 280px;
  --header-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}

.brand-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-github {
  background: var(--bg-tertiary);
  color: #fff;
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-github:hover {
  border-color: var(--accent-cyan);
  background: #222638;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Layout */
.docs-layout {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  background: var(--bg-primary);
}

.search-box {
  margin-bottom: 1.5rem;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
}

.nav-group {
  margin-bottom: 1.5rem;
}

.nav-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.nav-items {
  list-style: none;
}

.nav-items li a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.nav-items li a:hover,
.nav-items li a.active {
  background: var(--bg-secondary);
  color: var(--accent-cyan);
}

/* Main Content */
.content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem;
  max-width: 960px;
}

section {
  margin-bottom: 4rem;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.25;
  color: #fff;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #fff;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
}

p {
  margin-bottom: 1.25rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
}

li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

strong {
  color: #fff;
}

/* Callout Cards */
.callout {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  font-size: 0.9rem;
}

.callout p {
  margin-bottom: 0;
  color: var(--text-main);
}

.callout-info {
  background: rgba(6, 182, 212, 0.08);
  border-left-color: var(--accent-cyan);
}

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

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

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

/* Steps Grid */
.step-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-num {
  background: var(--accent-cyan);
  color: #000;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.step-title {
  font-weight: 600;
  color: #fff;
  font-size: 1.05rem;
}

/* Code Blocks */
.code-wrapper {
  position: relative;
  margin: 1rem 0 1.5rem 0;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: #0d0f16;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: var(--bg-tertiary);
  color: #fff;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e2e8f0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: #38bdf8;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Key Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.25rem 0;
}

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

th, td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}

th {
  background: var(--bg-secondary);
  color: #fff;
  font-weight: 600;
}

tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    z-index: 99;
    width: 80%;
    max-width: 320px;
    background: var(--bg-primary);
    transition: left 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  .sidebar.open {
    left: 0;
  }

  .content {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }
}
