/* 登录页 · 白底明亮暖色调 */
:root {
  --ink: #2a1a17; --ink-2: #6b5550; --ink-3: #a08a84;
  --red: #d7261e; --orange: #ff7a1a; --gold: #f5a300;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.login-page {
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60% 55% at 22% 38%, #fff3e3 0%, rgba(255, 243, 227, 0) 70%),
    radial-gradient(45% 45% at 88% 12%, #ffe3d6 0%, rgba(255, 227, 214, 0) 70%),
    radial-gradient(50% 40% at 70% 100%, #fff0c9 0%, rgba(255, 240, 201, 0) 70%),
    #fffbf6;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 漂浮的暖色光斑 */
.blobs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.blobs i:nth-child(1) { width: 420px; height: 420px; left: -80px; top: -60px; background: #ffd2b8; }
.blobs i:nth-child(2) { width: 360px; height: 360px; right: -60px; top: 30%; background: #ffe39a; animation-duration: 22s; }
.blobs i:nth-child(3) { width: 300px; height: 300px; left: 35%; bottom: -120px; background: #ffc2c7; animation-duration: 26s; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.12); } }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* 顶部校名 */
.login-top { position: fixed; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 20px clamp(20px, 5vw, 64px); }
.login-top img { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(160, 60, 30, .18); }
.login-top b { display: block; font-size: 17px; letter-spacing: .1em; }
.login-top small { display: block; font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }

.login-wrap { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; max-width: 1240px; margin: 0 auto;
  padding: 96px clamp(20px, 5vw, 64px) 48px; display: grid; grid-template-columns: 1fr 420px; align-items: center; gap: 48px; }
.login-brand { align-self: end; padding-bottom: 7vh; opacity: 0; transform: translateY(16px); animation: rise 1s .2s forwards; }
.lb-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--red); letter-spacing: .26em; font-size: 13px; font-weight: 600; margin: 0 0 12px;
  padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .75); box-shadow: 0 4px 14px rgba(215, 38, 30, .08); }
.lb-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 122, 26, .2); animation: beat 1.8s infinite; }
@keyframes beat { 50% { box-shadow: 0 0 0 7px rgba(255, 122, 26, 0); } }
.login-brand h1 { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4.8vw, 62px); font-weight: 800; letter-spacing: .08em; line-height: 1.15;
  background: linear-gradient(100deg, #c4161c 0%, #ef3b24 40%, #ff7a1a 75%, #f5a300 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, .9)) drop-shadow(0 8px 24px rgba(255, 140, 80, .25)); }
.lb-motto { display: flex; align-items: center; gap: 14px; margin: 16px 0 0; color: var(--ink-2); font-size: 16px; letter-spacing: .2em; flex-wrap: wrap; }
.lb-motto i { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--red)); }
.lb-feats { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.lb-feats li { padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--ink-2); font-size: 14px; box-shadow: 0 4px 16px rgba(180, 80, 40, .08); }
.lb-feats b { color: var(--orange); margin-right: 6px; }

