/*
 * 登录页、注册页的全屏粒子舞台与悬浮账号卡（Alice 换肤不加载本文件）。
 * 舞台本体见 static/js/login-stage.js；body.stage-green 为注册页的绿色调。
 */
body.login-stage { display: block; background: radial-gradient(ellipse at 30% 50%, #0b3a6b 0%, #041227 46%, #02060f 100%) fixed; overflow-x: hidden; }
body.login-stage.stage-green { background: radial-gradient(ellipse at 30% 50%, #0b5a33 0%, #04241a 46%, #020a07 100%) fixed; }

#login-stage-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; cursor: grab; touch-action: none; opacity: 0; transition: opacity 1.4s ease; }
#login-stage-canvas.is-grabbing { cursor: grabbing; }
body.stage-ready #login-stage-canvas { opacity: 1; }
body.stage-fallback #login-stage-canvas, body.stage-fallback .stage-hud { display: none; }
body.login-stage.stage-fallback .brand-body { margin-bottom: 28px; }

/* 品牌层整体压在账号卡之上，语言菜单才不会被卡片挡住；本层不接收点击，只放开语言切换器与提示 */
body.login-stage .brand-panel { position: fixed; inset: 0; width: auto; display: flex; flex-direction: column; justify-content: flex-start; background: none; padding: 34px 48px 32px; z-index: 3; pointer-events: none; overflow: visible; }
body.login-stage .brand-panel::before, body.login-stage .brand-panel::after { display: none; }
body.login-stage .lang-switcher { position: absolute; pointer-events: auto; top: 26px; right: 32px; z-index: 10; }
body.login-stage .brand-body { margin-top: auto; max-width: 460px; animation: stage-rise 1.4s cubic-bezier(.2,.8,.2,1) .9s both; }
body.login-stage .brand-headline { font-size: 46px; letter-spacing: -1px; margin-bottom: 12px; text-shadow: 0 4px 40px rgba(25,156,255,.45); }
body.login-stage .brand-headline em { color: rgba(160,212,255,.82); }
body.login-stage .brand-sub { color: rgba(200,226,255,.6); max-width: 360px; }
body.login-stage .brand-features, body.login-stage .brand-steps { display: none; }
body.login-stage .brand-footer { color: rgba(200,226,255,.28); }

body.login-stage .form-panel { position: relative; z-index: 2; min-height: 100vh; background: none; justify-content: flex-end; padding: 40px clamp(24px, 6vw, 108px); pointer-events: none; overflow: visible; }
body.login-stage .form-box {
  pointer-events: auto; position: relative; max-width: 424px; padding: 34px 34px 24px; border-radius: 22px;
  background: rgba(250,252,255,.95); -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 40px 100px -30px rgba(0,10,36,.9), -28px 0 80px -40px rgba(25,156,255,.8), inset 0 1px 0 #fff;
  animation: stage-card-in 1.2s cubic-bezier(.2,.8,.2,1) .45s both;
}
@property --stage-edge { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
body.login-stage .form-box::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--stage-edge), transparent 0 64%, rgba(25,156,255,.85) 76%, #fff 81%, rgba(25,156,255,.85) 86%, transparent 97%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: stage-edge 8s linear infinite;
}
body.login-stage .login-tabs { border-bottom-color: #e8eef6; }

body.login-stage.stage-green .brand-headline { text-shadow: 0 4px 40px rgba(34,197,110,.45); }
body.login-stage.stage-green .brand-headline em { color: rgba(150,235,190,.85); }
body.login-stage.stage-green .brand-sub { color: rgba(200,245,220,.6); }
body.login-stage.stage-green .brand-footer { color: rgba(200,245,220,.28); }
body.login-stage.stage-green .stage-hint { color: rgba(190,240,215,.42); }
body.login-stage.stage-green .form-box { box-shadow: 0 40px 100px -30px rgba(0,24,12,.9), -28px 0 80px -40px rgba(34,197,110,.8), inset 0 1px 0 #fff; }
body.login-stage.stage-green .form-box::before {
  background: conic-gradient(from var(--stage-edge), transparent 0 64%, rgba(34,197,110,.85) 76%, #fff 81%, rgba(34,197,110,.85) 86%, transparent 97%);
}

@keyframes stage-edge { to { --stage-edge: 360deg; } }
@keyframes stage-card-in { from { opacity: 0; transform: translateY(22px) scale(.98); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes stage-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.stage-hud { margin: 22px 0 20px; animation: stage-rise 1.4s cubic-bezier(.2,.8,.2,1) 1.2s both; }
.stage-hint { font-size: 12px; color: rgba(190,220,255,.42); letter-spacing: .3px; }

@media (max-width: 900px) {
  body.login-stage .brand-panel { position: absolute; bottom: auto; height: 100vh; padding: 18px 18px; }
  body.login-stage .lang-switcher { top: 14px; right: 14px; }
  body.login-stage .brand-body, body.login-stage .brand-footer, body.login-stage .stage-hud { display: none; }
  body.login-stage .form-panel { justify-content: center; align-items: flex-start; padding: 44vh 12px 28px; }
  body.login-stage .form-box { max-width: 440px; padding: 28px 22px 18px; border-radius: 20px; background: rgba(255,255,255,.93); }
}
@media (prefers-reduced-motion: reduce) {
  body.login-stage .form-box, body.login-stage .brand-body, .stage-hud { animation: none; }
  body.login-stage .form-box::before { animation: none; }
}
