:root {
  --bg: #0b1220;
  --bg2: #121a2b;
  --card: rgba(18, 28, 48, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef3ff;
  --muted: #9aa8c7;
  --primary: #4f8cff;
  --primary2: #6b5cff;
  --ok: #2dd4a8;
  --danger: #ff6b7a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(79, 140, 255, 0.28), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(107, 92, 255, 0.22), transparent 55%),
    radial-gradient(600px 400px at 50% 100%, rgba(45, 212, 168, 0.08), transparent 50%),
    linear-gradient(180deg, #0b1220 0%, #0a101c 100%);
}

.wrap {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero { margin-bottom: 18px; }
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 10px 30px rgba(79, 140, 255, 0.35);
}
.brand h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.5px;
}
.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 22px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #d7e0f5;
  font-weight: 600;
}
.field label [data-i18n],
.field label [data-free] {
  color: inherit;
}
/* 星号默认跟随标题色，报错时再变红 */
.field label .req {
  color: inherit;
}
.field.is-error label,
.field.is-error label [data-i18n],
.field.is-error label .req {
  color: var(--danger);
}
.field.is-error input,
.field.is-error textarea {
  border-color: rgba(255, 107, 122, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 107, 122, 0.12);
}
.field.is-error .chip span {
  border-color: rgba(255, 107, 122, 0.45);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: #6f7c99; }
input:focus, textarea:focus {
  border-color: rgba(79, 140, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
textarea { resize: vertical; min-height: 110px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  margin: 0 !important;
  cursor: pointer;
  user-select: none;
}
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #c9d5ef;
  font-size: 0.88rem;
  transition: .15s ease;
}
.chip input:checked + span {
  border-color: rgba(79, 140, 255, 0.7);
  background: rgba(79, 140, 255, 0.18);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}
.chip:hover span {
  border-color: rgba(255, 255, 255, 0.18);
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.counter {
  text-align: right;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 107, 122, 0.12);
  border: 1px solid rgba(255, 107, 122, 0.28);
  color: #ffb3bb;
  font-size: 0.9rem;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 12px 30px rgba(79, 140, 255, 0.28);
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--text);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.04); }

.success {
  text-align: center;
  padding: 28px 8px 8px;
}
.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #06281f;
  background: linear-gradient(135deg, #2dd4a8, #5eead4);
  box-shadow: 0 12px 30px rgba(45, 212, 168, 0.28);
}
.success h2 { margin: 0 0 8px; font-size: 1.3rem; }
.success p { margin: 0 0 18px; color: var(--muted); }

.foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: #6f7c99;
  font-size: 0.82rem;
}

/* honeypot: 对真人隐藏，爬虫常会填写 */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 420px) {
  .wrap { width: min(100%, calc(100% - 20px)); padding-top: 20px; }
  .card { padding: 16px; }
  .row { grid-template-columns: 1fr; }
}
