/* API Docs styles (extracted from api.html) */
:root {
  --sidebar-width: 280px;
  --code-sidebar-width: 520px;
  --navbar-height: 80px;
}

/* Reset and Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #fafafa;
}

[data-theme='dark'] body {
  background: #0f1419;
}

/* Layout */
.api-layout {
  display: flex;
  height: calc(100vh - var(--navbar-height));
  margin-top: var(--navbar-height);
  overflow: hidden;
}

/* Left Sidebar - Model Navigation */
.api-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
  position: fixed;
  left: 0;
  top: var(--navbar-height);
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.api-sidebar.collapsed {
  transform: translateX(-100%);
}

[data-theme='dark'] .api-sidebar {
  background: #1a1f2e;
  border-right: 1px solid #2d3748;
}

.api-sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

[data-theme='dark'] .api-sidebar-header {
  background: #1a1f2e;
  border-bottom: 1px solid #2d3748;
}

.api-sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
}

[data-theme='dark'] .api-sidebar-title {
  color: #f9fafb;
}

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
}

.sidebar-toggle-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.sidebar-toggle-btn i {
  transition: transform 0.3s ease;
}

.api-sidebar.collapsed ~ .api-content .sidebar-toggle-btn i,
.sidebar-toggle-btn.collapsed i {
  transform: rotate(180deg);
}

/* Floating toggle button when sidebar is hidden */
.sidebar-float-toggle {
  position: fixed;
  left: 1rem;
  top: calc(var(--navbar-height) + 1rem);
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.sidebar-float-toggle:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.api-sidebar.collapsed ~ .api-content .sidebar-float-toggle {
  display: flex;
}

[data-theme='dark'] .sidebar-float-toggle {
  background: #1a1f2e;
  border-color: #2d3748;
  color: #9ca3af;
}

[data-theme='dark'] .sidebar-float-toggle:hover {
  background: #1e293b;
  border-color: #475569;
  color: #d1d5db;
}

[data-theme='dark'] .sidebar-toggle-btn {
  background: #1a1f2e;
  border-color: #2d3748;
  color: #9ca3af;
}

[data-theme='dark'] .sidebar-toggle-btn:hover {
  background: #1e293b;
  border-color: #475569;
  color: #d1d5db;
}

.api-search {
  position: relative;
}

.api-search input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  background: #f9fafb;
  color: #111827;
  transition: all 0.2s;
}

.api-search input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
}

[data-theme='dark'] .api-search input {
  background: #0f1419;
  border-color: #2d3748;
  color: #f9fafb;
}

.api-search i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Navigation List */
.api-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.api-nav-group {
  border-bottom: 1px solid #f3f4f6;
}

[data-theme='dark'] .api-nav-group {
  border-bottom: 1px solid #2d3748;
}

.api-nav-group-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: #fafafa;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  transition: all 0.2s;
  user-select: none;
}

.api-nav-group-header:hover {
  background: #f3f4f6;
}

[data-theme='dark'] .api-nav-group-header {
  background: #0f1419;
  color: #d1d5db;
}

[data-theme='dark'] .api-nav-group-header:hover {
  background: #1f2937;
}

.api-nav-group-icon {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.api-nav-group-icon span:first-child {
  font-size: 1.125rem;
  line-height: 1;
}

.api-nav-group-toggle {
  font-size: 0.75rem;
  color: #9ca3af;
  transition: transform 0.2s;
}

.api-nav-group.collapsed .api-nav-group-toggle {
  transform: rotate(-90deg);
}

.api-nav-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #ffffff;
}

[data-theme='dark'] .api-nav-sublist {
  background: #1a1f2e;
}

.api-nav-group.collapsed .api-nav-sublist {
  max-height: 0;
}

.api-nav-subitem {
  margin: 0;
}

