/* ============================================================
   VeloxaHost Docs — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-400: #2dd4bf;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --teal-400:  #2dd4bf;
  --teal-500:  #14b8a6;
  --purple-400:#a78bfa;

  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #070d1a;

  --sidebar-w: 260px;
  --nav-h:     64px;
  --radius:    10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gray-950);
  color: var(--gray-200);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: #fff; letter-spacing: -0.02em; }

a { color: var(--brand-400); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: 'JetBrains Mono', monospace; font-size: 0.875em; }

pre {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}

code:not(pre code) {
  background: var(--gray-800);
  color: var(--teal-400);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.875em;
}

/* ── Nav ──────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(7,13,26,0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand-500), var(--purple-400));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
}

.nav-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.75rem;
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: 50px;
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.nav-search input:focus { border-color: var(--brand-500); }
.nav-search input::placeholder { color: var(--gray-500); }

.nav-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  padding: 0.4rem 0.8rem;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.05); }

.nav-cta {
  padding: 0.4rem 1rem;
  border-radius: 8px;
  background: var(--brand-600);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s;
  text-decoration: none;
}
.nav-cta:hover { background: var(--brand-500); text-decoration: none; }

/* ── Layout ───────────────────────────────────────── */
.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

/* ── Sidebar ──────────────────────────────────────── */
.docs-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: var(--nav-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  border-right: 1px solid var(--gray-800);
  padding: 1.75rem 0 3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-700) transparent;
}

.sidebar-section {
  margin-bottom: 1.75rem;
  padding: 0 1rem;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  padding: 0 0.5rem;
  margin-bottom: 0.4rem;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-nav a {
  display: block;
  padding: 0.42rem 0.65rem;
  font-size: 0.85rem;
  color: var(--gray-400);
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  font-weight: 450;
}

.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-nav a.active { color: var(--brand-400); background: rgba(59,130,246,0.08); font-weight: 600; }

.sidebar-nav .sub { padding-left: 1.25rem; font-size: 0.825rem; }

/* ── Main Content ─────────────────────────────────── */
.docs-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  padding: 3rem 4rem;
  max-width: 860px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--gray-400); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb-sep { color: var(--gray-700); }

.docs-content h1 { font-size: 2.25rem; margin-bottom: 0.75rem; }
.docs-content .lead {
  font-size: 1.1rem;
  color: var(--gray-400);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-800);
}

.docs-content h2 {
  font-size: 1.45rem;
  margin: 2.25rem 0 0.875rem;
  padding-top: 0.5rem;
}

.docs-content h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.625rem;
  color: var(--gray-100);
}

.docs-content p {
  color: var(--gray-300);
  line-height: 1.8;
  margin-bottom: 1.1rem;
  font-size: 0.975rem;
}

.docs-content ul, .docs-content ol {
  color: var(--gray-300);
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
  font-size: 0.975rem;
  line-height: 1.8;
}

.docs-content li { margin-bottom: 0.3rem; }

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.docs-content th {
  background: var(--gray-800);
  color: var(--gray-200);
  font-weight: 600;
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-700);
}

.docs-content td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--gray-800);
  color: var(--gray-300);
}

.docs-content tr:last-child td { border-bottom: none; }

.docs-content blockquote {
  border-left: 3px solid var(--brand-500);
  padding: 0.4rem 0 0.4rem 1.25rem;
  margin: 1.25rem 0;
  color: var(--gray-400);
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--gray-800);
  margin: 2rem 0;
}

/* Callouts */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  font-size: 0.925rem;
}

.callout p { margin: 0; color: var(--gray-300); font-size: 0.925rem; }
.callout-note { background: rgba(59,130,246,0.07); border: 1px solid rgba(59,130,246,0.2); }
.callout-tip  { background: rgba(20,184,166,0.07); border: 1px solid rgba(20,184,166,0.2); }
.callout-warn { background: rgba(234,179,8,0.07);  border: 1px solid rgba(234,179,8,0.2); }
.callout-danger { background: rgba(239,68,68,0.07); border: 1px solid rgba(239,68,68,0.2); }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-get    { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-post   { background: rgba(59,130,246,0.15); color: var(--brand-400); }
.badge-put    { background: rgba(249,115,22,0.15); color: #fb923c; }
.badge-delete { background: rgba(239,68,68,0.15);  color: #f87171; }

/* On-page TOC (right side) */
.docs-toc {
  position: fixed;
  top: calc(var(--nav-h) + 2rem);
  right: 0;
  width: 220px;
  padding: 0 1.5rem;
}

.docs-toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

.docs-toc-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }

.docs-toc-list a {
  font-size: 0.8rem;
  color: var(--gray-500);
  display: block;
  padding: 3px 0;
  transition: color 0.15s;
  text-decoration: none;
}

.docs-toc-list a:hover { color: var(--brand-400); }
.docs-toc-list .sub { padding-left: 0.75rem; }

/* ── Cards (homepage) ─────────────────────────────── */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.doc-card {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  display: block;
}

.doc-card:hover {
  border-color: var(--gray-700);
  transform: translateY(-2px);
  text-decoration: none;
}

.doc-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.875rem;
}

.doc-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.doc-card p  { font-size: 0.825rem; color: var(--gray-500); margin: 0; line-height: 1.6; }

/* ── Footer ───────────────────────────────────────── */
.docs-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.docs-footer-links { display: flex; gap: 1.25rem; list-style: none; }
.docs-footer-links a { font-size: 0.825rem; color: var(--gray-500); text-decoration: none; }
.docs-footer-links a:hover { color: var(--gray-300); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1200px) {
  .docs-toc { display: none; }
  .docs-main { max-width: 100%; }
}

@media (max-width: 768px) {
  .docs-sidebar { display: none; }
  .docs-main { margin-left: 0; padding: 2rem 1.25rem; }
}
