/* 会员端登录页：沿用开放平台登录页的空间结构，颜色读取会员站主题变量。 */
:root {
  color-scheme: dark;
  --bg: #0d0f15;
  --text: #eef0f4;
  --muted: #aeb5c2;
  --line: rgba(255, 255, 255, .13);
  --brand: #eceef1;
  --on-brand: #15171a;
  --danger: #ff5f68;
  --glow-1: #4f5bd5;
  --glow-2: #8b5cf6;
  --glow-3: #14b8a6;
  --glow-opacity: .42;
  --grid-line: rgba(255, 255, 255, .055);
  --card-bg: rgba(20, 20, 24, .45);
  --card-border: rgba(255, 255, 255, .18);
  --card-sheen: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 46%);
  --card-shadow: 0 30px 80px -34px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .10);
  --field-bg: rgba(255, 255, 255, .065);
  --field-border: rgba(255, 255, 255, .17);
  --soft-bg: rgba(0, 0, 0, .18);
}
:root[data-mode="light"] {
  color-scheme: light;
  --bg: #eef0f4;
  --text: #1d2025;
  --muted: #555e6a;
  --line: rgba(15, 23, 42, .12);
  --brand: #1d2025;
  --on-brand: #ffffff;
  --danger: #b3261e;
  --glow-1: #8b95ee;
  --glow-2: #b9a6f7;
  --glow-3: #5fd6c8;
  --glow-opacity: .24;
  --grid-line: rgba(20, 26, 40, .07);
  --card-bg: rgba(255, 255, 255, .55);
  --card-border: rgba(255, 255, 255, .78);
  --card-sheen: linear-gradient(135deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, 0) 46%);
  --card-shadow: 0 30px 70px -36px rgba(30, 35, 60, .28), inset 0 1px 0 rgba(255, 255, 255, .9);
  --field-bg: rgba(255, 255, 255, .62);
  --field-border: rgba(20, 26, 40, .17);
  --soft-bg: rgba(255, 255, 255, .40);
}

@font-face {
  font-family: "Login Art Serif";
  src: url("./fonts/login-art-serif-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
html[data-boot="pending"] .login-page {
  visibility: hidden;
  animation: login-boot-reveal 1.5s steps(1, end) forwards;
}
@keyframes login-boot-reveal {
  to { visibility: visible; }
}

.login-page { position: relative; min-height: 100vh; overflow: hidden; isolation: isolate; }
.login-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.login-video-layer { position: absolute; inset: 0; z-index: 1; }
.login-video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: 58% center; opacity: 0; transition: opacity 336ms ease; }
.login-video.is-active, .login-video.is-ready { opacity: 1; }
.login-video.is-incoming { z-index: 2; opacity: 0; }
.login-video.is-incoming.is-active { opacity: 1; }
.login-video-poster { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% center; opacity: 0; transition: opacity 336ms ease; }
.login-video-poster.is-visible { opacity: 1; }
.login-video-poster.is-incoming { z-index: 1; opacity: 0; }
.login-video-poster.is-incoming.is-visible { opacity: 1; }
.login-video-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(90deg, transparent 46%, rgba(0, 0, 0, .105) 60%, rgba(0, 0, 0, .35) 100%), linear-gradient(to left, rgba(18, 18, 18, .85), rgba(18, 18, 18, .10)), linear-gradient(to top, rgba(18, 18, 18, .80), transparent 40%);
}
.login-page:has(.login-video-layer:not([hidden])) .login-top,
.login-page:has(.login-video-layer:not([hidden])) .login-copy { color: #f4f4f4; text-shadow: 0 1px 2px rgba(0, 0, 0, .52); }
.login-page:has(.login-video-layer:not([hidden])) .login-glow,
.login-page:has(.login-video-layer:not([hidden])) .login-grid { display: none; }
.login-page:has(.login-video-layer:not([hidden])) .login-copy { left: 72px; bottom: 72px; max-width: 600px; }
.login-page:has(.login-video-layer:not([hidden])) .login-copy h1 { color: #eeeeee; font-family: "Login Art Serif", "Source Han Serif SC", "Songti SC", serif; font-size: 36px; line-height: 1.45; font-weight: 500; letter-spacing: 0; }
.login-glow { position: absolute; border-radius: 50%; filter: blur(96px); opacity: var(--glow-opacity); will-change: transform; animation: login-drift 22s ease-in-out infinite alternate; }
.login-glow.is-one { width: 660px; height: 560px; left: -140px; top: -120px; background: var(--glow-1); opacity: .42; }
.login-glow.is-two { width: 620px; height: 520px; right: -120px; top: 4%; background: var(--glow-2); opacity: .30; animation-duration: 26s; animation-delay: -8s; }
.login-glow.is-three { width: 520px; height: 520px; left: 34%; bottom: -220px; background: var(--glow-3); opacity: .26; animation-duration: 30s; animation-delay: -14s; }
.login-glow.is-slate { width: 460px; height: 440px; right: 24%; top: 32%; background: var(--muted); opacity: .12; animation-duration: 34s; animation-delay: -20s; }
.login-glow.is-slate-soft { width: 420px; height: 400px; left: 2%; top: 44%; background: var(--muted); opacity: .08; animation-duration: 38s; animation-delay: -5s; }
@keyframes login-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(56px, 34px, 0) scale(1.08); }
  66% { transform: translate3d(-34px, 60px, 0) scale(.96); }
  to { transform: translate3d(24px, -28px, 0) scale(1.04); }
}
.login-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 100%);
  opacity: .5;
}
@media (prefers-reduced-motion: reduce) { .login-glow, .login-video { animation: none; transition: none; } }

