/* === Aexyr Docs === extends AxonStellar design system === */
:root {
  --bg: #07061a;
  --bg-deep: #050414;
  --text: #e8eaf6;
  --text-dim: #a0a8d0;
  --text-muted: #6b7299;
  --accent: #b46aff;
  --accent-2: #4dd0ff;
  --accent-3: #ff5edb;
  --accent-green: #5dffa8;
  --accent-amber: #ffc857;
  --accent-red: #ff6e8a;
  --border: rgba(180, 106, 255, 0.18);
  --border-bright: rgba(180, 106, 255, 0.4);
  --surface: rgba(20, 18, 50, 0.55);
  --surface-hover: rgba(35, 30, 75, 0.7);
  --surface-code: rgba(10, 8, 28, 0.85);
  --glow: 0 0 40px rgba(180, 106, 255, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* === Background Layers === */
.nebula-bg {
  position: fixed; inset: 0;
  background: url('/assets/nebula_wallpaper.jpg') center/cover no-repeat fixed;
  z-index: -2;
  opacity: 0.4;
  filter: saturate(1.1) brightness(0.55);
}
.nebula-overlay {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(77, 208, 255, 0.06), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(180, 106, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(7, 6, 26, 0.65) 0%, rgba(7, 6, 26, 0.9) 100%);
  z-index: -1; pointer-events: none;
}

/* === Navbar === */
.navbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(7, 6, 26, 0.65);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1400px; margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 1.1rem; }
.brand-icon {
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-sub { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--text-muted); margin-left: 4px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 4px; }
.nav-links { display: flex; list-style: none; gap: 24px; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; }
.btn-primary, .btn-ghost {
  font-family: inherit; font-weight: 500; font-size: 0.88rem;
  padding: 8px 16px; border-radius: 8px; text-decoration: none; cursor: pointer;
  transition: all 0.25s; display: inline-flex; align-items: center; gap: 6px;
  border: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #8a4dff 50%, var(--accent-2) 130%);
  color: white;
  box-shadow: 0 4px 14px rgba(180, 106, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(180, 106, 255, 0.45); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-bright); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--accent); }

/* === Docs Layout === */
.docs-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

/* === Sidebar === */
.sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 12px;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
.sidebar h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 24px 0 10px;
  padding-left: 12px;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar ul { list-style: none; }
.sidebar li a {
  display: block;
  padding: 6px 12px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}
.sidebar li a:hover { color: var(--text); border-left-color: var(--border-bright); }
.sidebar li a.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(180, 106, 255, 0.08), transparent);
}

/* === Main content === */
.docs-main { max-width: 820px; min-width: 0; }

.docs-hero {
  padding: 24px 0 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.docs-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.docs-hero p {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 680px;
  line-height: 1.6;
}

.docs-section { margin-bottom: 64px; scroll-margin-top: 80px; }
.docs-section h2 {
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.docs-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 14px;
  color: var(--text);
  scroll-margin-top: 80px;
}
.docs-section h3::before {
  content: '#';
  color: var(--accent);
  margin-right: 10px;
  opacity: 0.55;
}
.docs-section p {
  color: var(--text-dim);
  margin-bottom: 14px;
  line-height: 1.7;
}
.docs-section ul, .docs-section ol {
  color: var(--text-dim);
  margin: 12px 0 18px 24px;
  line-height: 1.7;
}
.docs-section li { margin-bottom: 6px; }
.docs-section a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px dashed rgba(77, 208, 255, 0.4);
  transition: all 0.2s;
}
.docs-section a:hover { color: var(--text); border-bottom-color: var(--accent-2); }
.docs-section strong { color: var(--text); font-weight: 600; }

/* === Inline code === */
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: rgba(180, 106, 255, 0.12);
  color: #d8c2ff;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(180, 106, 255, 0.2);
}