.api-nav-sublink {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.8125rem;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.api-nav-sublink:hover {
  background: #f9fafb;
  color: #111827;
}

.api-nav-sublink.active {
  background: #eff6ff;
  color: #3b82f6;
  border-left-color: #3b82f6;
  font-weight: 500;
}

[data-theme='dark'] .api-nav-sublink {
  color: #9ca3af;
}

[data-theme='dark'] .api-nav-sublink:hover {
  background: #1f2937;
  color: #f9fafb;
}

[data-theme='dark'] .api-nav-sublink.active {
  background: #1e3a5f;
  color: #60a5fa;
  border-left-color: #3b82f6;
}

.api-nav-badge {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: auto;
  flex-shrink: 0;
}

.api-nav-badge.post {
  background: #dbeafe;
  color: #1e40af;
}

[data-theme='dark'] .api-nav-badge.post {
  background: #1e3a5f;
  color: #60a5fa;
}

.api-nav-badge.get {
  background: #dcfce7;
  color: #166534;
}

[data-theme='dark'] .api-nav-badge.get {
  background: #1a3a2e;
  color: #4ade80;
}

/* Main Content Area */
.api-content {
  margin-left: var(--sidebar-width);
  margin-right: var(--code-sidebar-width);
  flex: 1;
  background: #ffffff;
  overflow-y: auto;
  height: 100%;
}

[data-theme='dark'] .api-content {
  background: #0f1419;
}

.api-main-content {
  padding: 2.5rem 3rem;
  width: 100%;
  max-width: 100%;
}

/* Breadcrumb */
.api-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.api-breadcrumb a {
  color: #3b82f6;
  text-decoration: none;
}

.api-breadcrumb a:hover {
  text-decoration: underline;
}

.api-breadcrumb-separator {
  color: #d1d5db;
}

/* Content Header */
.content-header {
  margin-bottom: 2rem;
}

.content-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

[data-theme='dark'] .content-label {
  background: #1e3a5f;
  color: #60a5fa;
}

.content-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

[data-theme='dark'] .content-title {
  color: #f9fafb;
}

.content-description {
  font-size: 1.125rem;
  color: #6b7280;
  line-height: 1.6;
}

/* Endpoint Section */
.endpoint-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

[data-theme='dark'] .endpoint-section {
  background: #1a1f2e;
  border-color: #2d3748;
}

.endpoint-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: #3b82f6;
  color: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.endpoint-path {
  font-family: 'Fira Code', 'Courier New', monospace;
  color: #111827;
  font-size: 0.9375rem;
  font-weight: 500;
}

[data-theme='dark'] .endpoint-path {
  color: #f9fafb;
}

/* Content Sections */
.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

[data-theme='dark'] .content-section h2 {
  color: #f9fafb;
  border-bottom-color: #2d3748;
}

.content-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 1.5rem 0 0.75rem;
}

[data-theme='dark'] .content-section h3 {
  color: #f9fafb;
}

.content-section p {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1rem;
}

[data-theme='dark'] .content-section p {
  color: #9ca3af;
}

.content-section ul {
  color: #4b5563;
  line-height: 1.8;
  margin-left: 1.5rem;
}

[data-theme='dark'] .content-section ul {
  color: #9ca3af;
}

/* Parameter Table */
.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

[data-theme='dark'] .param-table {
  background: #1a1f2e;
  border-color: #2d3748;
}

.param-table th {
  text-align: left;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.8125rem;
}

[data-theme='dark'] .param-table th {
  background: #0f1419;
  color: #d1d5db;
  border-bottom-color: #2d3748;
}

.param-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #6b7280;
  vertical-align: top;
}

[data-theme='dark'] .param-table td {
  border-bottom-color: #2d3748;
  color: #9ca3af;
}

.param-table tr:last-child td {
  border-bottom: none;
}

.param-name {
  font-family: 'Fira Code', 'Courier New', monospace;
  color: #059669;
  font-weight: 600;
  font-size: 0.8125rem;
}

