body.model-api-page {
  margin: 0;
  background: #f7f8fc;
  color: #1c2133;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.api-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 380px;
  min-height: calc(100vh - 56px);
}

.api-side,
.api-code {
  background: #fff;
  border-right: 1px solid #eceaf3;
}

.api-code {
  border-right: 0;
  border-left: 1px solid #eceaf3;
}

.api-side-head {
  padding: 16px;
  border-bottom: 1px solid #f0eef6;
}

.api-side-head input {
  width: 100%;
  height: 38px;
  border: 1px solid #e7e5f0;
  border-radius: 10px;
  padding: 0 12px;
  outline: 0;
}

.api-side nav {
  padding: 12px;
}

.api-nav-group {
  margin-bottom: 14px;
}

.api-nav-group h4 {
  margin: 0 0 8px;
  color: #8b91a4;
  font-size: 12px;
}

.api-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 4px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #40465a;
  text-align: left;
  cursor: pointer;
}

.api-nav-item.active,
.api-nav-item:hover {
  background: #f1edff;
  color: #5a47df;
}

.method {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
}

.method.post { background: #e8f1ff; color: #2563eb; }
.method.get { background: #e9f8ef; color: #059669; }

.api-main {
  padding: 28px 28px 48px;
}

.api-main h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.api-main .desc {
  margin: 0 0 18px;
  color: #7a8094;
  line-height: 1.7;
}

.endpoint-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 12px 14px;
  border: 1px solid #eceaf3;
  border-radius: 12px;
  background: #fafaff;
}

.endpoint-box code {
  flex: 1;
  overflow: auto;
  font-size: 13px;
}

.copy-btn {
  border: 1px solid #e7e5f0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  cursor: pointer;
}

.param-block {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f0f6;
}

.param-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.param-name { font-weight: 700; }
.param-type { color: #8b91a4; font-size: 12px; }
.param-req {
  color: #ef4444;
  background: #fee2e2;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
}

.param-desc { color: #60667a; font-size: 13px; line-height: 1.6; }
.param-example {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f6fb;
  color: #4b5165;
  font-size: 12px;
}

.api-code {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #151826;
  color: #e8eaf2;
}

.code-tabs,
.resp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.code-tab,
.resp-tab {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  color: #c5c9d8;
  background: #23283a;
  cursor: pointer;
}

.code-tab.active,
.resp-tab.active {
  color: #fff;
  background: #6c56f6;
}

.code-panel,
.resp-panel {
  overflow: auto;
  flex: 1;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #0f1220;
  color: #d7dbea;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.api-empty {
  padding: 40px 20px;
  color: #8b91a4;
  text-align: center;
}

.top-links {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.top-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #5a47df;
  background: #f1edff;
  text-decoration: none;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .api-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .api-code { grid-column: 1 / -1; min-height: 360px; border-left: 0; border-top: 1px solid #eceaf3; }
}

@media (max-width: 760px) {
  .api-layout { grid-template-columns: 1fr; }
  .api-side { border-right: 0; border-bottom: 1px solid #eceaf3; }
}
