:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eef4ff;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5e9f0;
  --page: #f4f6f9;
  --white: #ffffff;
  --success: #11875d;
  --success-soft: #edf9f4;
  --danger: #c9362b;
  --danger-soft: #fff2f0;
  --warning: #b66b00;
  --warning-soft: #fff8e8;
  --shadow: 0 5px 18px rgba(31, 41, 55, .045);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.site-header {
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: auto;
  height: 50px;
  max-width: 210px;
  object-fit: contain;
  object-position: left center;
}
.header-actions { display: flex; align-items: center; gap: 18px; }
.service-status { display: inline-flex; align-items: center; gap: 7px; color: #30755b; font-size: 13px; }
.service-status i { width: 7px; height: 7px; border-radius: 50%; background: #23a86f; }
.official-link { color: #475467; font-size: 13px; text-decoration: none; }
.official-link:hover { color: var(--blue); }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 24px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.breadcrumb { margin: 0 0 7px; color: #8b95a5; font-size: 12px; }
.page-title h1 { margin: 0; font-size: 27px; line-height: 1.25; letter-spacing: -.02em; }
.page-title > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.version-tag { padding: 5px 9px; color: #7b8494; background: #eaedf2; border-radius: 6px; font-size: 11px; }

.workspace { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.node-panel { padding: 20px 14px 14px; }
.panel-heading { padding: 0 6px 15px; border-bottom: 1px solid #eef1f5; }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.node-list { display: grid; gap: 7px; padding: 14px 0; }
.node-card {
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 10px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background .16s ease, border-color .16s ease;
}
.node-card:hover { background: #f7f9fc; }
.node-card.active { background: var(--blue-soft); border-color: #c8d8fb; }
.node-code {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #3f66b5;
  background: #e8eef9;
  font-size: 14px;
  font-weight: 800;
}
.node-card.active .node-code { color: #fff; background: var(--blue); }
.node-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.node-info strong { font-size: 14px; }
.node-info small { color: #8490a2; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-card b { color: #98a2b3; font-size: 11px; font-weight: 500; }
.node-card.active b { color: var(--blue); }
.node-notice { margin-top: 2px; padding: 12px; background: #f8f9fb; border-radius: 8px; }
.node-notice strong { font-size: 12px; }
.node-notice p { margin: 5px 0 0; color: #778193; font-size: 11px; line-height: 1.6; }

.content-panel { padding: 26px 28px; }
.content-heading { padding-bottom: 20px; border-bottom: 1px solid #edf0f4; }
.heading-line { display: flex; align-items: center; gap: 10px; }
.heading-line h2 { margin: 0; font-size: 21px; }
.content-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.node-badge { padding: 4px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; font-size: 11px; font-weight: 600; }

#whitelistForm { display: grid; gap: 19px; padding: 23px 0 25px; }
.field-group label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.field-group input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field-group input::placeholder { color: #a7b0bf; }
.field-group input:focus { border-color: #75a0f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, .09); }
.field-hint { margin-top: 7px; color: #8791a2; font-size: 11px; line-height: 1.55; }
.captcha-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.captcha-label-row span { color: #8c96a6; font-size: 11px; }
.captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; }
.captcha-box {
  height: 48px;
  padding: 3px 7px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #758093;
  background: #fff;
  border: 1px solid #d7dde7;
  border-radius: 8px;
}
.captcha-box:hover { border-color: #86aaf0; }
.captcha-box:disabled { cursor: wait; opacity: .7; }
.captcha-box span { font-size: 11px; }
.captcha-box img { display: block; width: 100%; height: 40px; object-fit: contain; background: #fff; }
.action-row { display: flex; gap: 10px; padding-top: 2px; }
.primary-button, .secondary-button { min-height: 46px; padding: 0 20px; border-radius: 8px; font-weight: 600; font-size: 14px; transition: .16s ease; }
.primary-button { flex: 1; color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.secondary-button { color: #344054; background: #fff; border: 1px solid #d5dbe5; }
.secondary-button:hover { background: #f8fafc; border-color: #aeb8c7; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .56; }

.result-card { padding: 20px; background: #f8fafc; border: 1px solid #e7ebf1; border-radius: 10px; }
.result-title-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.result-title-row h3 { margin: 0; font-size: 15px; }
.status-pill { padding: 4px 8px; border-radius: 5px; font-size: 11px; }
.status-pill.idle { color: #667085; background: #e9edf2; }
.status-pill.loading { color: var(--warning); background: var(--warning-soft); }
.status-pill.success { color: var(--success); background: var(--success-soft); }
.status-pill.error { color: var(--danger); background: var(--danger-soft); }
.result-box { min-height: 82px; margin-top: 12px; padding: 14px; display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; }
.result-box.success { border-color: #b9e2d1; background: var(--success-soft); }
.result-box.error { border-color: #f0c3bd; background: var(--danger-soft); }
.result-box.loading { border-color: #ead298; background: var(--warning-soft); }
.result-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #8793a5; font-size: 13px; font-weight: 700; }
.result-box.success .result-icon { background: var(--success); }
.result-box.error .result-icon { background: var(--danger); }
.result-box.loading .result-icon { background: var(--warning); }
.result-box > div { min-width: 0; }
.result-box strong { display: block; margin: 1px 0 5px; font-size: 14px; }
.result-box p { margin: 0; color: #667085; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.tips { margin-top: 21px; padding-top: 19px; border-top: 1px solid #edf0f4; }
.tips h3 { margin: 0 0 12px; font-size: 14px; }
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tips-grid p { margin: 0; padding: 11px; color: #667085; background: #f8f9fb; border-radius: 7px; font-size: 11px; line-height: 1.55; }
.tips-grid span { margin-right: 5px; color: var(--blue); font-weight: 700; }
.footer { padding: 22px 16px 32px; color: #98a2b3; text-align: center; font-size: 11px; }

@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .node-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .node-notice { display: none; }
}
@media (max-width: 620px) {
  .site-header { height: 62px; }
  .brand-logo { width: auto; height: 44px; max-width: 165px; }
  .header-inner, .page-shell { width: min(100% - 20px, 1180px); }
  .header-actions { gap: 12px; }
  .service-status { display: none; }
  .page-shell { padding-top: 22px; }
  .page-title { align-items: flex-start; }
  .page-title h1 { font-size: 23px; }
  .version-tag { display: none; }
  .node-panel { padding: 16px 10px 10px; }
  .node-list { grid-template-columns: 1fr; }
  .content-panel { padding: 20px 16px; }
  .heading-line { align-items: flex-start; }
  .captcha-row { grid-template-columns: 1fr; }
  .captcha-box { height: 58px; }
  .captcha-box img { height: 49px; }
  .action-row { flex-direction: column; }
  .primary-button, .secondary-button { width: 100%; }
  .tips-grid { grid-template-columns: 1fr; }
}
