:root {
  --bg-deep: #020814;
  --glass: rgba(12, 28, 58, 0.58);
  --glass-border: rgba(120, 170, 255, 0.18);
  --field: rgba(8, 18, 40, 0.72);
  --field-border: rgba(90, 140, 220, 0.22);
  --text: #f4f7ff;
  --muted: rgba(210, 220, 245, 0.55);
  --accent: #9bb4ff;
  --btn-a: #1a3a7a;
  --btn-b: #0c1f4a;
  --radius: 18px;
  --field-radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "DIN Alternate", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg-deep) center / cover no-repeat fixed;
  background-image:
    linear-gradient(180deg, rgba(2, 8, 20, 0.35) 0%, rgba(2, 8, 20, 0.55) 55%, rgba(2, 8, 20, 0.78) 100%),
    url("../assets/register-bg.png");
  min-height: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

.card {
  width: min(86vw, 360px);
  padding: 28px 22px 24px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: rise 0.55s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  text-shadow: 0 0 18px rgba(120, 170, 255, 0.35);
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px 0 14px;
  margin-bottom: 12px;
  border-radius: var(--field-radius);
  background: var(--field);
  border: 1px solid var(--field-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within {
  border-color: rgba(140, 180, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(90, 140, 255, 0.12);
}
.field svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.85;
}
.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.field input::placeholder { color: var(--muted); }
.field input:disabled { opacity: 0.7; }

.send-btn {
  flex: 0 0 auto;
  min-width: 52px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  padding: 6px 2px 6px 8px;
  cursor: pointer;
  opacity: 1;
}
.send-btn.counting,
.send-btn:disabled {
  color: #8b97b8;
  -webkit-text-fill-color: #8b97b8;
  opacity: 1;
  cursor: not-allowed;
}

.captcha-field { padding-right: 8px; }
.captcha-img {
  height: 36px;
  width: auto;
  max-width: 120px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.85);
  flex: 0 0 auto;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.primary {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: linear-gradient(180deg, #2a4f98 0%, var(--btn-a) 42%, var(--btn-b) 100%);
  box-shadow:
    0 10px 24px rgba(10, 30, 80, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s, filter 0.15s, opacity 0.15s;
  text-decoration: none;
  display: grid;
  place-items: center;
}
.primary:active { transform: scale(0.98); }
.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.footer-link {
  width: min(86vw, 360px);
  margin-top: 16px;
  text-align: right;
  font-size: 13px;
  color: rgba(210, 220, 245, 0.72);
  animation: rise 0.7s ease both;
}
.footer-link a {
  color: #b7c6ff;
  text-decoration: none;
  margin-left: 2px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(10, 18, 36, 0.92);
  border: 1px solid rgba(140, 170, 255, 0.25);
  color: #fff;
  font-size: 13px;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.show { opacity: 1; }
.toast.error { border-color: rgba(255, 107, 122, 0.45); }
.toast.ok { border-color: rgba(93, 255, 194, 0.45); }

.success {
  text-align: center;
  display: none;
}
.success.show { display: block; }
.success .check {
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(93, 255, 194, 0.35), rgba(30, 80, 140, 0.35));
  border: 1px solid rgba(93, 255, 194, 0.45);
  animation: pop 0.45s ease both;
}
@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.success h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.success p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}
.success .meta {
  font-size: 12px;
  color: rgba(183, 198, 255, 0.85);
  margin-bottom: 18px;
  word-break: break-all;
}

.hidden { display: none !important; }

.login-download {
  display: none;
  margin-top: 12px;
}
.login-download.show { display: grid; }

.footer-link .sep {
  margin: 0 6px;
  color: rgba(210, 220, 245, 0.35);
}

/* —— 下载页 —— */
.download-card {
  text-align: center;
}
.download-card .brand {
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0.9;
}
.download-card .title {
  margin-bottom: 10px;
}
.download-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 20px;
}
.qr-wrap {
  width: 220px;
  height: 220px;
  margin: 0 auto 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  animation: rise 0.65s ease both;
}
.qr-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.qr-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.ghost-link {
  display: inline-block;
  margin-top: 16px;
  color: #b7c6ff;
  font-size: 14px;
  text-decoration: none;
}
.ghost-link:active { opacity: 0.75; }

.os-hint {
  font-size: 12px;
  color: rgba(183, 198, 255, 0.88);
  line-height: 1.5;
  margin: -8px 0 10px;
}
.ios-twice-hint {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  color: #fff;
  background: #ff7a1a;
  border: 2px solid #ff9a3d;
}
.os-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}
.os-links a {
  color: #ffe08a;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(255, 208, 80, 0.4);
}
.os-links a:active { opacity: 0.7; }

.wx-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.78);
}
.wx-mask.hidden { display: none; }
.wx-guide {
  position: absolute;
  top: 12px;
  right: 16px;
  width: min(78vw, 280px);
  text-align: right;
  color: #fff;
  font-size: 15px;
  line-height: 1.7;
}
.wx-guide b {
  color: #ffe08a;
  font-size: 20px;
  letter-spacing: 0.08em;
}
.wx-arrow {
  width: 56px;
  height: 56px;
  margin: 0 8px 10px auto;
  background:
    linear-gradient(135deg, transparent 46%, #ffe08a 46%, #ffe08a 54%, transparent 54%),
    linear-gradient(45deg, transparent 62%, #ffe08a 62%, #ffe08a 70%, transparent 70%);
  background-size: 100% 100%;
  transform: rotate(18deg);
}
