.api-docs-page {
  background: #0b0f17;
}

.api-docs-main {
  padding-top: 0;
  width: 100%;
}

.api-docs-page code,
.api-docs-page pre code {
  font-family: "JetBrains Mono", "Cascadia Code", "SF Mono", "Fira Code", Consolas, monospace;
}

.api-hero-section {
  padding: 104px 24px 72px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12), transparent 55%);
  position: relative;
}

.api-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 320px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.api-hero-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.api-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #c7d2fe;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.api-hero-badge-dot {
  width: 6px;
  height: 6px;
  background: #6366f1;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.api-hero-title {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.15;
}

.api-hero-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.68);
  margin: 0 auto;
  line-height: 1.6;
  max-width: 680px;
}

.api-tools-section {
  padding: 0 0 56px;
}

.api-tools-container {
  max-width: 100%;
  margin: 0;
}

.api-section-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  text-align: left;
  margin: -10px 0 36px;
}

.api-tools-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.api-tool-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.35));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 32px 36px;
  transition: all 0.25s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 20px 48px;
  width: 100%;
  align-items: stretch;
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.45);
}

.api-tool-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.55);
}

.api-tool-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  grid-column: 1;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.api-tool-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.18) 100%);
  border-radius: 10px;
  flex-shrink: 0;
}

.api-tool-icon svg {
  width: 24px;
  height: 24px;
  color: #a5b4fc;
}

.api-tool-info {
  flex: 1;
}

.api-tool-title {
  font-size: 18px;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 6px;
}

.api-tool-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.5;
}

.api-tool-badge {
  flex-shrink: 0;
}

.api-method {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
}

.api-method--post {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.api-method--get {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.api-tool-path {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.45), rgba(17, 24, 39, 0.3));
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.api-tool-path code {
  font-size: 13px;
  color: #e2e8f0;
}

.api-path-copy {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.api-path-copy:hover {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.2);
}

.api-path-copy.is-success {
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.2);
}

.api-tool-params {
  margin-bottom: 8px;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-params-title,
.api-code-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-title-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c7d2fe;
}

.api-title-icon svg {
  width: 18px;
  height: 18px;
}

.api-params-table {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  overflow: visible;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.35));
  width: 100%;
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.45);
}

.api-params-header {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr 3fr 1.2fr;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.12));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
}

.api-params-header span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.api-params-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr 3fr 1.2fr;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  transition: background 0.2s ease;
  align-items: center;
  text-align: left;
}

.api-params-row:last-child {
  border-bottom: none;
}

.api-params-row:hover {
  background: rgba(99, 102, 241, 0.1);
}

.api-params-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.api-params-header span + span,
.api-params-row > * + * {
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  padding-left: 14px;
}

.api-param-name {
  font-size: 13px;
  color: #c7d2fe;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.api-param-type {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.85);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.api-param-required {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.api-param-required.is-required {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.45);
}

.api-param-required.is-optional {
  background: rgba(99, 102, 241, 0.12);
  color: rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.api-param-desc {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.5;
  padding-right: 6px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.api-param-default {
  font-size: 13px;
  color: rgba(203, 213, 225, 0.92);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.api-tool-code {
  margin-top: 0;
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.api-code-tabs {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.35));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.api-code-tabs-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.16), rgba(99, 102, 241, 0.1));
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.api-code-tab {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.75);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.api-code-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.api-code-tab.is-active {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.26);
}

.api-code-copy {
  margin-left: auto;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.api-code-copy:hover {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.4);
}

.api-code-copy.is-success {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
}

.api-code-body {
  padding: 18px;
  overflow: visible;
  flex: 1;
}

.api-code-panel {
  display: none;
  margin: 0;
}

.api-code-panel.is-active {
  display: block;
}

.api-code-panel code {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-wrap;
  word-break: break-word;
}

.api-errors-section {
  padding: 32px 36px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.35));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.45);
}

.api-errors-section .api-section-title {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.api-errors-container {
  max-width: 100%;
  margin: 0;
}

.api-errors-table {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  overflow: visible;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.35));
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.45);
}

.api-errors-header {
  display: grid;
  grid-template-columns: 1fr 1fr 3fr;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.12));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(248, 250, 252, 0.9);
  position: sticky;
  top: 0;
  z-index: 1;
}

