:root {
  color-scheme: dark;
  --page: #070d16;
  --surface: #101a27;
  --surface-raised: #142235;
  --surface-soft: #0c1521;
  --border: #26384d;
  --border-strong: #35506d;
  --text: #e8f0f8;
  --muted: #91a5bb;
  --blue: #58a6ff;
  --green: #55d39b;
  --gold: #e7b72c;
  font-family: Inter, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--page);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 34px 18px 72px;
  color: var(--text);
  background: var(--page);
}

main { width: min(1120px, 100%); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  margin: 5px 0 10px;
  color: var(--text);
  font-size: clamp(27px, 4vw, 42px);
  letter-spacing: -.025em;
}

.topbar p { margin: 0; }
.topbar .muted { color: var(--muted); }

.topbar > div:first-child > p:first-child {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.topbar > .link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  white-space: nowrap;
}

.topbar > .link:hover { border-color: var(--blue); color: var(--blue); }
.link { color: var(--blue); font-weight: 700; text-decoration: none; }

.section {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
}

.section:first-of-type {
  border-color: #2d506f;
  background: var(--surface-raised);
}

.section h2 {
  margin: 0 0 15px;
  padding-left: 12px;
  border-left: 3px solid var(--blue);
  color: var(--text);
  font-size: 20px;
}

.section h3 { margin: 20px 0 8px; color: var(--text); font-size: 16px; }
.section p, .section li { color: var(--muted); line-height: 1.7; }

.endpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #315579;
  border-radius: 8px;
  color: var(--text);
  background: #0c2035;
  font: 700 14px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.method { color: var(--green); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }

.field {
  min-height: 74px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-soft);
  line-height: 1.7;
}

.field code { color: var(--blue); font-weight: 700; }

pre {
  margin: 12px 0 0;
  padding: 16px 17px;
  overflow: auto;
  border: 1px solid #263e58;
  border-radius: 9px;
  color: #dcecff;
  background: #08121e;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

code { color: #b9d7f7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

table {
  width: 100%;
  margin-top: 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

th { color: var(--muted); background: var(--surface-soft); font-size: 13px; }
tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  body { padding: 24px 12px 48px; }
  .topbar { align-items: flex-start; display: block; padding-bottom: 18px; }
  .topbar > .link { margin-top: 18px; }
  .section { padding: 18px; }
  pre { font-size: 12px; }
  th, td { font-size: 13px; }
}
