:root {
  --bg: #0b0f14;
  --bg-2: #111823;
  --panel: rgba(22, 30, 41, 0.86);
  --line: rgba(120, 150, 180, 0.18);
  --line-strong: rgba(120, 180, 220, 0.35);
  --text: #dfe8f2;
  --text-dim: #8fa3b8;
  --accent: #4fb3ff;
  --accent-2: #7ee0c0;
  --danger: #ff7b72;
  --ok: #61d99b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(79, 179, 255, 0.14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(126, 224, 192, 0.1), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 220, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, #000 30%, transparent 75%);
}

.shell {
  position: relative;
  width: min(460px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 7vh, 72px) 0 40px;
}

.shell.wide { width: min(640px, calc(100% - 32px)); }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.shell.wide .brand { flex-wrap: wrap; }
.shell.wide .brand .btn { margin-left: auto; }

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(79, 179, 255, 0.35);
  flex: none;
}

.brand-text h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text p {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 13px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
}

.panel h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.72);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

input::placeholder { color: #56697d; }

input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(79, 179, 255, 0.14);
}

input[inputmode="numeric"] {
  letter-spacing: 0.4em;
  font-size: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 占位文字不要跟着拉开字距，否则读起来像"请 输 入" */
input[inputmode="numeric"]::placeholder {
  letter-spacing: normal;
  font-size: 15px;
}

.btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-family: inherit;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 0.12s, filter 0.16s, opacity 0.16s;
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn.primary {
  color: #04121c;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }

.btn.ghost {
  width: auto;
  padding: 8px 14px;
  letter-spacing: 0.04em;
  font-size: 13px;
  color: var(--text-dim);
  background: transparent;
  border-color: var(--line);
}

.btn.ghost:hover { color: var(--text); border-color: var(--line-strong); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  opacity: 0.9;
}

.link:hover { text-decoration: underline; }
.link:disabled { color: var(--text-dim); cursor: default; text-decoration: none; }

.msg {
  min-height: 20px;
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* 开发模式：验证码快捷填入（生产环境不会出现） */
.dev-hint {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px dashed rgba(240, 195, 107, 0.45);
  border-radius: 9px;
  background: rgba(240, 195, 107, 0.07);
  color: #f0c36b;
  font-size: 12.5px;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
}

.dev-hint[hidden] { display: none; }
.dev-hint:hover { background: rgba(240, 195, 107, 0.13); }

.hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-dim);
}

.foot {
  text-align: center;
  color: #6b7d90;
  font-size: 12px;
  margin-top: 8px;
}

.foot strong { color: var(--accent); }

.kv {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 16px;
  margin: 0;
  font-size: 14px;
}

.kv dt { color: var(--text-dim); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }

.kv dd.member-on { color: var(--accent-2); }
.kv dd.member-off { color: var(--text-dim); }

/* ---------- 强制绑定页 ---------- */
.bind-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 27, 38, 0.6);
}

.bind-info h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.bind-info p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

.bind-option .btn {
  width: auto;
  flex: none;
  padding: 9px 16px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.bind-tag {
  display: inline-block;
  margin-left: 0;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(126, 224, 192, 0.45);
  color: var(--accent-2);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  vertical-align: 1px;
  white-space: nowrap;
}

.bind-tag.weak {
  color: #f0c36b;
  border-color: rgba(240, 195, 107, 0.45);
}

@media (max-width: 620px) {
  .bind-option {
    flex-direction: column;
    align-items: stretch;
  }
  .bind-option .btn { width: 100%; }
}

@media (max-width: 520px) {
  .shell { padding-top: 24px; }
  .kv { grid-template-columns: 76px 1fr; }
}

/* ---------- 仅桌面端：手机/平板遮罩 ---------- */
body.gate-active .shell { display: none; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.gate-card {
  width: min(420px, 100%);
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
  box-shadow: var(--shadow);
}

.gate-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.gate-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.gate-card p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

.gate-card .gate-hint {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #6b7d90;
}

.gate-link {
  display: inline-block;
  margin: 4px 0 0;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
}

.gate-link:hover { background: rgba(79, 179, 255, 0.08); }

/* ---------- 手机端只读预览 ---------- */
.ro-page { padding-bottom: 32px; }

.ro-shell {
  position: relative;
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 24px;
}

.ro-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.ro-head-text h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.ro-head-text p { margin: 4px 0 0; }

.ro-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--accent-2);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.ro-hero {
  margin-bottom: 18px;
}

.ro-hero h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.4;
}

.ro-hero p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.75;
}

.ro-hero strong { color: var(--text); font-weight: 500; }

.ro-figure {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(10, 14, 20, 0.6);
  box-shadow: var(--shadow);
}

.ro-figure img { display: block; width: 100%; height: auto; }

.ro-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: #6b7d90;
  font-size: 12px;
}

.ro-points {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.ro-point {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 27, 38, 0.6);
}

.ro-num {
  flex: none;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 3px;
}

.ro-point h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.ro-point p {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.ro-cta {
  padding: 18px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
}

.ro-cta p { margin: 0 0 10px; font-size: 13px; color: var(--text-dim); }

.ro-url {
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.8);
  color: var(--accent);
  font-size: 13px;
}

.ro-tip { margin: 10px 0 0 !important; font-size: 12px; color: #6b7d90; }
