.api-docs-page {
  width: 100%;
  max-width: none;
  padding: 0 0 40px;
  font-family: Arial, Helvetica, sans-serif;
}

.api-docs-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid #eee9fa;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 35px rgba(90, 72, 145, 0.08);
}

.api-docs-header {
  padding: 28px 30px 24px;
  border-bottom: 1px solid #eeeaf8;
  background:
    radial-gradient(
      circle at top right,
      rgba(193, 153, 255, 0.08),
      transparent 35%
    ),
    #ffffff;
}

.api-docs-header h1 {
  margin: 0;
  color: #7456f4;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.api-docs-header p {
  margin: 9px 0 0;
  color: #7e7894;
  font-size: 14px;
  line-height: 1.6;
}

.api-key-bar {
  min-height: 70px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 14px;
  border: 1px dashed #dcd3ff;
  border-radius: 14px;
  background: #fbfaff;
}

.api-key-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4d4860;
  font-size: 14px;
  line-height: 1.5;
}

.api-key-info > i {
  color: #7657ff;
  font-size: 17px;
}

.api-key-info strong {
  white-space: nowrap;
  font-size: 14px;
}

.api-key-info span {
  color: #817a9b;
  font-size: 14px;
}

.api-key-button {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(135deg, #9768ff, #5d45f3);
  box-shadow: 0 7px 16px rgba(100, 74, 241, 0.22);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.api-key-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(100, 74, 241, 0.28);
}

.api-docs-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 650px;
  border-top: 1px solid #eeeaf8;
}

.api-sidebar {
  min-width: 0;
  padding: 16px 12px;
  border-right: 1px solid #ebe7f7;
  background: #ffffff;
  overflow-y: auto;
}

.api-search {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  margin-bottom: 12px;
  border: 1px solid #e7e0fa;
  border-radius: 10px;
  background: #ffffff;
}

.api-search:focus-within {
  border-color: #b9a8ff;
  box-shadow: 0 0 0 3px rgba(116, 86, 244, 0.08);
}

.api-search i {
  flex-shrink: 0;
  color: #8f86a8;
  font-size: 14px;
}

.api-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #403c4d;
  font-family: inherit;
  font-size: 14px;
}

.api-search input::placeholder {
  color: #a19bae;
}

.api-group {
  margin-bottom: 6px;
}

.api-group-header {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 9px;
  color: #4b4756;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.api-group-header:hover {
  background: #faf8ff;
}

.api-group-header span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.api-group-header span i {
  width: 17px;
  color: #7759ff;
  text-align: center;
  font-size: 13px;
}

.api-group-header > i {
  color: #9891a8;
  font-size: 11px;
  transition: transform 0.2s ease;
}

.api-group.collapsed .api-group-header > i {
  transform: rotate(180deg);
}

.api-group-items {
  padding: 2px 0 5px 15px;
}

.api-group.collapsed .api-group-items {
  display: none;
}

.api-endpoint-item {
  width: 100%;
  min-height: 62px;
  padding: 9px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 4px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #77718a;
  font-family: inherit;
  cursor: pointer;
}

.api-endpoint-item:hover {
  background: #faf8ff;
}

.api-endpoint-item.active {
  border-color: #e6ddff;
  background: #fbf9ff;
  color: #7457f5;
}

.api-method {
  align-self: start;
  min-width: 34px;
  padding: 4px 6px;
  border-radius: 5px;
  color: #ffffff;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.api-method.get {
  background: #4db4e9;
}

.api-method.post {
  background: #7957f7;
}

.api-method.large {
  min-width: 48px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
}