.login-top { position: absolute; left: clamp(40px, 6vw, 96px); top: 40px; right: clamp(40px, 6vw, 112px); z-index: 2; display: flex; align-items: center; gap: 10px; }
.login-logo { display: grid; place-items: center; width: 34px; height: 34px; flex: none; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, var(--glow-1), var(--glow-2)); color: #fff; font-size: 15px; font-weight: 700; line-height: 1; }
.login-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.login-logo.is-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.login-landscape-logo { display: block; width: auto; height: 34px; max-width: min(220px, 30vw); object-fit: contain; object-position: left center; }
.login-landscape-logo.is-card { height: 32px; max-width: 190px; }
.login-brand-name { font-size: 16px; font-weight: 600; letter-spacing: .01em; }

.login-copy { position: absolute; left: 72px; bottom: 72px; z-index: 2; max-width: 600px; }
.login-copy h1 { margin: 0; font-family: "Login Art Serif", "Source Han Serif SC", "Songti SC", serif; font-size: 36px; line-height: 1.45; font-weight: 500; letter-spacing: 0; }
.login-copy h1 b { color: inherit; font-weight: 500; }

.login-panel { position: absolute; right: 72px; top: 50%; z-index: 2; width: 340px; transform: translateY(-50%); }
.login-card { width: 100%; padding: 28px; border: 1px solid var(--card-border); border-radius: 22px; background: var(--card-sheen), var(--card-bg); box-shadow: var(--card-shadow); backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%); }
@supports not (backdrop-filter: blur(1px)) {
  .login-card { background-color: rgba(16, 17, 22, .94); }
  :root[data-mode="light"] .login-card { background-color: rgba(255, 255, 255, .94); }
}
.login-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; min-height: 32px; }
.login-card-brand b { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; }
.login-card-brand span { display: block; color: color-mix(in srgb, var(--text) 62%, transparent); font-size: 12px; }
.login-segment { display: flex; width: 100%; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--field-border); border-radius: 12px; background: var(--soft-bg); }
.login-segment button { flex: 1; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; }
.login-segment button[aria-selected="true"] { background: var(--brand); color: var(--on-brand); font-weight: 600; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .7); }
.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.login-field[hidden] { display: none; }
.login-field > span, .login-field > label { color: color-mix(in srgb, var(--text) 66%, transparent); font-size: 12px; }
.login-field input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--field-border); border-radius: 10px; outline: none; background: var(--field-bg); color: var(--text); font-size: 14px; }
.login-field input::placeholder { color: var(--muted); opacity: .8; }
.login-field input:focus { border-color: var(--text); outline: 1px solid var(--text); outline-offset: -1px; }
.login-field input[aria-invalid="true"] { border-color: var(--danger); }
.login-code-row { display: flex; gap: 8px; }
.login-code-row input { flex: 1; min-width: 0; }
.login-secondary-button { height: 40px; flex: none; padding: 0 14px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--field-bg); color: var(--text); font-size: 13px; white-space: nowrap; }
.login-secondary-button:hover { border-color: var(--text); }
.login-secondary-button:disabled { color: var(--muted); cursor: not-allowed; background: transparent; }
.login-error { display: block; min-height: 0; margin: 0; color: var(--danger); font-size: 12px; line-height: 18px; }
.login-error:empty:not(.login-code-status) { display: none; }
.login-code-status { min-height: 18px; color: var(--danger); }
.login-hint { display: block; color: var(--muted); font-size: 12px; line-height: 18px; }
.login-primary-button { display: grid; place-items: center; width: 100%; height: 42px; margin-top: 2px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-size: 14px; font-weight: 600; }
.login-primary-button:hover { filter: brightness(1.05); }
.login-legal { margin: 14px 0 0; color: color-mix(in srgb, var(--text) 62%, transparent); font-size: 12px; line-height: 1.7; text-align: center; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

@media (max-width: 1360px) { .login-copy h1 { font-size: 36px; } }
@media (max-width: 900px) {
  .login-page { display: flex; flex-direction: column; min-height: 100vh; padding: 20px 20px 28px; overflow-x: hidden; overflow-y: auto; }
  .login-top { position: static; width: 100%; }
  .login-copy { position: static; max-width: none; margin-top: 68px; }
  .login-copy h1 { font-size: 32px; }
  .login-panel { position: static; width: 100%; max-width: 400px; margin: 30px auto 0; transform: none; }
}
@media (max-width: 767px) {
  .login-page:has(.login-video-layer:not([hidden])) .login-copy { left: 20px; bottom: auto; }
  .login-page:has(.login-video-layer:not([hidden])) .login-copy h1 { font-size: 32px; }
}
@media (max-width: 480px) {
  .login-page { padding: 16px 16px 24px; }
  .login-top { top: 0; }
  .login-copy { margin-top: 44px; }
  .login-copy h1 { font-size: 30px; }
  .login-panel { margin-top: 20px; }
  .login-card { padding: 20px; border-radius: 20px; }
  .login-card-head { margin-bottom: 14px; }
  .login-field { margin-bottom: 10px; }
  .login-field input, .login-secondary-button { height: 40px; }
  .login-secondary-button { padding: 0 10px; }
  .login-legal { margin-top: 12px; }
}

:root { --r12-selection-bg: #ffcc00; --r12-selection-fg: #1a1400; }
::selection { background: var(--r12-selection-bg); color: var(--r12-selection-fg); }
::-moz-selection { background: var(--r12-selection-bg); color: var(--r12-selection-fg); }
textarea::selection, input::selection { background: var(--r12-selection-bg); color: var(--r12-selection-fg); }
textarea::-moz-selection, input::-moz-selection { background: var(--r12-selection-bg); color: var(--r12-selection-fg); }
