/* 玄机 · 登录页（暗金） */
body.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 84px 18px calc(10px + env(safe-area-inset-bottom));
  position: relative; overflow-x: hidden;
  background-color: #0d0b07;
  background: var(--bg);
}

/* 云海楼阁照片层：完全静止（只有云海动，整图不动） */
.lg-photo {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url('../assets/login-bg.png') center center / cover no-repeat;
}
.lg-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,7,4,.04) 0%, rgba(8,7,4,.08) 42%, rgba(10,8,4,.46) 100%);
}

/* 云海流动：从原图抠出的两层云海（羽化边缘），前后反向漂移形成视差，
   楼阁、台基、天空保持静止。inset 负值为漂移预留出血，边缘永不出界 */
.lg-sea { position: fixed; z-index: 1; pointer-events: none; will-change: transform; }
.lg-sea-a {
  inset: -3%;
  background: url('../assets/login-sea-a.png') center center / cover no-repeat;
  animation: lg-sea-a 5.5s ease-in-out infinite alternate;
}
.lg-sea-b {
  inset: -4.5%;
  background: url('../assets/login-sea-b.png') center center / cover no-repeat;
  animation: lg-sea-b 3.5s ease-in-out infinite alternate;
}
@keyframes lg-sea-a {
  from { transform: translateX(-2.6%) translateY(0.4%); }
  to   { transform: translateX(2.6%)  translateY(-0.5%); }
}
@keyframes lg-sea-b {
  from { transform: translateX(3.4%)  translateY(-0.3%); }
  to   { transform: translateX(-3.4%) translateY(0.7%); }
}

/* 背景装饰：缓慢旋转的双层罗盘圈 + 中心辉光（弱化，让云海图为视觉主角） */
.lg-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; opacity: .55; }
.lg-ring {
  position: absolute; left: 50%; top: 20%;
  border-radius: 50%; transform: translate(-50%, -50%);
  border: 1px solid rgba(179, 144, 47, .08);
}
.lg-ring::after {
  content: ''; position: absolute; inset: 8%;
  border-radius: 50%; border: 1px dashed rgba(179, 144, 47, .06);
}
.lg-ring-1 { width: 128vw; height: 128vw; animation: lg-spin 120s linear infinite; }
.lg-ring-2 { width: 88vw; height: 88vw; animation: lg-spin 84s linear infinite reverse; border-color: rgba(210, 179, 88, .10); }
@keyframes lg-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lg-glow {
  position: absolute; left: 50%; top: 18%; width: 72vw; height: 72vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(179, 144, 47, .08) 0%, rgba(179, 144, 47, 0) 68%);
}
@media (prefers-reduced-motion: reduce) {
  .lg-ring { animation: none; }
  .lg-sea { animation: none; }
}

.lg-main { position: relative; z-index: 1; width: 100%; max-width: 282px; }

/* 头部（横排紧凑：太极 + 标题副题一行） */
.lg-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.lg-mark { line-height: 0; filter: drop-shadow(0 3px 10px rgba(179, 144, 47, .22)); }
.lg-head-text { text-align: left; }
.lg-title {
  margin: 0 0 2px; font-size: 20px; font-weight: 700; letter-spacing: 4px;
  background: linear-gradient(180deg, var(--gold-lit), var(--gold-soft));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.lg-sub { margin: 0; font-size: 10.5px; letter-spacing: 3px; color: #6f6753; }

/* 卡片（玻璃拟态：半透明融入云海，缩小） */
.lg-card {
  background: linear-gradient(180deg, rgba(255,253,247,.88), rgba(250,246,235,.82));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(179, 144, 47, .35);
  border-radius: 12px;
  padding: 12px 13px 12px;
  box-shadow: 0 12px 30px rgba(90, 75, 40, .28), inset 0 1px 0 rgba(255,255,255,.95);
}
.lg-card-title {
  margin: 0 0 10px; font-size: 12.5px; letter-spacing: 2px; color: var(--gold-lit);
  padding-bottom: 7px; border-bottom: 1px solid rgba(179,144,47,.28);
}

.lg-field { display: block; margin: 0 0 9px; }
.lg-lab { display: block; font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-bottom: 4px; }
.lg-input-wrap {
  display: flex; align-items: stretch; gap: 8px;
  background: rgba(13, 11, 7, .55); border: 1px solid rgba(210,179,88,.22); border-radius: 9px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.lg-input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(179, 144, 47, .16); }
.lg-input-wrap input {
  flex: 1; min-width: 0; margin: 0; background: transparent; border: none;
  padding: 8px 11px; font-size: 14px; letter-spacing: 1.5px; color: var(--ink);
}
.lg-input-wrap input:focus { box-shadow: none; border: none; }
.lg-prefix {
  display: flex; align-items: center; padding-left: 11px;
  color: var(--gold-soft); font-size: 13px; letter-spacing: .5px;
  border-right: 1px solid rgba(210,179,88,.2); padding-right: 9px; margin: 6px 0;
}
.lg-send {
  flex: 0 0 auto; margin: 4px; padding: 0 9px; font-size: 11.5px; letter-spacing: .5px;
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold-dim); border-radius: 7px;
}
.lg-send:disabled { color: #6b6248; border-color: #2e2717; cursor: not-allowed; }
.lg-send.counting { color: var(--muted); }

.lg-agree {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 9px 0 10px; font-size: 11.5px; color: #6f6753; line-height: 1.6;
}
.lg-agree input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.lg-agree a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-dim); }

.lg-submit { width: 100%; letter-spacing: 4px; font-size: 14px; padding: 9px 16px; }
.lg-submit:disabled { filter: grayscale(.55) brightness(.62); cursor: not-allowed; box-shadow: none; }

.lg-msg { min-height: 20px; margin-top: 12px; text-align: center; font-size: 13px; color: #6f6753; }
.lg-msg.err { color: var(--red); }
.lg-msg.ok { color: var(--green); }

.lg-dev {
  margin-top: 10px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.6;
  background: rgba(200, 135, 74, .10); border: 1px dashed rgba(200, 135, 74, .5); color: #9c5d1f;
}
.lg-dev b { color: var(--gold-lit); letter-spacing: 3px; font-size: 15px; }

/* 页脚 */
.lg-foot { text-align: center; margin-top: 10px; }
.lg-corp { margin: 0 0 4px; font-size: 11px; letter-spacing: 1.5px; color: var(--gold-soft); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.lg-note { margin: 0; font-size: 10px; color: #8a7f63; line-height: 1.6; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

/* 协议弹层 */
.lg-modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .72); padding: 24px 18px;
}
.lg-modal.hidden { display: none; }
.lg-modal-box {
  width: 100%; max-width: 360px; max-height: 76vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--gold-dim); border-radius: 14px; padding: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}
.lg-modal-box h3 { margin: 0 0 10px; font-size: 15px; color: var(--gold-lit); letter-spacing: 2px; }
.lg-modal-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  font-size: 13px; line-height: 1.75; color: var(--ink); margin-bottom: 14px;
}
.lg-modal-body p { margin: 0 0 9px; }
.lg-modal-body strong { color: var(--gold); }