.api-errors-row {
  display: grid;
  grid-template-columns: 1fr 1fr 3fr;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  align-items: center;
}

.api-errors-row:last-child {
  border-bottom: none;
}

.api-errors-row--success {
  background: transparent;
}

.api-errors-row--error {
  background: transparent;
}

.api-errors-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.api-errors-header span + span,
.api-errors-row > * + * {
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  padding-left: 14px;
}

.api-error-code {
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  background: rgba(148, 163, 184, 0.18);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  width: fit-content;
}

.api-errors-row--success .api-error-code {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
  color: #dcfce7;
}

.api-errors-row--error .api-error-code {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fee2e2;
}

.api-error-type {
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

.api-docs-layout {
  display: flex;
  gap: 32px;
  max-width: 100%;
  margin: 0;
  padding: 40px 24px 80px;
  width: 100%;
}

.api-docs-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 96px;
  align-self: flex-start;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.35));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.45);
}

.api-sidebar-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.api-sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-sidebar-search {
  display: flex;
  gap: 8px;
}

.api-sidebar-input {
  width: 100%;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: rgba(248, 250, 252, 0.95);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.api-sidebar-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(17, 24, 39, 0.65);
}

.api-sidebar-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.api-sidebar-link:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.16);
}

.api-sidebar-link.is-active {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.16);
}

.api-docs-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.api-section-title {
  font-size: 22px;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 20px;
  text-align: left;
}

.api-tools-empty {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: rgba(226, 232, 240, 0.75);
  font-size: 13px;
  text-align: center;
}

.api-error-desc {
  font-size: 13px;
  color: rgba(203, 213, 225, 0.92);
  display: block;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .api-docs-layout {
    flex-direction: column;
    padding: 40px 20px 72px;
  }

  .api-docs-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 12px;
  }

  .api-sidebar-title {
    width: 100%;
  }

  .api-sidebar-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .api-tool-card {
    grid-template-columns: 1fr;
  }

  .api-tool-code {
    grid-column: 1;
    grid-row: auto;
  }

  .api-params-header,
  .api-params-row {
    grid-template-columns: 1fr 1fr 0.7fr 2fr 1fr;
  }

  .api-errors-header,
  .api-errors-row {
    grid-template-columns: 1fr 1fr 2fr;
  }
}

@media (max-width: 768px) {
  .api-hero-section {
    padding: 88px 20px 56px;
  }

  .api-hero-title {
    font-size: 30px;
  }

  .api-errors-header,
  .api-errors-row {
    grid-template-columns: 1fr 1fr 2fr;
  }


  .api-tool-header {
    flex-wrap: wrap;
  }

  .api-tool-badge {
    order: -1;
    width: 100%;
    margin-bottom: 12px;
  }
}

:root[data-theme="light"] .api-docs-page {
  background: #ffffff;
}

:root[data-theme="light"] .api-hero-section {
  background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.1), transparent 55%);
}

:root[data-theme="light"] .api-hero-section::before {
  background: radial-gradient(ellipse, rgba(79, 70, 229, 0.12) 0%, transparent 70%);
}

:root[data-theme="light"] .api-hero-badge {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.22);
  color: #4338ca;
}

:root[data-theme="light"] .api-hero-title,
:root[data-theme="light"] .api-tool-title,
:root[data-theme="light"] .api-content-title {
  color: #0f172a;
}

:root[data-theme="light"] .api-hero-desc,
:root[data-theme="light"] .api-tool-desc,
:root[data-theme="light"] .api-section-subtitle,
:root[data-theme="light"] .api-param-desc {
  color: #64748b;
}

:root[data-theme="light"] .api-tool-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .api-tool-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .api-tool-icon {
  background: rgba(79, 70, 229, 0.08);
}

:root[data-theme="light"] .api-tool-icon svg {
  color: #4338ca;
}

:root[data-theme="light"] .api-method--post,
:root[data-theme="light"] .api-method--get {
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
  border-color: rgba(79, 70, 229, 0.3);
}

:root[data-theme="light"] .api-tool-path {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .api-tool-path code {
  color: #0f172a;
}

:root[data-theme="light"] .api-section-title {
  color: #1e293b;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

:root[data-theme="light"] .api-path-copy {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}