.login-side { display: flex; flex-direction: column; gap: 16px; }
.login-card { position: relative; padding: 36px 34px 28px; border-radius: 26px; background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 200, 170, .6); box-shadow: 0 30px 70px -28px rgba(200, 70, 30, .35), 0 2px 6px rgba(200, 90, 40, .06);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); opacity: 0; transform: translateY(20px); animation: rise .9s .4s forwards; }
.login-card::before { content: ""; position: absolute; left: 34px; right: 34px; top: 0; height: 4px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--red), var(--orange), var(--gold)); }
@keyframes rise { to { opacity: 1; transform: none; } }
.login-card h2 { margin: 0; font-size: 26px; letter-spacing: .06em; }
.lc-sub { color: var(--ink-3); font-size: 14px; margin: 8px 0 24px; }
.lc-error { padding: 10px 14px; border-radius: 12px; background: #fff0ee; border: 1px solid #ffc9c2; color: #c4161c; font-size: 14px; margin-bottom: 16px; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.field { position: relative; display: flex; align-items: center; margin-bottom: 14px; }
.field > svg { position: absolute; left: 16px; color: #e0846a; pointer-events: none; }
.field input { width: 100%; height: 54px; padding: 0 48px; border-radius: 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff8f3; border: 1.5px solid #f6e0d6; transition: .2s; }
.field input::placeholder { color: #c4aaa2; }
.field input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(255, 122, 26, .16); }
.eye { position: absolute; right: 8px; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: #c4aaa2; cursor: pointer; display: grid; place-items: center; }
.eye.on, .eye:hover { color: var(--orange); }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 4px 0 22px; cursor: pointer; }
.remember input { accent-color: var(--red); width: 16px; height: 16px; }
.lc-btn { position: relative; width: 100%; height: 54px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .3em; color: #fff; overflow: hidden;
  background: linear-gradient(110deg, #d7261e, #f04a24 50%, #ff8a1f); box-shadow: 0 14px 28px -12px rgba(230, 70, 30, .7); transition: transform .15s, box-shadow .2s; }
.lc-btn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: shine 3.2s 1.5s infinite; }
@keyframes shine { 0% { left: -60%; } 40%, 100% { left: 130%; } }
.lc-btn:hover { box-shadow: 0 16px 34px -12px rgba(230, 70, 30, .85); }
.lc-btn:active { transform: scale(.98); }
.lc-btn.busy span { opacity: .55; }
.lc-foot { text-align: center; margin: 16px 0 0; font-size: 13px; color: var(--ink-3); }

/* 扫码访问 */
.qr-card { display: flex; align-items: center; gap: 18px; padding: 16px 20px 16px 16px; border-radius: 22px; background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 200, 170, .6); box-shadow: 0 20px 50px -30px rgba(200, 70, 30, .35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(20px); animation: rise .9s .6s forwards; }
.qr-card img { width: 112px; height: 112px; border-radius: 12px; background: #fff; padding: 6px; box-shadow: inset 0 0 0 1px #f6e0d6; transition: transform .25s; cursor: zoom-in; }
.qr-card img:hover { transform: scale(1.9) translateX(-12%); box-shadow: 0 20px 50px rgba(120, 40, 20, .25); position: relative; z-index: 5; }
.qr-card b { display: block; font-size: 16px; margin-bottom: 4px; }
.qr-card p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.qr-card small { display: block; margin-top: 6px; font-size: 12px; color: var(--orange); font-weight: 600; letter-spacing: .02em; }

.login-copy { position: fixed; z-index: 2; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 12px; color: var(--ink-3); letter-spacing: .1em; pointer-events: none; margin: 0; }
body.no-webgl #scene { display: none; }

@media (max-width: 1080px) {
  .login-wrap { grid-template-columns: 1fr 380px; gap: 28px; }
}
/* 平板竖屏：上方星球，下方表单 + 二维码并排 */
@media (max-width: 900px) and (min-width: 721px) {
  .login-wrap { grid-template-columns: 1fr; align-content: end; padding-bottom: 56px; }
  .login-brand { align-self: auto; padding-bottom: 0; text-align: center; }
  .lb-motto, .lb-feats { justify-content: center; }
  .login-side { flex-direction: row; align-items: stretch; }
  .login-card { flex: 1; }
  .qr-card { flex-direction: column; justify-content: center; text-align: center; width: 210px; }
  .qr-card img { width: 150px; height: 150px; }
  .qr-card img:hover { transform: none; }
}
/* 手机：本来就在手机上，不显示二维码 */
@media (max-width: 720px) {
  .login-top { padding: 14px 16px; }
  .login-top img { width: 36px; height: 36px; }
  .login-top b { font-size: 15px; }
  .login-wrap { grid-template-columns: 1fr; align-content: end; gap: 18px; padding: 72px 16px calc(40px + env(safe-area-inset-bottom)); }
  .login-brand { align-self: auto; padding-bottom: 0; text-align: center; }
  .lb-eyebrow { font-size: 11px; letter-spacing: .18em; }
  .login-brand h1 { font-size: 33px; }
  .lb-motto { justify-content: center; font-size: 13px; gap: 10px; margin-top: 10px; letter-spacing: .12em; }
  .lb-feats, .qr-card { display: none; }
  .login-card { padding: 28px 20px 22px; border-radius: 22px; }
  .login-card::before { left: 20px; right: 20px; }
  .login-card h2 { font-size: 22px; }
  .lc-sub { margin-bottom: 18px; font-size: 13px; }
  .login-copy { bottom: 10px; }
}
@media (max-width: 720px) and (max-height: 640px) { .login-brand { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }
