:root {
  --ink: #12213c;
  --muted: #66748d;
  --line: #dce4f0;
  --paper: rgba(255, 255, 255, 0.9);
  --canvas: #eef3f8;
  --navy: #112a53;
  --blue: #1f64ef;
  --blue-soft: #eaf1ff;
  --cyan: #0d8aa1;
  --green: #138a62;
  --amber: #b97208;
  --red: #c34444;
  --shadow: 0 16px 38px rgba(34, 56, 91, 0.1);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(246, 249, 253, 0.96), rgba(232, 239, 248, 0.92)),
    repeating-linear-gradient(90deg, transparent 0, transparent 47px, rgba(34, 72, 124, 0.035) 48px);
  font-family: "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  overflow-x: hidden;
}

button, input { font: inherit; }
a { color: inherit; }

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

.ambient-one {
  width: 34rem;
  height: 34rem;
  right: -15rem;
  top: -19rem;
  background: radial-gradient(circle, rgba(31, 100, 239, 0.28), transparent 68%);
}

.ambient-two {
  width: 25rem;
  height: 25rem;
  left: -15rem;
  bottom: -14rem;
  background: radial-gradient(circle, rgba(13, 138, 161, 0.2), transparent 70%);
}

.topbar {
  position: relative;
  z-index: 2;
  min-height: 84px;
  padding: 15px clamp(18px, 3vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(183, 198, 219, 0.8);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 1px 0 0; font-size: clamp(20px, 2vw, 28px); letter-spacing: -0.04em; }
.eyebrow, .section-kicker { color: var(--blue); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0.16em; }

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 4px;
  padding: 9px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0f2d5b, #1f64ef);
  box-shadow: 0 12px 24px rgba(31, 100, 239, 0.24);
}

