/* login.css - 登录页 + 注册页 */

/* ============================== */
/* === 登录页 === */
/* ============================== */.login-page {
  background: #ffffff;
  padding: 20px 28px 0;
}

/* 背景动态光斑 */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s;
}
.login-page .bg-orb-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.18), transparent 70%);
  top: -80px; right: -100px;
  animation: orbFloat1 8s ease-in-out infinite;
}
.login-page .bg-orb-2 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(175, 82, 222, 0.12), transparent 70%);
  bottom: 120px; left: -80px;
  animation: orbFloat2 10s ease-in-out infinite;
}
.login-page.active .bg-orb { opacity: 1; }

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.1); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(0.9); }
}

/* Lottie 动画区域 */
.lottie-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 10px;
  opacity: 0;
  transform: scale(0.8);
  animation: lottieIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
  position: relative;
  z-index: 2;
}
.lottie-section lottie-player {
  width: 260px;
  height: 260px;
}

@keyframes lottieIn {
  to { opacity: 1; transform: scale(1); }
}

/* Logo + 标题 */
.login-header {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}
.login-title {
  font-size: 26px; font-weight: 700;
  color: #1c1c1e; letter-spacing: -0.5px;
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.3s forwards;
}
.login-subtitle {
  font-size: 14px; color: #86868b;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.4s forwards;
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* === 表单 === */
.form-section {
  flex: 1;
  position: relative;
  z-index: 2;
}
.input-row {
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease forwards;
}
.input-row:nth-child(1) { animation-delay: 0.5s; }
.input-row:nth-child(2) { animation-delay: 0.58s; }

.input-row label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: #6e6e73; margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.input-row input {
  width: 100%; height: 50px;
  border: none;
  border-bottom: 1.5px solid #e5e5ea;
  background: transparent;
  font-size: 17px; color: #1c1c1e;
  outline: none; padding: 0 2px;
  transition: border-color 0.3s;
  border-radius: 0;
}
.input-row input:focus { border-bottom-color: #007aff; }
.input-row input::placeholder { color: #c7c7cc; font-weight: 400; }

.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 60px; }
.toggle-pwd {
  position: absolute; right: 2px; bottom: 14px;
  font-size: 14px; color: #007aff;
  font-weight: 500; cursor: pointer; user-select: none;
}

.forgot-row {
  display: flex; justify-content: flex-end;
  margin: 4px 0 28px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.66s forwards;
}
.forgot-row a {
  font-size: 14px; color: #007aff;
  text-decoration: none; font-weight: 500;
}

/* === 主按钮 === */
.btn-primary {
  width: 100%; height: 52px;
  border: none; border-radius: 14px;
  font-size: 17px; font-weight: 600;
  color: #fff; cursor: pointer;
  background: #1c1c1e;
  position: relative; overflow: hidden;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.74s forwards;
  transition: transform 0.15s;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}
.btn-primary:hover::before { left: 100%; }

/* === 分割线 === */
.separator {
  display: flex; align-items: center;
  margin: 24px 0 18px;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.82s forwards;
}
.separator-line { flex: 1; height: 1px; background: #e5e5ea; }
.separator-text { font-size: 13px; color: #86868b; padding: 0 12px; }

/* === 第三方登录 === */
.social-row {
  display: flex; gap: 16px;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.9s forwards;
}
.social-btn {
  width: 52px; height: 52px;
  border-radius: 14px;
  border: 1.5px solid #e5e5ea;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: #d1d1d6;
}
.social-btn:active { transform: scale(0.92); }
.social-btn svg { width: 24px; height: 24px; }
.social-btn img { width: 28px; height: 28px; object-fit: contain; }

/* === 底部 === */
.login-footer {
  text-align: center;
  padding-bottom: 40px;
  font-size: 14px; color: #86868b;
  opacity: 0;
  animation: fadeIn 0.5s ease 1s forwards;
  position: relative; z-index: 2;
}
.login-footer a {
  color: #007aff; font-weight: 600;
  text-decoration: none; margin-left: 4px;
}

/* ============================== */
/* === 注册页 === */
/* ============================== */
.register-page {
  background: #ffffff;
  padding: 20px 28px 0;
}

.register-page .bg-orb-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.12), transparent 70%);
  top: -80px; right: -100px;
  animation: orbFloat1 9s ease-in-out infinite;
}
.register-page .bg-orb-2 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(175, 82, 222, 0.08), transparent 70%);
  bottom: 120px; left: -80px;
  animation: orbFloat2 11s ease-in-out infinite;
}
.register-page.active .bg-orb { opacity: 1; }

.register-page .lottie-section {
  margin-top: 0;
  margin-bottom: 8px;
}

.register-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative; z-index: 2;
}

.back-btn {
  position: absolute;
  top: 60px; left: 20px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0;
  animation: fadeIn 0.4s ease 0.1s forwards;
  z-index: 10;
}
.back-btn:active { transform: scale(0.88); }
.back-btn svg { width: 22px; height: 22px; fill: none; stroke: #1c1c1e; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.register-title {
  font-size: 26px; font-weight: 700;
  color: #fff; letter-spacing: -0.5px;
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.3s forwards;
}
.register-subtitle {
  font-size: 14px; color: #86868b;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.4s forwards;
}

.register-page .input-row { margin-bottom: 16px; }
.register-page .input-row:nth-child(1) { animation-delay: 0.5s; }
.register-page .input-row:nth-child(2) { animation-delay: 0.56s; }
.register-page .input-row:nth-child(4) { animation-delay: 0.62s; }
.register-page .input-row:nth-child(5) { animation-delay: 0.68s; }

.register-page .input-row label { color: #6e6e73; }
.register-page .input-row input {
  color: #1c1c1e;
  border-bottom-color: #e5e5ea;
}
.register-page .input-row input:focus { border-bottom-color: #007aff; }
.register-page .input-row input::placeholder { color: #c7c7cc; }
.register-page .toggle-pwd { color: #007aff; }

/* 验证码 */
.code-row {
  display: flex; gap: 12px; align-items: flex-end;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.62s forwards;
}
.code-row .input-row { flex: 1; margin-bottom: 0; animation: none; opacity: 1; transform: none; }
.code-btn {
  height: 50px; padding: 0 16px;
  border: none;
  border-bottom: 1.5px solid #e5e5ea;
  background: transparent;
  color: #007aff;
  font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.code-btn:disabled { color: #c7c7cc; }

/* 密码强度 */
.pwd-strength { display: flex; gap: 4px; margin-top: 10px; }
.pwd-bar {
  flex: 1; height: 3px; border-radius: 2px;
  background: #e5e5ea; transition: background 0.3s;
}
.pwd-bar.weak { background: #ff453a; }
.pwd-bar.medium { background: #ffd60a; }
.pwd-bar.strong { background: #30d158; }
.pwd-strength-label {
  font-size: 12px; color: #86868b;
  margin-top: 6px; transition: color 0.3s;
}

/* 协议 */
.agree-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 20px 0 22px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.74s forwards;
}
.agree-row input[type="checkbox"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid #d1d1d6;
  border-radius: 5px;
  background: transparent;
  cursor: pointer; flex-shrink: 0;
  margin-top: 1px; position: relative;
  transition: all 0.2s;
}
.agree-row input[type="checkbox"]:checked {
  background: #007aff; border-color: #007aff;
}
.agree-row input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff; font-size: 11px; font-weight: bold;
}
.agree-row label { font-size: 13px; color: #86868b; line-height: 1.5; }
.agree-row label a { color: #007aff; text-decoration: none; }

.register-page .btn-primary {
  background: #1c1c1e;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.5s ease 0.8s forwards;
}
.register-page .btn-primary::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.register-page .separator {
  opacity: 0;
  animation: fadeIn 0.5s ease 0.88s forwards;
}
.register-page .separator-line { background: #e5e5ea; }
.register-page .separator-text { color: #86868b; }

.register-page .social-row {
  opacity: 0;
  animation: fadeIn 0.5s ease 0.96s forwards;
}
.register-page .social-btn {
  background: #fff;
  border-color: #e5e5ea;
}
.register-page .social-btn:hover {
  background: #f5f5f7;
  border-color: #d1d1d6;
}

.register-page .login-footer {
  color: #86868b;
  opacity: 0;
  animation: fadeIn 0.5s ease 1.04s forwards;
}
.register-page .login-footer a { color: #007aff; }
