:root {
  --bg: #f3f9ff;
  --bg-strong: #dfefff;
  --card: rgba(255, 255, 255, 0.96);
  --line: #d7e5f4;
  --line-strong: #bdd5ee;
  --text: #17324f;
  --muted: #6f88a2;
  --primary: #1d6bed;
  --primary-soft: #edf4ff;
  --primary-shadow: 0 18px 34px rgba(29, 107, 237, 0.22);
  --success: #1f8c63;
  --success-soft: #ecfbf2;
  --danger: #df4a5b;
  --danger-soft: #fff2f4;
  --warning-soft: #f7fbff;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 24px 52px rgba(54, 107, 174, 0.14);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(160, 210, 255, 0.45), transparent 32%),
    linear-gradient(180deg, #f9fcff 0%, var(--bg) 55%, #eef6ff 100%);
}

body {
  min-height: 100vh;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.halo {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(12px);
  z-index: 0;
}

.halo-a {
  width: 340px;
  height: 340px;
  left: -110px;
  top: -120px;
  background: rgba(148, 199, 255, 0.42);
}

.halo-b {
  width: 280px;
  height: 280px;
  right: -80px;
  top: 160px;
  background: rgba(203, 228, 255, 0.52);
}

.page {
  position: relative;
  z-index: 1;
  width: min(1020px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.hero {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-badge {
  width: 90px;
  height: 90px;
  border-radius: 26px;
  background: linear-gradient(135deg, #1691ff 0%, #16bbdf 100%);
  box-shadow: 0 20px 38px rgba(0, 132, 211, 0.24);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: #2e77d8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
}

.hero-subtitle,
.section-desc,
.config-top p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.ghost-btn,
.text-btn,
.tab-btn,
.inline-btn,
.primary-btn,
.danger-btn,
.secondary-btn {
  border: none;
  appearance: none;
  font-family: inherit;
  cursor: pointer;
}

.ghost-btn {
  min-width: 108px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #204a74;
  border: 1px solid #d6e5f5;
  font-weight: 700;
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 24px;
}

.mode-pill {
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mode-pill.success {
  background: var(--success-soft);
  color: var(--success);
}

.config-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.config-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.config-top h3 {
  margin: 0;
  font-size: 16px;
}

.text-btn {
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.config-panel {
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

.field {
  display: grid;
  gap: 8px;
}

.field-small {
  width: 128px;
}

.field-full {
  grid-column: 1 / -1;
}

.field span,
.summary-label,
.endpoint-label {
  font-size: 13px;
  font-weight: 700;
  color: #4a6480;
}

.field input {
  width: 100%;
}

input {
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfdff;
  padding: 0 16px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

input:focus {
  border-color: #8dbcff;
  box-shadow: 0 0 0 4px rgba(29, 107, 237, 0.12);
}

.field-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.endpoint-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.endpoint-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px dashed #cbddf0;
}

.endpoint-item code {
  color: #20486f;
  font-size: 13px;
  word-break: break-all;
}

.inline-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff6df;
  color: #7d6120;
  border: 1px solid #f0dea3;
  font-size: 13px;
  line-height: 1.6;
}

.tab-row {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: #eef5ff;
  margin-bottom: 18px;
}

.tab-btn {
  min-width: 142px;
  padding: 11px 16px;
  border-radius: 14px;
  background: transparent;
  color: #506985;
  font-size: 14px;
  font-weight: 700;
}

.tab-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 10px 22px rgba(60, 120, 199, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
}

.inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.inline-btn,
.primary-btn,
.danger-btn,
.secondary-btn {
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  transition: opacity .18s ease, box-shadow .18s ease, transform .18s ease;
}

.inline-btn {
  min-width: 144px;
  height: 54px;
  padding: 0 16px;
  background: #eaf2ff;
  color: var(--primary);
}

.primary-btn {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #3a8dff, #1d6bed);
  color: #fff;
  box-shadow: var(--primary-shadow);
}

.danger-btn {
  min-width: 220px;
  height: 54px;
  padding: 0 22px;
  background: linear-gradient(135deg, #ff6c77, #df4a5b);
  color: #fff;
  box-shadow: 0 16px 32px rgba(223, 74, 91, 0.22);
}

.secondary-btn {
  min-width: 160px;
  height: 54px;
  padding: 0 20px;
  background: #edf4ff;
  color: #2c5b92;
}

.inline-btn:disabled,
.primary-btn:disabled,
.danger-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid transparent;
}

.message.info {
  background: #eef5ff;
  color: #255480;
  border-color: #d1e2ff;
}

.message.success {
  background: #edf9f2;
  color: #216246;
  border-color: #cbead8;
}

.message.error {
  background: #fff2f4;
  color: #9b3240;
  border-color: #ffd5da;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fbfdff;
  border: 1px solid var(--line);
}

.summary-card strong {
  font-size: 15px;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.55;
}

.notice-box {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--warning-soft);
  border: 1px solid #d8e6fb;
  margin-bottom: 16px;
}

.notice-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.notice-list {
  margin: 0;
  padding-left: 18px;
  color: #3a5977;
  line-height: 1.7;
}

.compact-list li + li {
  margin-top: 6px;
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  color: #40586f;
  font-size: 14px;
  line-height: 1.65;
}

.agree-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.slim-card {
  padding-top: 20px;
}

@media (max-width: 820px) {
  .page {
    width: min(calc(100vw - 18px), 100%);
    padding-top: 18px;
    padding-bottom: 34px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-head,
  .config-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .field-small {
    width: 100%;
  }

  .inline-action {
    grid-template-columns: 1fr;
  }

  .ghost-btn,
  .inline-btn,
  .danger-btn,
  .secondary-btn {
    width: 100%;
  }

  .cta-row {
    flex-direction: column;
  }
}
