/* 域名过白自助服务 · 界面样式 */
:root {
  --brand: #285ce8;
  --brand-dark: #1745c4;
  --ink: #17243b;
  --muted: #738097;
  --line: #e4e9f1;
  --page: #f5f7fb;
  --danger: #cf414d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #a7c0ff; outline-offset: 3px; }
[hidden] { display: none !important; }

.site-header { height: 76px; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1096px; height: 100%; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff;
  display: grid; place-items: center;
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: 1px; }
.brand-divider { width: 1px; height: 19px; background: #dce2eb; margin: 0 4px; }
.brand-caption { font-size: 14px; color: #63718a; }

main { max-width: 1032px; margin: 0 auto; padding: 51px 28px 28px; }

.intro h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.4; font-weight: 650; letter-spacing: -.6px; }
.intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.section-label {
  display: block; margin: 31px 0 12px; font-size: 13px; font-weight: 550; color: #63718a;
}

.datacenters { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dc-card {
  position: relative; display: flex; align-items: center; gap: 17px;
  min-height: 111px; padding: 23px; text-align: left; color: var(--ink);
  border: 1.5px solid #dfe5ee; border-radius: 12px; background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.dc-card:hover { border-color: #a0b8ef; }
.dc-card[aria-selected="true"] { border-color: var(--brand); background: #f2f6ff; box-shadow: 0 0 0 1px var(--brand); }
.dc-icon {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 11px;
  background: #f1f4f8; color: #8490a5; display: grid; place-items: center;
}
.dc-card[aria-selected="true"] .dc-icon { color: var(--brand); background: #e2ebff; }
.dc-name { display: block; font-size: 20px; font-weight: 650; line-height: 1.45; }
.dc-place { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }
.dc-check {
  margin-left: auto; flex: 0 0 auto; width: 22px; height: 22px;
  display: grid; place-items: center; border: 1.5px solid #d6dee9; border-radius: 50%;
  background: #fff; color: transparent;
}
.dc-card[aria-selected="true"] .dc-check { border-color: var(--brand); background: var(--brand); color: #fff; }

.panel {
  margin-top: 23px; border: 1px solid var(--line); border-radius: 13px;
  background: #fff; box-shadow: 0 6px 24px #223b6e05; overflow: hidden;
}
.panel-heading {
  display: flex; align-items: center; gap: 11px;
  padding: 25px 30px 23px; border-bottom: 1px solid #edf0f5;
}
.panel-heading::before {
  content: ""; width: 4px; height: 19px; border-radius: 3px; background: var(--brand);
}
.panel-heading h2 { margin: 0; font-size: 18px; font-weight: 600; }

.form-body { padding: 29px 30px 30px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.field-label { display: block; margin: 0 0 11px; font-size: 14px; font-weight: 550; }
.required { margin-left: 4px; color: #db5157; }

.text-input {
  width: 100%; height: 47px; padding: 0 14px; color: var(--ink); font-size: 14px;
  border: 1px solid #dce2ec; border-radius: 7px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.text-input::placeholder { color: #a2acbc; }
.text-input:hover { border-color: #adbcd3; }
.text-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px #285ce80b; outline: none; }
.text-input[aria-invalid="true"] { border-color: #da5961; }
.text-input:disabled { background: #f7f9fc; color: #98a3b6; cursor: not-allowed; }

.error { margin: 7px 0 0; color: var(--danger); font-size: 12px; line-height: 1.5; }

.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 30px; }
.submit {
  min-width: 242px; height: 47px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  color: #fff; font-size: 14px; font-weight: 550;
  border: 1px solid var(--brand); border-radius: 7px; background: var(--brand);
  box-shadow: 0 3px 7px #285ce816; transition: background .15s;
}
.submit:hover:not(:disabled) { background: var(--brand-dark); }
.submit:disabled { cursor: wait; opacity: .7; }
.submit[aria-busy="true"]::before {
  content: ""; width: 14px; height: 14px; border: 2px solid #ffffff70; border-top-color: #fff;
  border-radius: 50%; animation: submissionSpin .8s linear infinite;
}
@keyframes submissionSpin { to { transform: rotate(360deg); } }

.submission-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }

.result { display: flex; gap: 10px; margin-top: 22px; padding: 13px 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.result[data-result-kind="success"] { color: #19794c; background: #eefaf3; border: 1px solid #c8efdb; }
.result[data-result-kind="failed"] { color: #a02f38; background: #fdf0f0; border: 1px solid #f4d3d6; }
.result strong { flex: 0 0 auto; }

footer { margin-top: 25px; text-align: center; color: #8d99ad; font-size: 12px; }

.result-modal {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: #10192bb3; backdrop-filter: blur(2px);
}
.result-modal-card {
  width: 100%; max-width: 396px; padding: 34px 30px 26px; text-align: center;
  background: #fff; border-radius: 15px; box-shadow: 0 24px 60px #0b17334d;
}
.result-icon { margin: 0 auto 18px; width: 72px; height: 72px; }
.result-icon svg { width: 100%; height: 100%; }
.success-mark { stroke-dasharray: 100; stroke-dashoffset: 100; animation: drawMark .45s .08s ease forwards; }
.failure-mark { stroke-dasharray: 100; stroke-dashoffset: 100; animation: drawMark .3s ease forwards; }
@keyframes drawMark { to { stroke-dashoffset: 0; } }
.result-modal-card h2 { margin: 0 0 10px; font-size: 19px; font-weight: 650; }
.result-modal-card p { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.result-modal-close {
  width: 100%; height: 42px; color: var(--brand); font-size: 14px;
  border: 1px solid #d5e0f7; border-radius: 8px; background: #f6f9ff;
}
.result-modal-close:hover { background: #edf3ff; }

.noscript-note { padding: 24px; text-align: center; color: var(--danger); }

@media (max-width: 760px) {
  main { padding: 32px 18px 24px; }
  .intro h1 { font-size: 26px; }
  .datacenters { grid-template-columns: 1fr; gap: 12px; }
  .dc-card { min-height: 92px; padding: 18px; }
  .fields { grid-template-columns: 1fr; gap: 18px; }
  .form-body { padding: 22px 18px 24px; }
  .panel-heading { padding: 20px 18px 18px; }
  .actions { align-items: stretch; }
  .submit { width: 100%; }
  .submission-note { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .success-mark, .failure-mark { stroke-dashoffset: 0; }
}