/* 登录页：沿用首页仙侠成品图与主色，不改动游戏首页布局。 */
body.auth-active { overflow: hidden; }
body.auth-active #stage { pointer-events: none; }
.auth-gate {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #120d1d; color: #fff3df;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  touch-action: pan-y;
}
.auth-gate.hidden { display: none !important; }
.auth-backdrop, .auth-shade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.auth-backdrop { object-fit: cover; object-position: 50% 24%; filter: saturate(.92); }
.auth-shade {
  background: linear-gradient(180deg, rgba(11, 7, 18, .12) 0%, rgba(11, 7, 18, .18) 28%, rgba(11, 7, 18, .82) 62%, #0b0712 100%);
}
.auth-brand { position: relative; z-index: 1; margin: auto auto 24px; padding-top: 12vh; text-align: center; text-shadow: 0 3px 16px rgba(0,0,0,.65); }
.auth-seal {
  width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #4a1e06; font-size: 30px; transform: rotate(-4deg);
  background: linear-gradient(145deg, #ffe7b8, #ff8a3d);
  border: 2px solid rgba(255,243,223,.8); box-shadow: 0 8px 28px rgba(255,138,61,.35);
}
.auth-brand h1 { margin: 0; font: 800 38px/1.2 "STKaiti", "KaiTi", serif; letter-spacing: .16em; }
.auth-brand p { margin: 9px 0 0; color: #ffe7b8; font-size: 13px; letter-spacing: .2em; }
.auth-card {
  position: relative; z-index: 1; width: min(100%, 420px); margin: 0 auto;
  padding: 22px 18px 18px; border-radius: 22px;
  border: 1px solid rgba(255, 196, 130, .28);
  background: linear-gradient(160deg, rgba(40,25,50,.96), rgba(18,11,27,.97));
  box-shadow: 0 20px 60px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.06);
}
.auth-heading { margin: 0 0 5px; color: #fff3df; font-size: 21px; text-align: center; }
.auth-subtitle { margin: 0 0 20px; color: rgba(255,226,196,.62); font-size: 12px; line-height: 1.6; text-align: center; }
.auth-btn {
  width: 100%; min-height: 52px; border-radius: 14px; padding: 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; font-weight: 750; letter-spacing: .04em;
  transition: transform .12s ease, opacity .12s ease; touch-action: manipulation;
}
.auth-btn:active { transform: scale(.98); }
.auth-btn:disabled { opacity: .58; cursor: default; }
.auth-guest { color: #ffe7b8; border: 1px solid rgba(255,196,130,.35); background: rgba(255,255,255,.06); }
.auth-guest .mp-icon { color: #ffd08a; font-size: 22px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: rgba(255,226,196,.42); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: rgba(255,196,130,.15); }
.auth-wechat {
  color: #351604; background: linear-gradient(180deg, #ffae68, #ff8a3d);
  border: 1px solid #ffc48f; box-shadow: 0 5px 0 #b8511c, 0 10px 24px rgba(255,138,61,.22);
}
.auth-wechat:active { box-shadow: 0 2px 0 #b8511c; transform: translateY(3px); }
.auth-wechat-icon {
  width: 29px; height: 29px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #09a851; font-size: 21px; box-shadow: 0 2px 6px rgba(70,25,0,.18);
}
.auth-wechat-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.auth-wechat-copy small { font-size: 10px; font-weight: 500; opacity: .7; letter-spacing: 0; }
.auth-privacy { margin: 16px 4px 0; color: rgba(255,226,196,.42); font-size: 10px; line-height: 1.6; text-align: center; }
.auth-toast {
  position: absolute; z-index: 4; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: max-content; max-width: calc(100% - 40px); padding: 11px 16px; border-radius: 12px;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: rgba(8,5,13,.94); border: 1px solid rgba(255,196,130,.3); color: #fff3df;
  font-size: 13px; line-height: 1.5; text-align: center; transition: opacity .2s, transform .2s;
}
.auth-toast.show { opacity: 1; transform: translate(-50%, 0); }
.auth-loading { position: relative; z-index: 2; width: min(100%, 360px); margin: auto; padding: 28px 22px; border-radius: 20px; text-align: center; background: rgba(20,12,29,.94); border: 1px solid rgba(255,196,130,.25); }
.auth-spinner { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid rgba(255,208,138,.18); border-top-color: #ff8a3d; animation: authSpin .8s linear infinite; }
.auth-loading b { display: block; font-size: 17px; color: #ffe7b8; }
.auth-loading span { display: block; margin-top: 8px; color: rgba(255,226,196,.6); font-size: 12px; line-height: 1.6; }
@keyframes authSpin { to { transform: rotate(360deg); } }
@media (min-width: 600px) { .auth-gate { justify-content: center; } .auth-brand { margin: 0 auto 26px; padding-top: 0; } .auth-card { margin-bottom: 0; } }
@media (max-height: 650px) { .auth-gate { overflow-y: auto; justify-content: flex-start; } .auth-brand { margin-top: auto; padding-top: 24px; margin-bottom: 16px; } .auth-brand h1 { font-size: 31px; } .auth-seal { width: 46px; height: 46px; margin-bottom: 8px; } .auth-card { margin-bottom: auto; padding-top: 17px; } }
@media (prefers-reduced-motion: reduce) { .auth-spinner { animation-duration: 1.8s; } .auth-btn, .auth-toast { transition: none; } }