[data-theme='dark'] .param-name {
  color: #34d399;
}

.param-type {
  font-family: 'Fira Code', 'Courier New', monospace;
  color: #6b7280;
  font-size: 0.8125rem;
}

.param-required {
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 600;
}

.param-default {
  font-family: 'Fira Code', 'Courier New', monospace;
  color: #7c3aed;
  font-size: 0.8125rem;
}

[data-theme='dark'] .param-default {
  color: #a78bfa;
}

/* Code Example in Main Content */
.code-example-inline {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

[data-theme='dark'] .code-example-inline {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

.code-example-inline pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.75;
  color: #1f2937;
  background: transparent;
}

[data-theme='dark'] .code-example-inline pre {
  color: #e2e8f0;
}

/* Improve code syntax highlighting */
.code-example-inline pre code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* Custom scrollbar for code blocks */
.code-example-inline pre::-webkit-scrollbar {
  height: 8px;
}

.code-example-inline pre::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.code-example-inline pre::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.code-example-inline pre::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

[data-theme='dark'] .code-example-inline pre::-webkit-scrollbar-track {
  background: #1e293b;
}

[data-theme='dark'] .code-example-inline pre::-webkit-scrollbar-thumb {
  background: #475569;
}

[data-theme='dark'] .code-example-inline pre::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Right Sidebar - Code Preview */
.api-right-sidebar {
  width: var(--code-sidebar-width);
  background: #fafafa;
  border-left: 1px solid #e5e7eb;
  position: fixed;
  right: 0;
  top: var(--navbar-height);
  bottom: 0;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  height: calc(100vh - var(--navbar-height));
  transition: width 0.1s ease;
}

[data-theme='dark'] .api-right-sidebar {
  background: #0a0e14;
  border-left: 1px solid #2d3748;
}

/* Right Sidebar Resize Handle */
.api-right-sidebar-resize {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  z-index: 101;
  transition: background 0.2s;
}

.api-right-sidebar-resize:hover {
  background: #3b82f6;
}

.api-right-sidebar-resize:active,
.api-right-sidebar-resize.resizing {
  background: #2563eb;
}

.code-preview-section {
  margin-bottom: 2rem;
}

.code-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.code-preview-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

[data-theme='dark'] .code-preview-title {
  color: #f9fafb;
}

.code-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.code-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #374151;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.code-copy-btn:hover {
  background: #f9fafb;
  border-color: #3b82f6;
  color: #3b82f6;
}

.code-copy-btn:active {
  transform: scale(0.98);
}