/* === Code blocks === */
pre {
  background: var(--surface-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 18px 0;
  overflow-x: auto;
  position: relative;
}
pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 8px; right: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
pre code {
  background: transparent;
  color: var(--text);
  padding: 0;
  border: none;
  font-size: 0.86rem;
  line-height: 1.6;
  display: block;
  white-space: pre;
}
.tok-c { color: var(--text-muted); font-style: italic; }     /* comment */
.tok-k { color: var(--accent-3); }                            /* keyword */
.tok-s { color: var(--accent-green); }                        /* string */
.tok-n { color: var(--accent-2); }                            /* number */
.tok-f { color: var(--accent-amber); }                        /* function */
.tok-p { color: var(--text-dim); }                            /* punctuation */

/* === Callouts === */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px;
  border-radius: 10px;
  margin: 22px 0;
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(180, 106, 255, 0.08), rgba(180, 106, 255, 0.02));
}
.callout.info { border-left-color: var(--accent-2); background: linear-gradient(90deg, rgba(77, 208, 255, 0.08), rgba(77, 208, 255, 0.02)); }
.callout.warn { border-left-color: var(--accent-amber); background: linear-gradient(90deg, rgba(255, 200, 87, 0.08), rgba(255, 200, 87, 0.02)); }
.callout.danger { border-left-color: var(--accent-red); background: linear-gradient(90deg, rgba(255, 110, 138, 0.08), rgba(255, 110, 138, 0.02)); }
.callout.success { border-left-color: var(--accent-green); background: linear-gradient(90deg, rgba(93, 255, 168, 0.08), rgba(93, 255, 168, 0.02)); }
.callout-icon { font-size: 1.2rem; line-height: 1.4; flex-shrink: 0; }
.callout-body { flex: 1; }
.callout-body strong { display: block; margin-bottom: 4px; color: var(--text); }
.callout-body p { color: var(--text-dim); margin: 0; font-size: 0.94rem; }
.callout.info .callout-icon { color: var(--accent-2); }
.callout.warn .callout-icon { color: var(--accent-amber); }
.callout.danger .callout-icon { color: var(--accent-red); }
.callout.success .callout-icon { color: var(--accent-green); }

/* === Tables === */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
  background: rgba(10, 8, 28, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.docs-table th, .docs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.docs-table th {
  background: rgba(180, 106, 255, 0.08);
  font-weight: 600;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.docs-table td { color: var(--text-dim); }
.docs-table tr:last-child td { border-bottom: none; }
.docs-table tr:hover td { background: rgba(180, 106, 255, 0.04); }

/* === Cards (for quickstart steps) === */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.step {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  transition: all 0.25s;
}
.step:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-2);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.step h4 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.step p { font-size: 0.92rem; color: var(--text-dim); margin: 0; }

/* === Badge === */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* === Method tags (API ref) === */
.method {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-right: 8px;
}
.method.get { background: rgba(77, 208, 255, 0.15); color: var(--accent-2); border: 1px solid rgba(77, 208, 255, 0.3); }
.method.post { background: rgba(93, 255, 168, 0.15); color: var(--accent-green); border: 1px solid rgba(93, 255, 168, 0.3); }
.method.put { background: rgba(255, 200, 87, 0.15); color: var(--accent-amber); border: 1px solid rgba(255, 200, 87, 0.3); }
.method.delete { background: rgba(255, 110, 138, 0.15); color: var(--accent-red); border: 1px solid rgba(255, 110, 138, 0.3); }

/* === Footer === */
.docs-footer {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}
.docs-footer a { color: var(--text-dim); text-decoration: none; margin: 0 12px; }
.docs-footer a:hover { color: var(--text); }

/* === Responsive === */
@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; padding: 24px 20px; gap: 24px; }
  .sidebar { position: static; max-height: none; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
  .nav-links { display: none; }
  .docs-main { max-width: 100%; }
  .nav-container { padding: 14px 20px; }
}
