:root {
  --bg-0: #04060f;
  --bg-1: #0a1128;
  --bg-2: #0e1a38;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --text: #e6f4ff;
  --text-dim: #8ea6c2;
  --danger: #f87171;
  --ok: #34d399;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 1px rgba(34, 211, 238, 0.35), 0 0 32px rgba(6, 182, 212, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(1200px 700px at 15% -10%, var(--bg-2), transparent 60%),
    radial-gradient(1000px 600px at 110% 20%, rgba(6, 182, 212, 0.14), transparent 55%),
    linear-gradient(160deg, var(--bg-1), var(--bg-0));
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
}

/* 背景光晕 */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 420px at 78% 88%, rgba(34, 211, 238, 0.16), transparent 70%),
    radial-gradient(360px 360px at 20% 12%, rgba(6, 182, 212, 0.12), transparent 70%);
  filter: blur(10px);
  z-index: 0;
}

.shell { position: relative; z-index: 1; width: 100%; max-width: 460px; }

.card {
  background: linear-gradient(165deg, rgba(20, 34, 66, 0.72), rgba(8, 14, 32, 0.86));
  border: 1px solid rgba(148, 197, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 36px 34px;
}

.hidden { display: none !important; }

/* 品牌区 */
.brand { text-align: center; margin-bottom: 26px; }
.logo {
  width: 58px; height: 58px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  font-size: 30px;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.22), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: var(--ring);
}
h1 { font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.subtitle { color: var(--text-dim); font-size: 13px; margin-top: 4px; }

/* 表单 */
.form-title { font-size: 17px; margin-bottom: 6px; }
.form-desc { color: var(--text-dim); font-size: 13px; margin-bottom: 20px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; color: var(--text-dim); }
.field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: rgba(6, 14, 32, 0.6);
  border: 1px solid rgba(148, 197, 255, 0.16);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-soft);
}
.field input::placeholder { color: rgba(142, 166, 194, 0.6); }

/* 按钮 */
.btn {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #04121c;
  background: linear-gradient(120deg, var(--cyan), var(--cyan-strong));
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
  transition: transform 0.15s, filter 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 30px rgba(6, 182, 212, 0.42); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn.wide { width: 100%; }

/* loading */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(4, 18, 28, 0.35);
  border-top-color: #04121c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 50;
  min-width: 260px;
  max-width: 92vw;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  color: #04202c;
  background: linear-gradient(120deg, var(--cyan), var(--cyan-strong));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.25s ease-out;
}
.toast.error { background: linear-gradient(120deg, #f87171, #ef4444); color: #2b0a0a; }
.toast.ok { background: linear-gradient(120deg, #34d399, #10b981); color: #04210f; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 420px) {
  .card { padding: 26px 20px; }
  .row { grid-template-columns: 1fr; }
}
