:root {
  --bg-1: #0b0f1a;
  --bg-2: #131a2e;
  --bg-3: #1b2540;
  --brand: #e6c27a;
  --brand-soft: rgba(230, 194, 122, 0.16);
  --accent: #b9a7e6;
  --text: #eef2f7;
  --muted: #9aa6b8;
  --surface: rgba(27, 37, 64, 0.55);
  --line: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(120, 110, 200, 0.18), transparent 60%),
    radial-gradient(900px 600px at 12% 8%, rgba(230, 194, 122, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 38%, var(--bg-1) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  /* 1.0.60：原来用 align-items: center。内容一旦高于视口（小屏手机 + 多了微信一键登录按钮），
     flex 居中的溢出部分会向上顶出且滚不到 —— 卡片顶部/底部被裁，用户看不到按钮。
     改成靠上对齐 + .card 自己 margin:auto：空间够时仍然垂直居中，空间不够时从顶部开始、可正常滚动。 */
  align-items: flex-start;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

#sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  margin: auto 0;
  background: var(--surface);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.brand { text-align: center; margin-bottom: 22px; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: 1px; margin: 0; }
.logo::after { content: "✦"; color: var(--brand); margin-left: 6px; animation: tw 3.2s ease-in-out infinite; }
.tagline { font-size: 12px; color: var(--brand); letter-spacing: 1px; margin: 6px 0 0; }

@keyframes tw { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%;
  padding: 13px 14px;
  /* 1.0.60：iOS 上输入框字号 < 16px 会在聚焦时把整个页面放大，必须用 16px */
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 13px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #2a2113;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, #f0cf8e, var(--brand));
  border: none;
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 8px 22px rgba(230, 194, 122, 0.28);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.16); }

/* 微信一键登录（1.0.57）：微信品牌绿，只在凭据配好后由 login.html 显示 */
.wx-divider { text-align: center; margin: 14px 0 4px; font-size: 12px; color: var(--muted); }
.btn-wechat {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 13px;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  background: #07c160;
  border: none;
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 8px 22px rgba(7, 193, 96, 0.28);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.btn-wechat:active { transform: translateY(1px); }
.btn-wechat:disabled { opacity: 0.6; cursor: not-allowed; }

.switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.switch a { color: var(--brand); text-decoration: none; }

.msg { min-height: 18px; text-align: center; font-size: 13px; margin: 2px 0 14px; color: var(--accent); }
.msg.err { color: #ff9b9b; }
.msg.ok { color: #9be8a6; }

.welcome { text-align: center; margin: 6px 0 22px; }
.welcome .hi { font-size: 14px; color: var(--muted); margin: 0; }
.welcome .name { font-size: 28px; font-weight: 800; margin: 6px 0; color: var(--brand); letter-spacing: 1px; }
.welcome .sub { font-size: 12px; color: var(--muted); margin: 0; }

.uid-box {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px; margin: 0 0 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.uid-label { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.uid-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; color: var(--text); word-break: break-all; user-select: all;
  cursor: pointer;
}

.reg-foot-ver {
  text-align: center;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.5px;
}


/* ===== 修改密码 弹层（auth/index.php 用） ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 12, 24, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  animation: bdf 0.18s ease-out;
}
.modal-backdrop.open { display: flex; }
@keyframes bdf { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  position: relative;
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.modal-sub   { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.modal-row   { display: flex; gap: 10px; margin-top: 12px; }
.modal-row .btn,
.modal-row .btn-ghost { flex: 1; }
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px;
  background: transparent; border: none;
  color: var(--muted); font-size: 18px; cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