.code-copy-btn.copied {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.code-copy-btn.copied .copy-text {
  display: inline;
}

.code-copy-btn .copy-text {
  display: inline;
}

.code-copy-btn i {
  font-size: 0.75rem;
}

[data-theme='dark'] .code-copy-btn {
  background: #1a1f2e;
  border-color: #2d3748;
  color: #d1d5db;
}

[data-theme='dark'] .code-copy-btn:hover {
  background: #1e293b;
  border-color: #3b82f6;
  color: #60a5fa;
}

[data-theme='dark'] .code-copy-btn.copied {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.code-lang-select {
  padding: 0.375rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #374151;
  font-size: 0.8125rem;
  cursor: pointer;
}

[data-theme='dark'] .code-lang-select {
  background: #1a1f2e;
  border-color: #2d3748;
  color: #d1d5db;
}

.code-example {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

[data-theme='dark'] .code-example {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

.code-example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

[data-theme='dark'] .code-example-header {
  background: #0f172a;
  border-bottom-color: #334155;
}

.code-example-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.025em;
}

[data-theme='dark'] .code-example-title {
  color: #e2e8f0;
}

.code-example-body {
  padding: 1.5rem;
  overflow-x: auto;
  background: #ffffff;
}

[data-theme='dark'] .code-example-body {
  background: #1e293b;
}

.code-example pre {
  margin: 0;
  font-family: 'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.75;
  color: #1f2937;
  background: transparent;
}

[data-theme='dark'] .code-example pre {
  color: #e2e8f0;
}

/* Improve code syntax highlighting in code-example */
.code-example pre code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* Custom scrollbar for code-example blocks */
.code-example pre::-webkit-scrollbar {
  height: 8px;
}

.code-example pre::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.code-example pre::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.code-example pre::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

[data-theme='dark'] .code-example pre::-webkit-scrollbar-track {
  background: #1e293b;
}

[data-theme='dark'] .code-example pre::-webkit-scrollbar-thumb {
  background: #475569;
}

[data-theme='dark'] .code-example pre::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Response Tabs */
.response-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0;
  overflow-x: auto;
}

[data-theme='dark'] .response-tabs {
  border-bottom-color: #2d3748;
}

.response-tab {
  padding: 0.625rem 1rem;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  white-space: nowrap;
}

.response-tab:hover {
  color: #111827;
  background: #f9fafb;
}

.response-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  font-weight: 600;
}

[data-theme='dark'] .response-tab {
  color: #9ca3af;
}

[data-theme='dark'] .response-tab:hover {
  color: #f9fafb;
  background: #1a1f2e;
}

[data-theme='dark'] .response-tab.active {
  color: #60a5fa;
  border-bottom-color: #3b82f6;
}

.response-content {
  display: none;
}

.response-content.active {
  display: block;
}

/* Request Tabs (for seedream-4.0) */
.request-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1rem;
  overflow-x: auto;
}

[data-theme='dark'] .request-tabs {
  border-bottom-color: #2d3748;
}

.request-tab {
  padding: 0.625rem 1rem;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  white-space: nowrap;
}

.request-tab:hover {
  color: #111827;
  background: #f9fafb;
}

.request-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  font-weight: 600;
}

[data-theme='dark'] .request-tab {
  color: #9ca3af;
}

[data-theme='dark'] .request-tab:hover {
  color: #f9fafb;
  background: #1a1f2e;
}

[data-theme='dark'] .request-tab.active {
  color: #60a5fa;
  border-bottom-color: #3b82f6;
}

.request-content {
  display: none;
}

.request-content.active {
  display: block;
}

/* Inline Code */
code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  color: #dc2626;
}

[data-theme='dark'] code {
  background: #1f2937;
  color: #f87171;
}

/* Footer at bottom of scrollable content */
.api-content .footer {
  margin: 0;
  width: 100%;
}


/* Responsive */
@media (max-width: 1200px) {
  :root {
    --code-sidebar-width: 400px;
  }
  .api-right-sidebar {
    width: var(--code-sidebar-width);
  }
  .api-content {
    margin-right: var(--code-sidebar-width);
  }
}

@media (max-width: 1000px) {
  .api-right-sidebar {
    display: none;
  }
  .api-content {
    margin-right: 0;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }
  .api-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .api-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 6px -1px rgba(0, 0, 0, 0.1);
  }
  .api-content {
    margin-left: 0;
  }
  .api-main-content {
    padding: 2rem 1.5rem;
  }
  .mobile-menu-toggle {
    display: block;
    position: fixed;
    left: 1rem;
    bottom: 1.5rem;
    z-index: 101;
    padding: 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 1025px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Scrollbar Styling */
.api-sidebar::-webkit-scrollbar,
.api-right-sidebar::-webkit-scrollbar {
  width: 6px;
}

.api-sidebar::-webkit-scrollbar-track,
.api-right-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.api-sidebar::-webkit-scrollbar-thumb,
.api-right-sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.api-sidebar::-webkit-scrollbar-thumb:hover,
.api-right-sidebar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

[data-theme='dark'] .api-sidebar::-webkit-scrollbar-thumb,
[data-theme='dark'] .api-right-sidebar::-webkit-scrollbar-thumb {
  background: #374151;
}

/* Resize handle */
.api-sidebar-resize {
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  z-index: 101;
  transition: background 0.2s;
}

.api-sidebar-resize:hover {
  background: #3b82f6;
}

.api-sidebar-resize:active {
  background: #2563eb;
}

.api-sidebar.collapsed .api-sidebar-resize {
  display: none;
}

/* Adjust content margin when sidebar is collapsed */
.api-sidebar.collapsed ~ .api-content {
  margin-left: 0 !important;
}

/* API Section Styles */
.api-section {
  padding: 6rem 0;
}

.api-content {
  /*display: grid;*/
  /*grid-template-columns: 1fr 1.5fr;*/
  /*gap: 2rem;*/
  /*align-items: start;*/
}

.api-info-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* height: 100%; */
}