.brand-mark span { display: block; border-radius: 3px; background: #fff; }
.brand-mark span:nth-child(1) { height: 42%; opacity: 0.72; }
.brand-mark span:nth-child(2) { height: 78%; }
.brand-mark span:nth-child(3) { height: 58%; opacity: 0.86; }

.topbar-actions { display: flex; align-items: center; gap: 18px; }
.updated { color: var(--muted); font-size: 13px; }
.ghost-link, .small-link {
  text-decoration: none;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
}
.ghost-link { padding: 10px 14px; border: 1px solid #bdd0f7; border-radius: 10px; background: #f8fbff; }

.workspace {
  position: relative;
  z-index: 1;
  width: min(1800px, calc(100% - clamp(24px, 4vw, 64px)));
  min-height: calc(100vh - 136px);
  margin: clamp(16px, 2vw, 28px) auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.74fr) minmax(310px, 1.08fr) minmax(480px, 1.9fr);
  border: 1px solid rgba(199, 211, 228, 0.9);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.platform-panel, .endpoint-panel, .detail-panel { min-width: 0; padding: 24px; }
.platform-panel, .endpoint-panel { border-right: 1px solid var(--line); }
.platform-panel { background: linear-gradient(180deg, rgba(247, 250, 254, 0.94), rgba(240, 245, 251, 0.88)); }
.endpoint-panel { background: rgba(251, 253, 255, 0.78); }
.detail-panel { background: rgba(255, 255, 255, 0.88); }

.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-heading h2, .detail-header h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -0.025em; }
.endpoint-heading p, .detail-header p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.count-badge { min-width: 28px; padding: 5px 8px; text-align: center; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font: 700 12px/1 ui-monospace, monospace; }

.search-box {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid #ccd7e7;
  border-radius: 11px;
  background: #fff;
  color: #8190a7;
  transition: border-color 160ms, box-shadow 160ms;
}
.search-box:focus-within { border-color: #70a0fb; box-shadow: 0 0 0 4px rgba(31, 100, 239, 0.09); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }

.platform-list { display: grid; gap: 8px; margin-top: 18px; }
.platform-item {
  width: 100%;
  padding: 13px 12px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: 160ms ease;
}
.platform-item:hover { background: rgba(255,255,255,0.8); border-color: #d8e2ef; transform: translateX(2px); }
.platform-item.active { color: #fff; background: linear-gradient(135deg, #173c77, #1f64ef); box-shadow: 0 10px 22px rgba(31, 100, 239, 0.22); }
.platform-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(31,100,239,0.1); font: 800 13px/1 ui-monospace, monospace; }
.platform-item.active .platform-icon { background: rgba(255,255,255,0.17); }
.platform-copy strong { display: block; font-size: 14px; }
.platform-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.platform-item.active .platform-copy span { color: rgba(255,255,255,0.72); }
.platform-item .mini-count { font-size: 11px; opacity: 0.75; }

.legend { margin-top: 24px; padding-top: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 999px; vertical-align: 1px; }
.dot.verified { background: var(--green); }
.dot.connected { background: var(--cyan); }
.dot.implemented { background: var(--blue); }
.dot.blocked { background: var(--amber); }

.status-filter { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.status-filter button { padding: 7px 10px; border: 0; border-radius: 8px; color: var(--muted); background: #eff3f8; cursor: pointer; font-size: 12px; white-space: nowrap; }
.status-filter button.active { color: var(--blue); background: var(--blue-soft); font-weight: 700; }

.endpoint-list { display: grid; gap: 9px; max-height: calc(100vh - 275px); overflow-y: auto; padding-right: 4px; }
.endpoint-item { width: 100%; padding: 14px; border: 1px solid #dce5f0; border-radius: 12px; text-align: left; color: var(--ink); background: #fff; cursor: pointer; transition: 160ms ease; }
.endpoint-item:hover { border-color: #9dbaf1; transform: translateY(-1px); }
.endpoint-item.active { border-color: #75a0f2; background: linear-gradient(135deg, #f6f9ff, #edf4ff); box-shadow: 0 8px 18px rgba(48, 88, 151, 0.09); }
.endpoint-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.endpoint-name { font-size: 14px; font-weight: 750; line-height: 1.45; }
.endpoint-path { margin-top: 8px; color: #71819a; font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }

.method, .status-pill { display: inline-flex; align-items: center; border-radius: 999px; font: 800 10px/1 ui-monospace, monospace; letter-spacing: 0.04em; }
.method { padding: 6px 8px; color: #2459ae; background: #e9f1ff; }
.status-pill { padding: 6px 9px; }
.status-pill.verified { color: #08724d; background: #dff5eb; }
.status-pill.connected { color: #08758a; background: #def3f6; }
.status-pill.implemented { color: #2459ae; background: #e6efff; }
.status-pill.blocked { color: #986006; background: #fff0d7; }

.detail-header { display: flex; justify-content: space-between; gap: 20px; }
.detail-meta { display: flex; gap: 7px; align-items: center; }
.evidence-strip { margin: 18px 0; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #c9daf8; border-radius: 11px; background: #f2f7ff; color: #315681; font-size: 12px; line-height: 1.55; }
.evidence-strip span { flex: 0 0 auto; padding: 2px 7px; border-radius: 6px; color: #fff; background: var(--blue); font-size: 10px; font-weight: 800; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 11px 14px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; font-size: 13px; }
.tabs button.active { color: var(--blue); border-color: var(--blue); font-weight: 750; }
.tab-content { display: none; padding-top: 18px; }
.tab-content.active { display: block; animation: reveal 180ms ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.request-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbfe; }
.card-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.info-card code { display: block; color: #27476e; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }

.code-card { margin-top: 12px; overflow: hidden; border: 1px solid #dce4ef; border-radius: 12px; background: #111d32; }
.code-heading { height: 39px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; color: #b7c7df; background: #172640; border-bottom: 1px solid #263a5c; font: 700 11px/1 ui-monospace, monospace; }
.copy-button { padding: 5px 8px; border: 1px solid #3b5278; border-radius: 6px; color: #dbe7f8; background: transparent; cursor: pointer; font-size: 10px; }
pre { margin: 0; max-height: 320px; padding: 16px; overflow: auto; color: #d7e5f7; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { display: grid; gap: 3px; padding: 11px 13px; border-left: 3px solid var(--amber); color: #70552b; background: #fff9ee; font-size: 12px; line-height: 1.55; }
.notice strong { color: #4f3a19; font-size: 12px; }
.link-list { display: grid; gap: 10px; }
.resource-link { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 13px; text-decoration: none; border: 1px solid var(--line); border-radius: 11px; background: #fbfdff; transition: 160ms ease; }
.resource-link:hover { border-color: #9dbaf1; transform: translateY(-1px); }
.resource-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font: 800 11px/1 ui-monospace, monospace; }
.resource-copy strong { display: block; font-size: 13px; }
.resource-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.resource-arrow { color: #8190a7; }
.empty { padding: 30px 12px; text-align: center; color: var(--muted); font-size: 13px; }

footer { position: relative; z-index: 1; padding: 0 clamp(18px, 3vw, 48px) 22px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
footer a { color: var(--blue); text-decoration: none; }

@media (max-width: 1220px) {
  .workspace { grid-template-columns: 210px minmax(270px, 0.95fr) minmax(420px, 1.55fr); width: calc(100% - 24px); }
  .platform-panel, .endpoint-panel, .detail-panel { padding: 18px; }
  .request-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .workspace { grid-template-columns: 190px 1fr; overflow: visible; }
  .endpoint-panel { border-right: 0; }
  .detail-panel { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .endpoint-list { max-height: 480px; }
}

@media (max-width: 640px) {
  .topbar { align-items: flex-start; }
  .topbar-actions { display: none; }
  .brand h1 { font-size: 19px; }
  .workspace { width: calc(100% - 16px); margin: 8px auto 18px; grid-template-columns: 1fr; }
  .platform-panel, .endpoint-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .platform-list { grid-template-columns: 1fr 1fr; }
  .platform-item { grid-template-columns: 34px 1fr; }
  .platform-item .mini-count { display: none; }
  .endpoint-list { max-height: none; }
  .detail-panel { grid-column: auto; }
  .legend { grid-template-columns: 1fr 1fr; }
  footer { gap: 12px; flex-direction: column; }
}