.api-endpoint-name {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.api-endpoint-item small {
  grid-column: 2;
  overflow: hidden;
  color: #aaa4b5;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-detail {
  min-width: 0;
  background: #ffffff;
  overflow: hidden;
}

.api-detail-inner {
  padding: 24px 26px 40px;
}

.api-url-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.api-url {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  padding: 0 11px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e8e3f5;
  border-radius: 9px;
  background: #faf9fd;
}

.api-url > span {
  overflow: hidden;
  color: #302d38;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-copy-button,
.api-code-copy {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #7d7698;
  cursor: pointer;
}

.api-copy-button:hover,
.api-code-copy:hover {
  color: #6a4df2;
}

.api-description {
  margin: 16px 0 26px;
  color: #746e8a;
  font-size: 14px;
  line-height: 1.7;
}

.api-section {
  margin-top: 27px;
}

.api-section h3 {
  margin: 0 0 13px;
  color: #383440;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.api-info-box {
  overflow: hidden;
  border: 1px solid #ebe5f8;
  border-radius: 11px;
  background: #ffffff;
}

.api-header-row {
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #f0edf7;
  color: #6f6983;
  font-size: 13px;
  line-height: 1.5;
}

.api-header-row:last-child {
  border-bottom: 0;
}

.api-header-row strong {
  color: #7058f4;
  font-size: 13px;
  font-weight: 700;
}

.api-header-row span {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.api-table-wrapper {
  overflow-x: auto;
  border: 1px solid #ebe5f8;
  border-radius: 11px;
}

.api-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.api-table th {
  padding: 12px 13px;
  border-bottom: 1px solid #e9e4f5;
  color: #4f4a5d;
  background: #fbfaff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.api-table td {
  padding: 13px;
  border-bottom: 1px solid #f0edf7;
  color: #746e82;
  font-size: 13px;
  line-height: 1.5;
}

.api-table tbody tr:last-child td {
  border-bottom: 0;
}

.api-table td strong {
  color: #5c5670;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.required-badge {
  display: inline-flex;
  min-width: 30px;
  padding: 4px 8px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.required-badge.yes {
  color: #f06464;
  background: #ffe9e9;
}

.required-badge.no {
  color: #77737d;
  background: #eeeeee;
}

.api-code-box {
  overflow: hidden;
  border-radius: 11px;
  background: #11101b;
  box-shadow: 0 9px 25px rgba(28, 24, 46, 0.13);
}

.api-code-box.error {
  border: 1px solid #69333d;
}

.api-code-header {
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #292634;
  background: #181724;
  color: #9f9aa9;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.api-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #aaa5b5;
  font-size: 11px;
}

.api-code-box pre {
  max-height: 420px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #f4f0ff;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.api-code-box.response .api-code-header {
  color: #aaa5b5;
}

.api-code-box.error .api-code-header {
  color: #ff626d;
  background: #29131b;
  border-color: #4b2730;
}

@media (max-width: 1100px) {
  .api-docs-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .api-detail-inner {
    padding: 22px 20px 35px;
  }
}

@media (max-width: 768px) {
  .api-docs-page {
    padding-bottom: 20px;
  }

  .api-docs-card {
    border-radius: 12px;
  }

  .api-docs-header {
    padding: 20px 17px;
  }

  .api-docs-header h1 {
    font-size: 20px;
  }

  .api-docs-header p {
    font-size: 13px;
  }

  .api-key-bar {
    margin: 10px;
    padding: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .api-key-info {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .api-key-info strong,
  .api-key-info span {
    font-size: 13px;
  }

  .api-key-button {
    width: 100%;
    justify-content: center;
  }

  .api-docs-workspace {
    display: block;
    min-height: 0;
  }

  .api-sidebar {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid #ebe7f7;
  }

  .api-detail-inner {
    padding: 20px 14px 30px;
  }

  .api-url-row {
    align-items: stretch;
  }

  .api-method.large {
    min-width: 43px;
  }

  .api-url > span {
    font-size: 13px;
  }

  .api-description {
    font-size: 14px;
  }

  .api-header-row {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 12px;
  }

  .api-header-row strong,
  .api-header-row span {
    font-size: 12px;
  }

  .api-table th {
    font-size: 12px;
  }

  .api-table td {
    font-size: 12px;
  }

  .api-table td strong {
    font-size: 12px;
  }

  .api-code-box pre {
    font-size: 12px;
  }
}