.api-info {
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
}

[data-theme='dark'] .api-info {
  background: rgba(20, 25, 40, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.api-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.api-info p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.9375rem;
}

.api-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.api-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.feature-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.api-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feature-item {
  padding: 0.5rem 0;
}

.feature-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.feature-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.api-code {
  padding: 0;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

[data-theme='dark'] .api-code {
  background: rgba(20, 25, 40, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border-color);
}

[data-theme='dark'] .code-header {
  background: rgba(30, 35, 50, 0.5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.code-tabs {
  display: flex;
  gap: 0.5rem;
}

.code-tab {
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.code-tab:hover {
  color: var(--text-primary);
}

.code-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.code-content {
  position: relative;
  flex: 1;
  overflow: auto;
}

.code-block {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-secondary);
  display: none;
}

.code-block.active {
  display: block;
}

.api-code code {
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .api-content {
    grid-template-columns: 1fr;
  }
  
  .api-features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .api-section {
    padding: 4rem 0;
  }
  
  .api-info {
    padding: 1.25rem;
  }
  
  .code-block {
    padding: 1rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .api-section {
    padding: 3rem 0;
  }
  
  .api-info {
    padding: 1rem;
  }
  
  .api-info h3 {
    font-size: 1.125rem;
  }
  
  .code-tabs {
    overflow-x: auto;
  }
  
  .code-tab {
    padding: 0.625rem 0.75rem;
    font-size: 0.6875rem;
  }
  
  .code-block {
    font-size: 0.625rem;
  }
}

/* Enhanced Highlight.js syntax highlighting styles */
.hljs {
  display: block;
  overflow-x: auto;
  padding: 0;
  background: transparent;
}

/* Improve readability for highlighted code */
.code-example-inline .hljs,
.code-example .hljs {
  background: transparent;
  padding: 0;
}

/* Bash/Shell specific styles */
.hljs-built_in,
.hljs-selector-tag,
.hljs-section,
.hljs-link {
  font-weight: 600;
}

/* JSON specific styles */
.hljs-attr {
  color: #0ea5e9;
}

[data-theme='dark'] .hljs-attr {
  color: #38bdf8;
}

.hljs-string {
  color: #10b981;
}

[data-theme='dark'] .hljs-string {
  color: #34d399;
}

.hljs-number {
  color: #f59e0b;
}

[data-theme='dark'] .hljs-number {
  color: #fbbf24;
}

.hljs-literal {
  color: #8b5cf6;
}

[data-theme='dark'] .hljs-literal {
  color: #a78bfa;
}

.hljs-keyword {
  color: #ef4444;
  font-weight: 600;
}

[data-theme='dark'] .hljs-keyword {
  color: #f87171;
}

.hljs-comment {
  color: #6b7280;
  font-style: italic;
}

[data-theme='dark'] .hljs-comment {
  color: #94a3b8;
}

/* Ensure code doesn't break lines unnecessarily */
.hljs {
  white-space: pre;
  word-wrap: normal;
}

/* Smooth transitions for code elements */
.hljs * {
  transition: color 0.2s ease;
}

