:root {
  --bg: #0b1220;
  --bg-soft: #111a2c;
  --panel: #151f33;
  --panel-2: #101827;
  --line: rgba(148, 163, 184, .16);
  --text: #d7deec;
  --muted: #7f8ba3;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --orange: #f97316;
  --green: #10b981;
  --red: #f43f5e;
  --radius: 8px;
}

:root[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-soft: #eef3f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --line: rgba(15, 23, 42, .12);
  --text: #172033;
  --muted: #64748b;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --orange: #ea580c;
  --green: #059669;
  --red: #dc2626;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(59,130,246,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.04) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  transition: background .18s ease, color .18s ease;
}

[v-cloak] { display: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 17px; height: 17px; flex: 0 0 auto; }
img, video, canvas, svg { max-width: 100%; }

.client-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 max(24px, calc((100vw - 1368px) / 2));
  background: rgba(24, 34, 54, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  min-width: 0;
}

.client-brand {
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  font-weight: 900;
}

.client-nav { min-width: 0; display: flex; align-items: center; gap: 28px; flex: 1; }
.client-nav a {
  flex: 0 0 auto;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  padding: 22px 2px;
  border-bottom: 2px solid transparent;
}
.client-nav a.active, .client-nav a:hover { color: var(--text); border-bottom-color: var(--blue); }

