:root {
  --bg-main: #050505;
  --bg-sidebar: #0a0a0a;
  --bg-card: #121212;
  --bg-code: #0d0d0d;
  
  --text-main: #ffffff;
  --text-muted: #888888;
  --border-color: #222222;
  
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.1);
  --error: #ef4444;
  --warning: #f59e0b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px; /* Accounts for scrolling to anchor links */
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ================== LAYOUT ================== */
.docs-container {
  display: flex;
  min-height: 100vh;
}

/* ================== SIDEBAR ================== */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar .logo {
  padding: 24px 24px 16px;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.sidebar .logo i {
  color: var(--accent);
}

.sidebar-nav {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.sidebar-nav a:hover {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 16px 8px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================== MAIN CONTENT ================== */
.content {
  flex: 1;
  padding: 60px 5%;
  max-width: 900px;
  margin: 0 auto;
}

/* Typography & Headers */
.badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-bottom: 16px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  color: #e4e4e7;
}

.doc-section {
  margin-bottom: 60px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-section p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Code & Endpoints */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 16px;
}

.code-block pre {
  padding: 16px 20px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #a3e635; /* Subtle green tint for JSON/Code */
  overflow-x: auto;
}

.endpoint {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.endpoint .method {
  color: var(--accent);
  font-weight: 600;
  margin-right: 12px;
}

code {
  font-family: 'Fira Code', monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* Example Grid */
.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 8px;
}

.example-card span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.example-card code {
  display: block;
  background: transparent;
  padding: 0;
  color: var(--text-main);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  text-align: left;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  font-size: 0.9rem;
}

td code {
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.status-error { color: var(--error); font-family: 'Fira Code', monospace;}
.status-warning { color: var(--warning); font-family: 'Fira Code', monospace;}

/* Lists */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #ccc;
}

.feature-list li::before {
  content: "→";
  color: var(--accent);
  margin-right: 12px;
  font-weight: bold;
}

.feature-list strong {
  color: var(--text-main);
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
  .docs-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
    gap: 12px;
    white-space: nowrap;
  }
  
  .sidebar-divider, .back-link {
    display: none; /* Hide on mobile to save space */
  }
  
  .content {
    padding: 40px 20px;
  }
}