/* ============================================
   破茧·归航 — 视觉特效共享层
   ----------------------------------------------
   为多个沉浸式页面（login / register / forgot-password）
   以及未来可能复用的登陆落地页提供共享类。
   依赖 andie-theme.css 的 --andie-* CSS 变量。
   ============================================ */

/* ============================================
   页面外壳
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  background: linear-gradient(135deg, #faf8f5 0%, #f5efe6 50%, #ede4d8 100%);
  overflow: hidden;
}

/* ============================================
   Aurora 背景（三团模糊光斑）
   ============================================ */
.login-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.login-aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.55;
  will-change: transform;
}
.login-aurora__blob--1 {
  width: 55vw; height: 55vw; max-width: 800px; max-height: 800px;
  background: radial-gradient(circle, rgba(135, 80, 200, 0.5) 0%, transparent 70%);
  top: -15%; left: -10%;
  animation: loginDrift 20s ease-in-out infinite alternate;
}
.login-aurora__blob--2 {
  width: 45vw; height: 45vw; max-width: 600px; max-height: 600px;
  background: radial-gradient(circle, rgba(224, 142, 142, 0.45) 0%, transparent 70%);
  bottom: -10%; right: -5%;
  animation: loginDrift 24s ease-in-out infinite alternate-reverse;
}
.login-aurora__blob--3 {
  width: 30vw; height: 30vw; max-width: 450px; max-height: 450px;
  background: radial-gradient(circle, rgba(143, 184, 212, 0.4) 0%, transparent 70%);
  top: 40%; left: 40%;
  animation: loginDrift 18s ease-in-out infinite alternate;
}

/* ============================================
   装饰粒子
   ============================================ */
.login-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(135, 80, 200, 0.15);
  pointer-events: none;
  animation: floatParticle 6s ease-in-out infinite;
}
.login-particle--1 { width: 8px;  height: 8px;  top: 20%; left: 8%;  animation-delay: 0s; }
.login-particle--2 { width: 12px; height: 12px; top: 60%; left: 5%;  animation-delay: 1.5s; }
.login-particle--3 { width: 6px;  height: 6px;  top: 35%; right: 6%; animation-delay: 3s; }
.login-particle--4 { width: 10px; height: 10px; bottom: 25%; right: 10%; animation-delay: 4.5s; }

/* ============================================
   分屏容器
   ============================================ */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}
@media (min-width: 992px) {
  .login-container {
    flex-direction: row;
    gap: 4rem;
    padding: 3rem 2rem;
  }
}

/* ============================================
   左侧品牌区
   ============================================ */
.login-brand {
  width: 100%;
  max-width: 480px;
  text-align: center;
}
@media (min-width: 992px) {
  .login-brand {
    text-align: left;
    flex: 1;
  }
}

.login-brand__mascot {
  width: 210px;
  max-width: 58%;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 16px 34px rgba(135, 80, 200, 0.18));
  animation: floatY 6.5s ease-in-out infinite;
}
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.login-brand__logo {
  width: 56px; height: 46px;
  margin-bottom: 0.75rem;
  animation: brandPop 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  transform: scale(0.8);
}

.login-brand__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--andie-charcoal);
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.15s;
}
.login-brand__title .dot {
  color: var(--andie-sage);
  display: inline-block;
  animation: pulseDot 2.2s ease-in-out infinite;
}

.login-brand__motto {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  letter-spacing: 0.16em;
  color: #6a3aa8;
  margin: 0 0 1rem;
  opacity: 0.92;
}

.login-brand__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #555;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(18px);
  animation: slideUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.3s;
}

/* ============================================
   信任徽章
   ============================================ */
.login-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: slideUpFade 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.45s;
}
@media (min-width: 992px) {
  .login-trust-badges { justify-content: flex-start; }
}
.login-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(135, 80, 200, 0.12);
  color: var(--andie-sage-dark);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(135, 80, 200, 0.06);
  transition: all 0.25s ease;
}
.login-trust-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(135, 80, 200, 0.12);
}

/* ============================================
   信息卡片（value-cards / help-cards 统一命名）
   保留旧名 .login-value-card / .login-help-card 作为别名，便于渐进迁移
   ============================================ */
.login-info-cards,
.login-value-cards,
.login-help-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  animation: slideUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.6s;
}
.login-info-card,
.login-value-card,
.login-help-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(135, 80, 200, 0.1);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.login-info-card:hover,
.login-value-card:hover,
.login-help-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 16px rgba(61, 61, 61, 0.06);
}
.login-info-icon,
.login-value-icon,
.login-help-icon {
  width: 40px; height: 40px;
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.login-info-icon--sage,
.login-value-icon--sage { background: rgba(135, 80, 200, 0.1); }
.login-info-icon--rose,
.login-value-icon--rose { background: rgba(224, 142, 142, 0.1); }
.login-info-icon--blue,
.login-value-icon--blue { background: rgba(143, 184, 212, 0.1); }

.login-info-card__title,
.login-value-card__title,
.login-help-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--andie-charcoal);
  line-height: 1.3;
}
.login-info-card__desc,
.login-value-card__desc,
.login-help-card__desc {
  font-size: 0.8125rem;
  color: #888;
  line-height: 1.4;
  margin-top: 2px;
}

/* ============================================
   右侧表单区 / 玻璃卡
   ============================================ */
.login-form-wrapper {
  width: 100%;
  max-width: 440px;
  perspective: 1200px;
}
@media (min-width: 992px) {
  .login-form-wrapper { flex-shrink: 0; }
}

.login-glass-card {
  position: relative;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 1.75rem;
  padding: 2.25rem 1.75rem;
  box-shadow: 0 24px 60px rgba(61, 61, 61, 0.1), 0 8px 24px rgba(135, 80, 200, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: translateY(30px) rotateX(4deg);
  animation: cardEnter 1s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.35s;
  overflow: hidden;
  transition: transform 0.25s ease;
}
.login-glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.75rem;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(135, 80, 200, 0.3), rgba(224, 142, 142, 0.25), rgba(143, 184, 212, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}

.login-glass-card__header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-glass-card__header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--andie-charcoal);
  margin-bottom: 0.25rem;
}
.login-glass-card__header p {
  color: #777;
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* ============================================
   Floating label 输入组
   ============================================ */
.login-input-group {
  position: relative;
  margin-bottom: 1.25rem;
}
.login-input-group input {
  width: 100%;
  padding: 1rem 0.875rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(135, 80, 200, 0.18);
  border-radius: 0.875rem;
  color: var(--andie-charcoal);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.login-input-group input:focus {
  border-color: var(--andie-sage);
  box-shadow: 0 0 0 4px rgba(135, 80, 200, 0.1);
}
.login-input-group label {
  position: absolute;
  left: 0.875rem;
  top: 1rem;
  font-size: 1rem;
  color: #999;
  pointer-events: none;
  background: transparent;
  padding: 0 0.25rem;
  transition: all 0.2s ease;
}
.login-input-group input:focus + label,
.login-input-group input:not(:placeholder-shown) + label {
  top: -0.55rem;
  left: 0.75rem;
  font-size: 0.8125rem;
  color: var(--andie-sage);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0.25rem;
}

/* ============================================
   选项行（记住我/协议/忘记密码）
   ============================================ */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}
.login-options a {
  color: var(--andie-sage-dark);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}
.login-options a::after,
.login-register-prompt a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.25s ease;
}
.login-options a:hover::after,
.login-register-prompt a:hover::after {
  width: 100%;
}

/* ============================================
   主按钮
   ============================================ */
.btn-login-primary {
  position: relative;
  width: 100%;
  padding: 0.95rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--andie-sage), var(--andie-sage-dark));
  border: none;
  border-radius: 0.875rem;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(135, 80, 200, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-login-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-login-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(135, 80, 200, 0.42);
}
.btn-login-primary:hover::before {
  opacity: 1;
}
.btn-login-primary:active {
  transform: translateY(0);
}

/* ============================================
   注册入口 / 返回链接 / 底部热线
   ============================================ */
.login-register-prompt {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(135, 80, 200, 0.12);
  font-size: 0.9375rem;
  color: #666;
}
.login-register-prompt a {
  color: var(--andie-sage-dark);
  font-weight: 700;
  text-decoration: none;
  position: relative;
}
.login-register-prompt a::after {
  height: 2px;
  background: var(--andie-sage);
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: #777;
  font-size: 0.875rem;
  opacity: 0;
  animation: slideUpFade 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.8s;
}
.login-footer a {
  color: var(--andie-sage-dark);
  font-weight: 600;
  text-decoration: none;
}

/* ============================================
   错误 shake
   ============================================ */
.shake-error {
  animation: shake 0.45s ease-in-out;
}

/* ============================================
   关键帧
   ============================================ */
@keyframes loginDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}
@keyframes brandPop {
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideUpFade {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.25); opacity: 0.75; }
}
@keyframes cardEnter {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes shake {
  0%, 100%   { transform: translateX(0); }
  20%, 60%   { transform: translateX(-6px); }
  40%, 80%   { transform: translateX(6px); }
}
@keyframes floatParticle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50%      { transform: translateY(-20px) scale(1.15); opacity: 0.7; }
}

/* ============================================
   Reduced motion 兜底
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .login-aurora__blob,
  .login-particle,
  .login-brand__logo,
  .login-brand__title,
  .login-brand__title .dot,
  .login-brand__subtitle,
  .login-trust-badges,
  .login-info-cards,
  .login-value-cards,
  .login-help-cards,
  .login-glass-card,
  .login-footer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
