/* Docs Page Layout */
.docs-page {
  display: flex;
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

/* Sidebar */
.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-section h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-section li {
  margin-bottom: 4px;
}

.sidebar-section a {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.sidebar-section a:hover {
  color: var(--text-primary);
  background: rgba(102, 126, 234, 0.1);
}

.sidebar-section a.active {
  color: var(--primary);
  background: rgba(102, 126, 234, 0.15);
  font-weight: 500;
}

/* Main Content */
.docs-main {
  flex: 1;
  padding: 32px 48px;
  max-width: 900px;
}

.docs-section {
  margin-bottom: 64px;
  scroll-margin-top: 100px;
}

.docs-section h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.docs-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
}

.section-intro {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Info Box */
.info-box {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 8px;
  margin: 20px 0;
}

.info-box.warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.2);
}

.info-icon { font-size: 20px; }

.info-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

.info-content code {
  background: rgba(0,0,0,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* Endpoint Box */
.endpoint-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 16px 0;
}

.endpoint-box code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

.method {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.method.get { background: #10b981; color: white; }
.method.post { background: #3b82f6; color: white; }

/* Code Block */
.code-block {
  position: relative;
  background: #1a1b26;
  border-radius: 0 0 8px 8px;
  padding: 20px;
  overflow-x: auto;
}

.tab-content:first-of-type .code-block,
.code-tabs:not(:has(.tab-buttons)) .code-block {
  border-radius: 8px;
}

.code-block pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.code-block code {
  font-family: 'JetBrains Mono', monospace;
}

.copy-code-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.copy-code-btn:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.copy-code-btn.copied {
  background: #22c55e;
  color: white;
}

/* Syntax Highlighting */
.code-keyword { color: #bb9af7; }
.code-string { color: #9ece6a; }
.code-comment { color: #565f89; }
.code-number { color: #ff9e64; }
.code-function { color: #7aa2f7; }

/* Parameter Table */
.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.param-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.param-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.param-table code {
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* Models Table */
.models-table {
  overflow-x: auto;
  margin: 20px 0;
}

.models-table table {
  width: 100%;
  border-collapse: collapse;
}

.models-table th,
.models-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.models-table th {
  background: var(--bg-secondary);
  font-weight: 600;
}

.models-table td {
  color: var(--text-secondary);
}

.models-table code {
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* Steps List */
.steps-list {
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 2;
}

.steps-list a {
  color: var(--primary);
}

.link-arrow {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .docs-page {
    flex-direction: column;
  }
  .docs-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-section {
    display: inline-block;
    margin-right: 24px;
    margin-bottom: 16px;
  }
  .sidebar-section ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .docs-main {
    padding: 24px;
  }
}

/* API Style Toggle */
.api-style-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.style-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.style-btn:hover {
  border-color: rgba(102, 126, 234, 0.5);
}

.style-btn.active {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.1);
}

.style-icon { font-size: 28px; }

.style-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.style-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* API Style Content */
.api-style-content {
  display: none;
}

.api-style-content.active {
  display: block;
}

/* Dual Endpoints */
.dual-endpoints {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.endpoint-card {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.endpoint-card.openai {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.endpoint-card.ollama {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.2);
}

.endpoint-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.endpoint-card .endpoint-box {
  margin: 0;
}

.endpoint-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive for dual endpoints */
@media (max-width: 600px) {
  .api-style-toggle,
  .dual-endpoints {
    grid-template-columns: 1fr;
  }
}

