/* 登录页：小红书风。背景是缓慢滚动的笔记卡片，登录卡片分层入场。 */
:root {
  --red: #ff2442;
  --red-deep: #e0203d;
  --ink: #1f1f1f;
  --ink-soft: #6b6763;
  --bg: #f6f4f3;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* ---------- 背景：滚动的笔记卡片 ---------- */
.login-wall {
  position: absolute;
  inset: -40px;
  display: flex;
  gap: 18px;
  padding: 0 18px;
  justify-content: center;
}

.wall-col {
  flex: 1 1 0;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: wallUp 60s linear infinite;
}

.wall-col.down { animation-name: wallDown; animation-duration: 72s; }
.wall-col.slow { animation-duration: 84s; }

.wall-card {
  flex: none;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 6px 18px rgba(20, 20, 30, .05);
}

.wall-card i { display: block; }
.wall-card b { display: block; height: 8px; margin: 12px 14px 0; border-radius: 4px; background: #efedec; }
.wall-card b + b { width: 46%; margin-bottom: 14px; }

.login-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 70% at 50% 50%, rgba(246, 244, 243, .94) 0%, rgba(246, 244, 243, .82) 46%, rgba(246, 244, 243, .35) 100%);
}

/* ---------- 登录卡片 ---------- */
.login-stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.login-modal {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 40px 90px rgba(40, 20, 20, .16), 0 8px 24px rgba(40, 20, 20, .06), 0 0 0 1px rgba(0, 0, 0, .03);
  animation: rise .9s var(--ease) .15s both;
}

.login-intro {
  position: relative;
  overflow: hidden;
  flex: 1 1 360px;
  min-height: 520px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: #e8173b;
  color: #fff;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
  animation: float 9s ease-in-out infinite;
}
.orb-a { width: 260px; height: 260px; right: -90px; top: -80px; }
.orb-b { width: 140px; height: 140px; left: -50px; bottom: 60px; animation-delay: -4s; animation-duration: 11s; }

.login-brandrow { position: relative; display: flex; align-items: center; gap: 10px; }

.login-logo {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  background: #fff;
  color: #e8173b;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
}

.login-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 13px;
}
.login-live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.8s ease-out infinite; }

.login-intro h1 {
  position: relative;
  margin: 0;
  font-size: 36px;
  line-height: 48px;
  font-weight: 700;
  letter-spacing: .01em;
}

.mask { display: block; overflow: hidden; }
.mask > span { display: block; animation: lineUp .9s var(--ease) var(--d, 0s) both; }

.login-pulse { position: relative; width: 100%; max-width: 300px; height: 56px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.login-pulse .base { stroke: rgba(255, 255, 255, .28); stroke-width: 2; }
.login-pulse .wave { stroke: #fff; stroke-width: 2.4; stroke-dasharray: 420; animation: draw 5.5s cubic-bezier(.65, 0, .35, 1) infinite; }

.login-points { position: relative; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; font-size: 15px; line-height: 22px; }
.login-points li { display: flex; align-items: center; gap: 12px; }
.login-points span { flex: none; width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, .16); display: inline-flex; align-items: center; justify-content: center; }
.login-points svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.login-foot { position: relative; margin: auto 0 0; font-size: 13px; }

.login-panel {
  flex: 1 1 380px;
  padding: 48px 46px 38px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.login-panel h2 { margin: 0 0 6px; font-size: 28px; line-height: 36px; font-weight: 700; }
.login-sub { margin: 0; font-size: 15px; color: var(--ink-soft); }

#loginForm { display: flex; flex-direction: column; gap: 14px; }
#loginForm.shake { animation: shake .42s ease; }

.login-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4f3f2;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.login-field:hover { background: #efedec; }
.login-field:focus-within { background: #fff; border-color: var(--red); box-shadow: 0 0 0 4px rgba(255, 36, 66, .12); }
.login-field > svg { flex: none; width: 18px; height: 18px; fill: none; stroke: #7a7672; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s; }
.login-field:focus-within > svg { stroke: var(--red); }
.login-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.login-field input::placeholder { color: #8a8682; }

.login-eye {
  flex: none;
  width: 40px;
  height: 40px;
  margin-right: -12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7a7672;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.login-eye:hover { background: #e9e7e5; color: var(--ink); }
.login-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-eye .eye-off { display: none; }
.login-eye[aria-pressed="true"] .eye-on { display: none; }
.login-eye[aria-pressed="true"] .eye-off { display: block; }

.login-error { margin: 0; padding: 0 8px; font-size: 13px; color: #c0102c; }

.login-button {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 52px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--red-deep);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(224, 32, 61, .28);
  transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.login-button::after { content: ""; position: absolute; top: 0; left: 0; width: 34%; height: 100%; background: rgba(255, 255, 255, .22); transform: translateX(-120%) skewX(-20deg); }
.login-button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(224, 32, 61, .34); }
.login-button:hover::after { animation: sheen .9s ease; }
.login-button:active { transform: scale(.99); }
.login-button .label { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.login-button.busy { background: #e54a62; cursor: default; }
.login-button.ok { background: #1f1f1f; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.login-button:focus-visible, .login-eye:focus-visible { outline: 3px solid rgba(255, 36, 66, .35); outline-offset: 3px; }
.login-button:disabled { cursor: default; }

.spin { width: 17px; height: 17px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
.tick { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; animation: tick .45s ease .05s both; }

.login-help { margin: auto 0 0; font-size: 13px; line-height: 20px; color: var(--ink-soft); }

/* 入场的错落动画 */
.s { animation: fadeUp .7s var(--ease) var(--d, 0s) both; }

@keyframes wallUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes wallDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes draw { 0% { stroke-dashoffset: 420; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -420; } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(14px, -18px); } }
@keyframes sheen { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(320%) skewX(-20deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tick { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } }

@media (max-width: 760px) {
  .login-intro { min-height: 0; padding: 32px 28px; }
  .login-intro h1 { font-size: 28px; line-height: 38px; }
  .login-pulse, .login-foot { display: none; }
  .login-panel { padding: 32px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-page *, .login-page *::after { animation: none !important; transition: none !important; }
}