.client-search {
  width: min(280px, 22vw);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, .64);
  border-radius: var(--radius);
}
.client-search input {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
.client-actions { min-width: 0; display: flex; align-items: center; gap: 10px; }
.client-id { color: var(--muted); font-size: 13px; white-space: nowrap; }

input, select, textarea {
  width: 100%;
  min-height: 40px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d1526;
  padding: 0 12px;
  outline: none;
}
textarea { min-height: 118px; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(59,130,246,.68); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }

.blue-btn, .outline-btn, .link-btn, .icon-btn, .wechat, .pill-tabs button, .amount-grid button, .theme-toggle {
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.theme-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(17, 27, 45, .72);
  border-color: var(--line);
  font-weight: 800;
}
.blue-btn, .outline-btn, .wechat {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 800;
}
.blue-btn { color: white; background: var(--blue); }
.outline-btn { color: var(--text); background: rgba(17, 27, 45, .72); border-color: var(--line); }
.outline-btn.small, .blue-btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.blue-btn:hover, .outline-btn:hover, .wechat:hover, .icon-btn:hover { transform: translateY(-1px); }
.link-btn { color: var(--blue-2); background: transparent; padding: 0; border: 0; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; background: rgba(17, 27, 45, .72); color: var(--text); border-color: var(--line); }
.icon-btn.dark { background: rgba(15, 23, 42, .8); }
.wechat { width: 100%; color: white; background: #16a34a; }
.full { width: 100%; }

.client-hero {
  width: min(1368px, calc(100vw - 48px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 48px;
  align-items: center;
  padding: 72px 0 28px;
  min-width: 0;
}
.hero-copy, .api-preview, .client-section, .market-table, .member-layout, .interface-detail-page { min-width: 0; }
.eyebrow { color: var(--blue-2); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0; }
.client-hero h1 {
  margin: 14px 0 16px;
  max-width: 720px;
  color: white;
  font-size: 60px;
  line-height: 1.05;
  letter-spacing: 0;
}
.client-hero p { max-width: 650px; color: #9aa7bd; font-size: 20px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.api-preview, .member-panel, .profile-panel, .member-sidebar, .market-table, .empty-state, .login-modal, .invoice-modal, .detail-card {
  border: 1px solid var(--line);
  background: rgba(21, 31, 51, .78);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}
.api-preview { overflow: hidden; animation: rise .45s ease both; }
.api-preview-head {
  height: 44px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.api-preview-head span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(16,185,129,.10);
  animation: pulse 2.2s ease-in-out infinite;
}
.api-preview-head small { color: var(--muted); }
.api-preview pre, .code-block {
  margin: 0;
  overflow: auto;
  color: #c7f9e5;
  background: #0a1020;
  line-height: 1.75;
  border-radius: var(--radius);
}
.api-preview pre { min-height: 360px; padding: 22px; border-radius: 0; }

.client-section {
  width: min(1368px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.client-footer {
  width: min(1368px, calc(100vw - 48px));
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.client-footer a {
  color: var(--muted);
  text-decoration: none;
}

.client-footer a:hover {
  color: var(--blue-2);
}

.section-title { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-title h2 { margin: 6px 0 0; color: white; font-size: 34px; letter-spacing: 0; }
.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.interface-title {
  justify-content: center;
  text-align: center;
  margin-bottom: 42px;
}
.interface-title h2 {
  font-size: 40px;
}
.pill-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pill-tabs button { min-height: 34px; padding: 0 12px; color: var(--muted); background: rgba(17,27,45,.72); border-color: var(--line); }
.pill-tabs button.active { color: white; background: var(--blue); border-color: var(--blue); }

.interface-market {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.interface-category-panel,
.interface-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 31, 51, .78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .14);
}
.interface-category-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  min-height: 450px;
  padding: 30px 18px;
}
.interface-category-panel button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}
.interface-category-panel button.active,
.interface-category-panel button:hover {
  color: white;
  background: var(--blue);
}
.interface-category-panel button.active span,
.interface-category-panel button:hover span {
  color: white;
}
.interface-category-panel em {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: white;
  border-radius: 999px;
  background: #fb7185;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.interface-service-panel {
  min-width: 0;
  min-height: 560px;
}
.interface-count {
  margin: 8px 0 24px;
  color: var(--muted);
  font-weight: 800;
}
.interface-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.interface-card {
  min-width: 0;
  min-height: 250px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  padding: 26px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.interface-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, .5);
  background: rgba(25, 37, 59, .86);
}
.interface-card h3 {
  margin: 0;
  color: white;
  font-size: 21px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.interface-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.interface-price strong {
  color: var(--orange);
  font-size: 20px;
}
.interface-price span {
  color: var(--muted);
}
.interface-card p {
  margin: 0;
  color: #9aa7bd;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.interface-card-actions {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 10px;
}
.interface-card-actions .blue-btn,
.interface-card-actions .outline-btn {
  width: 100%;
}

.market-table { overflow: hidden; }
.market-head, .market-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 120px 120px 110px 190px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}
.market-head { color: var(--muted); background: rgba(15,23,42,.58); font-size: 13px; }
.market-row { min-height: 88px; border-top: 1px solid var(--line); cursor: pointer; }
.market-row:hover { background: rgba(59, 130, 246, .06); }
.market-row strong { display: block; color: white; }
.market-row small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.45; }
.market-row > div { min-width: 0; }
.market-row strong, .market-row small { overflow-wrap: anywhere; }
.market-row b { color: var(--orange); }
.market-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.interface-detail-page {
  width: min(1368px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 42px 0 68px;
}
.detail-back {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}
.detail-back:hover { color: var(--text); }
.detail-title { margin-bottom: 28px; }
.detail-title h1 {
  margin: 10px 0 10px;
  color: white;
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: 0;
}
.detail-title p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: stretch;
}
.detail-card {
  min-width: 0;
  min-height: 520px;
  padding: 22px;
}
.detail-block + .detail-block { margin-top: 32px; }
.detail-block h3,
.response-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}
.detail-block h3 i,
.response-section h3 i {
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: var(--blue);
}
.response-section h3 i.ok { background: var(--green); }
.response-section.fail h3 i { background: var(--orange); }
.detail-value,
.url-box,
.detail-tip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d1526;
}
.detail-value {
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #93c5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.detail-block small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}
.url-box {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.url-box code {
  color: #93c5fd;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.detail-meta small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}
.detail-meta b { color: var(--orange); font-size: 18px; }
.method-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 38px;
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, .35);
  border-radius: var(--radius);
  background: rgba(16, 185, 129, .10);
}
.promo-link {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 0 16px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(249, 115, 22, .76);
  border-radius: var(--radius);
  background: rgba(249, 115, 22, .06);
}
.promo-link svg { color: var(--orange); }
.detail-block p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}
.detail-tip {
  margin-top: 16px;
  padding: 14px;
  color: #93c5fd;
  line-height: 1.55;
  background: rgba(59, 130, 246, .09);
}
.params-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.params-head,
.params-row {
  display: grid;
  grid-template-columns: 1fr .6fr 1.5fr;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
}
.params-head {
  color: #a9b5ca;
  background: #101827;
  font-weight: 900;
}
.params-row {
  color: #9aa7bd;
  border-top: 1px solid var(--line);
}
.response-card {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0;
  overflow: hidden;
}
.response-section { min-width: 0; }
.response-section h3 {
  min-height: 58px;
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.response-section.fail {
  border-top: 1px solid var(--line);
}
.detail-code {
  min-height: 278px;
  margin: 0;
  padding: 24px;
  overflow: auto;
  color: #a7f3d0;
  background: transparent;
  line-height: 1.8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.json-code {
  color: #5f6f61;
}
.json-key {
  color: #96319d;
  font-weight: 800;
}
.json-string {
  color: #2fb34e;
  font-weight: 700;
}
.json-literal {
  color: #f07f8b;
  font-weight: 800;
}
.json-number {
  color: #e08a2e;
  font-weight: 700;
}
.json-punct {
  color: #697765;
}
.response-section.fail .detail-code {
  min-height: 156px;
  color: #fed7aa;
}

.member-layout {
  width: min(1368px, calc(100vw - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 274px 1fr;
  gap: 24px;
  padding: 68px 0;
}
.member-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  min-height: 600px;
  padding: 18px;
}
.sidebar-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.member-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  margin-bottom: 12px;
  padding: 0 16px;
  color: #9aa7bd;
  text-decoration: none;
  border-radius: var(--radius);
}
.member-sidebar a.active, .member-sidebar a:hover { color: white; background: var(--blue); }

.member-content { min-width: 0; }
.member-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); gap: 18px; }
.wide { grid-column: 1 / -1; }
.profile-panel {
  min-height: 168px;
  display: grid;
  grid-template-columns: 84px 1fr 320px;
  align-items: center;
  gap: 26px;
  padding: 26px;
}
.profile-panel > div, .balance-block { min-width: 0; }
.avatar {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  font-size: 34px;
  font-weight: 900;
}
.profile-panel small, .balance-block small, .panel-head span, .panel-head small, .muted { color: var(--muted); }
.profile-panel strong { display: block; margin-top: 8px; color: white; font-size: 26px; }
.profile-panel p { color: var(--muted); margin: 14px 0 0; }
.balance-block b { display: block; color: var(--orange); font-size: 32px; margin: 8px 0 12px; }

.member-panel { padding: 26px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head > * { min-width: 0; }
.panel-head span, .panel-head small { overflow-wrap: anywhere; }
.panel-head h3 { margin: 0; color: white; font-size: 18px; }
.secret-line {
  position: relative;
}
.secret-box {
  min-height: 118px;
  padding: 18px 116px 18px 18px;
  overflow: hidden;
  color: #7f8ba3;
  background: #101827;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.copy-key-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 88px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}
.copy-key-btn:disabled {
  cursor: not-allowed;
  opacity: .52;
  transform: none;
}
.danger-note {
  margin-top: 14px;
  padding: 12px;
  color: #ff607a;
  border: 1px solid rgba(244,63,94,.5);
  border-radius: var(--radius);
  background: rgba(244,63,94,.06);
  font-size: 13px;
  line-height: 1.55;
}

.amount-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.amount-grid button {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--text);
  background: #101827;
  border-color: var(--line);
  font-weight: 800;
}
.amount-grid button strong { font-size: 18px; }
.amount-grid button small { color: var(--orange); font-size: 12px; }
.amount-grid button.active { color: white; background: var(--blue); border-color: var(--blue); }
.recharge-line, .debug-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.debug-grid { grid-template-columns: 1.1fr 1fr 1.35fr auto; }
.selected-package {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101827;
}
.selected-package strong {
  color: var(--text);
  white-space: nowrap;
}
.selected-package small {
  margin-left: 10px;
  color: var(--orange);
}
.payment-status {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101827;
}
.payment-status span {
  overflow-wrap: anywhere;
}
.invoice-alert {
  margin-bottom: 16px;
  color: #ff607a;
  font-weight: 800;
  line-height: 1.6;
}
.invoice-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty-cell {
  height: 78px;
  text-align: center;
  color: var(--muted);
}
.code-block { padding: 18px; margin-top: 14px; border: 1px solid var(--line); }
.docs-response-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.docs-response-grid h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}
.docs-response-grid .code-block {
  min-height: 220px;
  margin-top: 0;
}
.error-code-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.error-code-table table {
  min-width: 980px;
}
.error-code-table td:nth-child(1),
.error-code-table td:nth-child(2) {
  white-space: nowrap;
}
.error-code-table td:nth-child(3),
.error-code-table td:nth-child(4) {
  min-width: 280px;
  white-space: normal;
  line-height: 1.65;
}
.error-code-table code {
  color: #93c5fd;
  font-weight: 800;
}
.setting-row { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: center; margin-bottom: 12px; }
.setting-control {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.setting-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: #a9b5ca; background: #101827; }
td { color: #9aa7bd; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, .68);
  backdrop-filter: blur(10px);
}
.login-modal {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  display: grid;
  gap: 12px;
}
.login-modal h3 { margin: 0 0 6px; color: white; font-size: 24px; }
.login-modal p { margin: 0; color: var(--red); }
.invoice-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  padding: 24px;
  display: grid;
  gap: 14px;
  overflow: auto;
}
.invoice-modal h3 { margin: 0 0 4px; color: white; font-size: 24px; }
.invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.invoice-form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.invoice-form-grid .span-2 { grid-column: 1 / -1; }
.login-error { margin: 0; color: var(--red); }
.close { position: absolute; top: 12px; right: 12px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dark-empty { min-height: 360px; display: grid; place-items: center; gap: 14px; text-align: center; }
.empty-state h3 { margin: 0; color: white; }

@keyframes pulse {
  0%, 100% { opacity: .7; box-shadow: 0 0 0 5px rgba(16,185,129,.10); }
  50% { opacity: 1; box-shadow: 0 0 0 9px rgba(16,185,129,.05); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .client-topbar { flex-wrap: wrap; height: auto; gap: 12px 18px; padding-top: 12px; padding-bottom: 12px; }
  .client-brand { min-width: auto; }
  .client-nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .client-nav::-webkit-scrollbar { display: none; }
  .client-search { width: 260px; }
  .client-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 28px;
    padding-top: 42px;
  }
  .api-preview pre { min-height: 280px; }
  .member-layout, .detail-grid { grid-template-columns: 1fr; }
  .member-sidebar {
    position: static;
    min-height: 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px;
    scrollbar-width: none;
  }
  .member-sidebar::-webkit-scrollbar { display: none; }
  .sidebar-label { display: none; }
  .member-sidebar a {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
  }
  .profile-panel, .member-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .debug-grid, .market-head, .market-row { grid-template-columns: 1fr; }
  .market-head { display: none; }
  .market-row { gap: 10px; padding: 18px; }
  .market-actions { justify-content: flex-start; }
  .interface-market {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
  }
  .interface-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .interface-card { padding: 22px; }
  .detail-card { min-height: auto; }
  .response-card { grid-template-rows: auto; }
}

@media (max-width: 760px) {
  .client-topbar, .client-section, .client-hero, .member-layout, .interface-detail-page, .client-footer { width: calc(100vw - 28px); }
  .client-topbar {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }
  .client-actions {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .client-search { width: 100%; }
  .client-id { display: none; }
  .client-footer {
    flex-wrap: wrap;
    gap: 8px 12px;
    text-align: center;
  }
  .client-hero { padding-top: 32px; }
  .client-hero h1 { font-size: 42px; }
  .client-hero p { font-size: 18px; }
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .interface-title {
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
  }
  .interface-title h2 { font-size: 34px; }
  .pill-tabs { justify-content: flex-start; }
  .interface-market { grid-template-columns: 1fr; gap: 16px; }
  .interface-service-panel { min-height: 520px; }
  .interface-category-panel {
    position: static;
    min-height: 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px;
    scrollbar-width: none;
  }
  .interface-category-panel::-webkit-scrollbar { display: none; }
  .interface-category-panel button {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
  }
  .interface-count { margin: 4px 0 14px; }
  .interface-card-grid { grid-template-columns: 1fr; gap: 14px; }
  .interface-card { min-height: 210px; }
  .amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recharge-line, .setting-row { grid-template-columns: 1fr; }
  .recharge-line .blue-btn,
  .debug-grid .blue-btn,
  .setting-row .blue-btn,
  .setting-row .outline-btn { width: 100%; }
  .payment-status { align-items: stretch; flex-direction: column; }
  .selected-package {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }
  .selected-package small { margin-left: 0; }
  .invoice-form-grid { grid-template-columns: 1fr; }
  .invoice-form-grid .span-2 { grid-column: auto; }
  .detail-card { min-height: auto; padding: 18px; }
  .response-card { padding: 0; }
  .detail-title h1 { font-size: 30px; }
  .detail-block h3, .response-section h3 { font-size: 18px; }
  .detail-meta, .params-head, .params-row { grid-template-columns: 1fr; }
  .params-head, .params-row { padding: 14px 16px; }
  .secret-box { padding: 18px; }
  .copy-key-btn {
    position: static;
    width: 100%;
    margin-top: 10px;
  }
  th, td { padding: 12px 14px; }
  .modal-backdrop { padding: 14px; align-items: start; overflow: auto; }
  .login-modal, .invoice-modal { padding: 20px; }
  .invoice-modal { max-height: none; }
}

@media (max-width: 560px) {
  .client-topbar { gap: 10px; }
  .client-brand strong { display: none; }
  .theme-toggle span,
  .outline-btn span,
  .blue-btn span { white-space: nowrap; }
  .client-actions .outline-btn,
  .client-actions .blue-btn { padding: 0 10px; }
  .client-nav a { padding: 12px 0; }
  .client-hero h1 { font-size: 34px; line-height: 1.12; }
  .client-hero p { font-size: 16px; }
  .section-title h2 { font-size: 26px; }
  .interface-title h2 { font-size: 30px; }
  .api-preview-head { grid-template-columns: auto 1fr; }
  .api-preview-head small:last-child { display: none; }
  .api-preview pre, .detail-code, .code-block { font-size: 12px; }
  .docs-response-grid { grid-template-columns: 1fr; }
  .market-row { padding: 16px 14px; }
  .market-actions .outline-btn,
  .market-actions .blue-btn { flex: 1 1 128px; }
  .interface-category-panel { margin: 0 -2px; }
  .interface-card { padding: 20px; }
  .interface-card h3 { font-size: 19px; }
  .interface-card-actions { grid-template-columns: 1fr; }
  .member-layout { padding: 34px 0; gap: 14px; }
  .member-sidebar { margin: 0 -2px; }
  .profile-panel, .member-panel { padding: 18px; }
  .profile-panel { gap: 16px; }
  .avatar { width: 64px; height: 64px; font-size: 26px; }
  .profile-panel strong { font-size: 22px; }
  .balance-block b { font-size: 26px; }
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .panel-head .link-btn { align-self: flex-start; }
  .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-value { font-size: 15px; padding: 12px 14px; }
  .promo-link { grid-template-columns: auto 1fr; padding: 12px 14px; }
  .promo-link svg:last-child { display: none; }
  .invoice-table-wrap table,
  .member-panel table { min-width: 640px; }
  .login-modal h3, .invoice-modal h3 { font-size: 22px; }
}

:root[data-theme="light"] body {
  background:
    linear-gradient(rgba(37,99,235,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.04) 1px, transparent 1px),
    var(--bg);
}

:root[data-theme="light"] .client-topbar {
  background: rgba(255, 255, 255, .9);
}

:root[data-theme="light"] .client-brand,
:root[data-theme="light"] .client-hero h1,
:root[data-theme="light"] .section-title h2,
:root[data-theme="light"] .detail-title h1,
:root[data-theme="light"] .market-row strong,
:root[data-theme="light"] .profile-panel strong,
:root[data-theme="light"] .panel-head h3,
:root[data-theme="light"] .detail-block h3,
:root[data-theme="light"] .response-section h3,
:root[data-theme="light"] .login-modal h3,
:root[data-theme="light"] .invoice-modal h3,
:root[data-theme="light"] .empty-state h3 {
  color: var(--text);
}

:root[data-theme="light"] .client-hero p,
:root[data-theme="light"] .market-row small,
:root[data-theme="light"] td,
:root[data-theme="light"] .params-row,
:root[data-theme="light"] .member-sidebar a {
  color: var(--muted);
}

:root[data-theme="light"] .client-search,
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] .outline-btn,
:root[data-theme="light"] .icon-btn,
:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .pill-tabs button,
:root[data-theme="light"] .amount-grid button {
  background: #ffffff;
  color: var(--text);
}

:root[data-theme="light"] .api-preview,
:root[data-theme="light"] .member-panel,
:root[data-theme="light"] .profile-panel,
:root[data-theme="light"] .member-sidebar,
:root[data-theme="light"] .market-table,
:root[data-theme="light"] .interface-category-panel,
:root[data-theme="light"] .interface-card,
:root[data-theme="light"] .empty-state,
:root[data-theme="light"] .login-modal,
:root[data-theme="light"] .invoice-modal {
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 54px rgba(15, 23, 42, .08);
}

:root[data-theme="light"] .detail-card {
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 54px rgba(15, 23, 42, .08);
}

:root[data-theme="light"] .detail-value,
:root[data-theme="light"] .url-box code,
:root[data-theme="light"] .detail-tip {
  color: var(--text);
}

:root[data-theme="light"] .market-head,
:root[data-theme="light"] th,
:root[data-theme="light"] .secret-box,
:root[data-theme="light"] .detail-value,
:root[data-theme="light"] .url-box,
:root[data-theme="light"] .params-head,
:root[data-theme="light"] .amount-grid button,
:root[data-theme="light"] .selected-package,
:root[data-theme="light"] .payment-status {
  background: #f8fafc;
}

:root[data-theme="light"] .interface-card:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, .32);
}

:root[data-theme="light"] .interface-card h3 {
  color: var(--text);
}

:root[data-theme="light"] .interface-card p,
:root[data-theme="light"] .interface-price span,
:root[data-theme="light"] .interface-count {
  color: var(--muted);
}

:root[data-theme="light"] .interface-category-panel button {
  color: #64748b;
}

:root[data-theme="light"] .interface-category-panel button.active,
:root[data-theme="light"] .interface-category-panel button:hover {
  color: #ffffff;
}

:root[data-theme="light"] .interface-category-panel button.active span,
:root[data-theme="light"] .interface-category-panel button:hover span {
  color: #ffffff;
  font-weight: 900;
}

:root[data-theme="light"] .api-preview pre,
:root[data-theme="light"] .code-block {
  color: #0f766e;
  background: #f8fafc;
}

:root[data-theme="light"] .detail-code {
  color: #0f766e;
}

:root[data-theme="light"] .response-section.fail .detail-code {
  color: #9a3412;
}

:root[data-theme="dark"] .json-key {
  color: #d37aff;
}

:root[data-theme="dark"] .json-string {
  color: #5ee37f;
}

:root[data-theme="dark"] .json-literal {
  color: #ff9aa5;
}

:root[data-theme="dark"] .json-punct {
  color: #9fb09c;
}

:root[data-theme="light"] .member-sidebar a.active,
:root[data-theme="light"] .member-sidebar a:hover,
:root[data-theme="light"] .pill-tabs button.active,
:root[data-theme="light"] .amount-grid button.active {
  color: white;
  background: var(--blue);
}
