/**
 * auth.css - Auth Modal (blue-white split-layout) + legacy page styles
 */

/* ============================================
   Auth Modal - Blue-White Tech Theme
   ============================================ */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.auth-modal.active {
  opacity: 1;
  visibility: visible;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-modal__dialog {
  position: relative;
  width: 92%;
  max-width: 860px;
  transform: scale(0.92) translateY(24px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal.active .auth-modal__dialog {
  transform: scale(1) translateY(0);
}

.auth-modal__dialog-inner {
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  max-height: 90vh;
  background: var(--white, #FFFFFF);
  border: 1px solid var(--border-light, #E8EAED);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.15),
    0 0 60px rgba(66, 133, 244, 0.06);
}

/* =============================================
   Left: Hero Panel (animated tech graphics)
   ============================================= */
.auth-modal__hero {
  width: 42%;
  min-height: 540px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #3367D6 0%, #4285F4 50%, #5E97F6 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -- Grid overlay -- */
.auth-modal__hero-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 20%, transparent 70%);
  animation: authGridPulse 6s ease-in-out infinite;
}

@keyframes authGridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* -- Rotating rings -- */
.auth-modal__hero-ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  top: 50%;
  left: 50%;
}

.auth-modal__hero-ring--1 {
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  border-top-color: rgba(255, 255, 255, 0.3);
  border-right-color: rgba(255, 255, 255, 0.08);
  animation: authRingSpin 22s linear infinite;
}

.auth-modal__hero-ring--2 {
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  border-bottom-color: rgba(255, 255, 255, 0.25);
  border-left-color: rgba(255, 255, 255, 0.06);
  animation: authRingSpin 15s linear infinite reverse;
}

@keyframes authRingSpin {
  to { transform: rotate(360deg); }
}

/* -- Glowing orbs -- */
.auth-modal__hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
}

.auth-modal__hero-orb--1 {
  width: 140px;
  height: 140px;
  top: 12%;
  left: 8%;
  background: rgba(255, 255, 255, 0.15);
  animation: authOrbFloat1 8s ease-in-out infinite;
}

.auth-modal__hero-orb--2 {
  width: 100px;
  height: 100px;
  bottom: 18%;
  right: 8%;
  background: rgba(255, 255, 255, 0.12);
  animation: authOrbFloat2 10s ease-in-out infinite;
}

.auth-modal__hero-orb--3 {
  width: 70px;
  height: 70px;
  top: 58%;
  left: 55%;
  background: rgba(255, 255, 255, 0.1);
  animation: authOrbFloat3 12s ease-in-out infinite;
}

@keyframes authOrbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(15px, -20px) scale(1.15); opacity: 1; }
}

@keyframes authOrbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate(-20px, 15px) scale(1.2); opacity: 0.9; }
}

@keyframes authOrbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
  50% { transform: translate(10px, -15px) scale(1.1); opacity: 0.8; }
}

/* -- Scan line -- */
.auth-modal__hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.25), transparent);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
  animation: authScanline 5s ease-in-out infinite;
}

@keyframes authScanline {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* -- Floating particles -- */
.auth-modal__hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.auth-modal__hero-particles span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
  animation: authParticleFloat linear infinite;
}

.auth-modal__hero-particles span:nth-child(1) { left: 12%; animation-duration: 7s; }
.auth-modal__hero-particles span:nth-child(2) { left: 28%; animation-duration: 9s; animation-delay: 1.2s; width: 3px; height: 3px; }
.auth-modal__hero-particles span:nth-child(3) { left: 42%; animation-duration: 6.5s; animation-delay: 2.4s; }
.auth-modal__hero-particles span:nth-child(4) { left: 58%; animation-duration: 10s; animation-delay: 0.8s; width: 3px; height: 3px; background: rgba(255, 255, 255, 0.8); }
.auth-modal__hero-particles span:nth-child(5) { left: 72%; animation-duration: 7.5s; animation-delay: 3.5s; }
.auth-modal__hero-particles span:nth-child(6) { left: 88%; animation-duration: 8.5s; animation-delay: 1.8s; }
.auth-modal__hero-particles span:nth-child(7) { left: 22%; animation-duration: 9.5s; animation-delay: 4.2s; background: rgba(255, 255, 255, 0.5); }
.auth-modal__hero-particles span:nth-child(8) { left: 65%; animation-duration: 6s; animation-delay: 2.8s; }

@keyframes authParticleFloat {
  0%   { bottom: -5px; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { bottom: 105%; opacity: 0; }
}

/* -- Hero brand text -- */
.auth-modal__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.auth-modal__hero-badge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.auth-modal__hero-logo {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 10px;
  line-height: 1;
  color: #FFFFFF;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.35);
}

.auth-modal__hero-title {
  font-size: 26px;
  font-weight: 200;
  letter-spacing: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.auth-modal__hero-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 20px;
  letter-spacing: 3px;
  margin-bottom: 0;
}

/* =============================================
   Right: Content Panel (forms)
   ============================================= */
.auth-modal__content {
  flex: 1;
  padding: 52px 36px 40px;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Separator line */
.auth-modal__content::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-light, #E8EAED), transparent);
}

/* Content scrollbar */
.auth-modal__content::-webkit-scrollbar { width: 4px; }
.auth-modal__content::-webkit-scrollbar-track { background: transparent; }
.auth-modal__content::-webkit-scrollbar-thumb { background: var(--border-dark, #BDC1C6); border-radius: 2px; }

/* Close button (positioned on dialog-inner) */
.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-light, #E8EAED);
  border-radius: 8px;
  color: var(--text-muted, #9AA0A6);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-modal__close:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--danger, #EF4444);
}

/* ===== Tabs ===== */
.auth-modal__tabs {
  display: flex;
  margin-bottom: 28px;
  background: var(--gray-50, #FAFAFA);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border-light, #E8EAED);
}

.auth-modal__tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #5F6368);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.auth-modal__tab:hover:not(.active) {
  color: var(--text-primary, #202124);
}

.auth-modal__tab.active {
  color: #fff;
  background: var(--gradient-primary, linear-gradient(135deg, #4285F4, #3367D6));
  box-shadow: 0 2px 14px rgba(66, 133, 244, 0.25);
}

/* ===== Panels ===== */
.auth-modal__panel {
  display: none;
}

.auth-modal__panel.active {
  display: block;
  animation: authFadeIn 0.3s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Form ===== */
.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-modal__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #202124);
  letter-spacing: 0.5px;
}

.auth-modal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-modal__input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted, #9AA0A6);
  pointer-events: none;
  transition: color 0.25s ease;
}

.auth-modal__input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary, #202124);
  background: var(--white, #fff);
  border: 1px solid var(--border, #DADCE0);
  border-radius: 10px;
  outline: none;
  transition: all 0.25s ease;
}

.auth-modal__input:focus {
  border-color: var(--primary, #4285F4);
  background: var(--white, #fff);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.auth-modal__input-wrap:focus-within .auth-modal__input-icon {
  color: #4285F4;
}

.auth-modal__input::placeholder {
  color: var(--text-muted, #9AA0A6);
}

/* Toggle password */
.auth-modal__toggle-pwd {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted, #9AA0A6);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.auth-modal__toggle-pwd:hover,
.auth-modal__toggle-pwd.active {
  color: #4285F4;
}

/* Options row */
.auth-modal__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.auth-modal__check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary, #5F6368);
  line-height: 1.4;
  user-select: none;
}

.auth-modal__check input { display: none; }

.auth-modal__checkmark {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border, #DADCE0);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
  margin-top: 2px;
  background: var(--white, #fff);
}

.auth-modal__check input:checked + .auth-modal__checkmark {
  background: var(--primary, #4285F4);
  border-color: var(--primary, #4285F4);
}

.auth-modal__check input:checked + .auth-modal__checkmark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-modal__link {
  font-size: 13px;
  color: #4285F4;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.auth-modal__link:hover {
  color: var(--primary-dark, #3367D6);
  text-decoration: underline;
}

/* 协议链接组 */
.auth-modal__agreements {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-modal__agreement-link {
  font-size: 12px;
  color: var(--text-muted, #9AA0A6);
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-modal__agreement-link:hover {
  color: var(--primary, #4285F4);
  text-decoration: underline;
}

.auth-modal__agreement-sep {
  font-size: 11px;
  color: var(--border, #DADCE0);
  user-select: none;
}

/* Submit button */
.auth-modal__submit {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
  border: none;
  border-radius: 10px;
  color: #fff;
  background: var(--gradient-primary, linear-gradient(135deg, #4285F4, #3367D6));
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(66, 133, 244, 0.2);
  letter-spacing: 1px;
}

.auth-modal__submit:hover {
  box-shadow: 0 6px 28px rgba(66, 133, 244, 0.35);
  transform: translateY(-2px);
}

.auth-modal__submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(66, 133, 244, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .auth-modal__dialog-inner {
    flex-direction: column;
  }

  .auth-modal__hero {
    width: 100%;
    min-height: 160px;
  }

  .auth-modal__hero-ring--1 {
    width: 160px;
    height: 160px;
    margin: -80px 0 0 -80px;
  }

  .auth-modal__hero-ring--2 {
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
  }

  .auth-modal__hero-logo { font-size: 36px; }
  .auth-modal__hero-title { font-size: 18px; letter-spacing: 8px; }
  .auth-modal__hero-desc { margin-top: 10px; }

  .auth-modal__content {
    padding: 28px 24px;
  }

  .auth-modal__content::before { display: none; }

  .auth-modal__options {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .auth-modal__dialog { width: 96%; }
  .auth-modal__hero { min-height: 120px; }
  .auth-modal__hero-badge { display: none; }
  .auth-modal__content { padding: 24px 20px; }
  .auth-modal__tab { font-size: 13px; padding: 8px 0; }
}

/* ========== Legacy page styles (kept for login.html / register.html fallback) ========== */

/* ========== Hero 背景 ========== */
.auth-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + var(--space-2xl)) var(--space-md) var(--space-2xl);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #e8f0fe 50%, var(--bg-primary) 100%);
  overflow: hidden;
}

.auth-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.auth-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.auth-hero__glow--1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  top: -100px;
  right: -100px;
  opacity: 0.12;
}

.auth-hero__glow--2 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  bottom: -80px;
  left: -80px;
  opacity: 0.08;
}

/* ========== 认证卡片 ========== */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 50px rgba(59, 130, 246, 0.08);
  padding: var(--space-2xl);
  border: 1px solid rgba(59, 130, 246, 0.1);
  backdrop-filter: blur(10px);
}

.auth-card--register {
  max-width: 480px;
}

.auth-card__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-card__header .logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  text-decoration: none;
}

.auth-card__header .logo__icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.auth-card__header .logo__text {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.auth-card__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
}

.auth-card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ========== 表单样式 ========== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: var(--font-size-base);
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--white);
}

.form-input:focus + .form-icon,
.form-input:focus ~ .form-icon {
  color: #2563eb;
}

.form-input-wrap:focus-within .form-icon {
  color: #2563eb;
}

/* ========== 带验证码按钮的输入框 ========== */
.form-input-wrap--with-btn {
  position: relative;
}

.form-input-wrap--with-btn .form-input {
  padding-right: 120px;
}

.form-code-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
  min-width: 100px;
  background: linear-gradient(135deg, #4285F4, #3367D6);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-code-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3367D6, #2557C6);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.form-code-btn:disabled {
  background: var(--text-muted, #9AA0A6);
  cursor: not-allowed;
  opacity: 0.8;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.form-input--error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.1);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--danger);
  min-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.form-error:not(:empty) {
  min-height: 18px;
}

/* Toggle Password */
.form-toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.form-toggle-password:hover {
  color: var(--primary);
}

/* ========== 表单选项 ========== */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.form-checkbox input {
  display: none;
}

.form-checkbox__mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  transition: all var(--transition-fast);
  margin-top: 1px;
}

.form-checkbox input:checked + .form-checkbox__mark {
  background: var(--primary);
  border-color: var(--primary);
}

.form-checkbox input:checked + .form-checkbox__mark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-link {
  font-size: var(--font-size-sm);
  color: var(--primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

.form-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ========== 提交按钮 ========== */
.btn--full {
  width: 100%;
  padding: 14px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-top: var(--space-sm);
}

/* ========== 认证卡片底部 ========== */
.auth-card__footer {
  text-align: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ========== 密码强度指示器 ========== */
.password-strength {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: 4px;
}

.password-strength__bar {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.password-strength__bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
}

.password-strength--weak .password-strength__bar::after {
  width: 33%;
  background: var(--danger);
}

.password-strength--medium .password-strength__bar::after {
  width: 66%;
  background: var(--warning, #f49d37);
}

.password-strength--strong .password-strength__bar::after {
  width: 100%;
  background: var(--success);
}

.password-strength__text {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  min-width: 40px;
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
  .auth-hero {
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-sm) var(--space-lg);
  }

  .auth-card {
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .auth-card__title {
    font-size: var(--font-size-xl);
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   Auth Modal - 验证码按钮样式
   ============================================ */
.auth-modal__input-wrap--with-btn {
  position: relative;
}

.auth-modal__input-wrap--with-btn .auth-modal__input {
  padding-right: 110px;
}

.auth-modal__code-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
  min-width: 90px;
  background: linear-gradient(135deg, #4285F4, #3367D6);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-modal__code-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3367D6, #2557C6);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.auth-modal__code-btn:disabled {
  background: var(--text-muted, #9AA0A6);
  cursor: not-allowed;
  opacity: 0.8;
}

/* ============================================
   Toast 消息提示样式
   ============================================ */
.auth-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 11000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #202124);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.auth-toast__icon::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  vertical-align: middle;
}

.auth-toast--success {
  border-left: 4px solid #34A853;
}

.auth-toast--success .auth-toast__icon::before {
  background: #34A853;
  box-shadow: inset 0 0 0 3px #fff;
}

.auth-toast--error {
  border-left: 4px solid #EA4335;
}

.auth-toast--error .auth-toast__icon::before {
  background: #EA4335;
  box-shadow: inset 0 0 0 3px #fff;
}

.auth-toast--info {
  border-left: 4px solid #4285F4;
}

.auth-toast--info .auth-toast__icon::before {
  background: #4285F4;
  box-shadow: inset 0 0 0 3px #fff;
}

/* ============================================
   Loading 动画样式
   ============================================ */
.auth-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes authSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Submit 按钮禁用状态 */
.auth-modal__submit:disabled {
  background: var(--text-muted, #9AA0A6);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================
   手机号输入框图标
   ============================================ */
.auth-modal__input-icon[href="#icon-phone"],
.auth-modal__input-icon[href="#icon-shield"],
.auth-modal__input-icon[href="#icon-message-circle"] {
  stroke: currentColor;
  fill: none;
}

/* ============================================
   找回密码 - 返回登录链接
   ============================================ */
.auth-modal__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary, #5F6368);
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.auth-modal__back:hover {
  color: var(--primary, #4285F4);
}

.auth-modal__back .icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   找回密码 - 步骤指示器
   ============================================ */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  padding: 0 10px;
}

.auth-steps__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.auth-steps__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--border, #E8EAED);
  background: var(--white, #fff);
  color: var(--text-muted, #9AA0A6);
  transition: all 0.3s ease;
}

.auth-steps__item.active .auth-steps__number {
  border-color: var(--primary, #4285F4);
  background: var(--primary, #4285F4);
  color: #fff;
}

.auth-steps__item.completed .auth-steps__number {
  border-color: #34A853;
  background: #34A853;
  color: #fff;
}

.auth-steps__item.completed .auth-steps__number span {
  display: none;
}

.auth-steps__item.completed .auth-steps__number::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  margin-bottom: 2px;
}

.auth-steps__label {
  font-size: 12px;
  color: var(--text-muted, #9AA0A6);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.auth-steps__item.active .auth-steps__label {
  color: var(--primary, #4285F4);
  font-weight: 500;
}

.auth-steps__item.completed .auth-steps__label {
  color: #34A853;
}

.auth-steps__line {
  flex: 1;
  height: 2px;
  background: var(--border, #E8EAED);
  margin: 0 12px 20px;
  min-width: 50px;
  max-width: 80px;
  position: relative;
  transition: background 0.3s ease;
}

.auth-steps__line.completed {
  background: #34A853;
}

/* ============================================
   找回密码 - 步骤面板
   ============================================ */
.auth-modal__step {
  display: none;
  text-align: center;
  animation: authStepFadeIn 0.4s ease;
}

.auth-modal__step.active {
  display: block;
}

@keyframes authStepFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-modal__step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  border-radius: 50%;
  color: var(--primary, #4285F4);
}

.auth-modal__step-icon--shield {
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  color: var(--primary, #4285F4);
}

.auth-modal__step-icon--lock {
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  color: var(--primary, #4285F4);
}

.auth-modal__step-icon--success {
  background: linear-gradient(135deg, #e6f4ea 0%, #ceead6 100%);
  color: #34A853;
}

.auth-modal__step-icon .icon {
  width: 28px;
  height: 28px;
}

.auth-modal__step-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #202124);
  margin-bottom: 8px;
}

.auth-modal__step-desc {
  font-size: 14px;
  color: var(--text-secondary, #5F6368);
  margin-bottom: 24px;
}

.auth-modal__highlight {
  color: var(--primary, #4285F4);
  font-weight: 500;
}

/* 步骤内的表单样式调整 */
.auth-modal__step .auth-modal__form {
  text-align: left;
}

.auth-modal__step .auth-modal__submit {
  margin-top: 8px;
}

/* ============================================
   找回密码 - 6位验证码输入框
   ============================================ */
.auth-modal__code-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-modal__code-input {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary, #202124);
  border: 2px solid var(--border, #E8EAED);
  border-radius: 10px;
  background: var(--white, #fff);
  outline: none;
  transition: all 0.2s ease;
}

.auth-modal__code-input:focus {
  border-color: var(--primary, #4285F4);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.auth-modal__code-input:not(:placeholder-shown) {
  border-color: var(--primary, #4285F4);
}

/* ============================================
   找回密码 - 重发验证码
   ============================================ */
.auth-modal__resend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary, #5F6368);
}

.auth-modal__resend .auth-modal__link {
  font-weight: 500;
}

.auth-modal__resend .auth-modal__link:disabled,
.auth-modal__resend .auth-modal__link[disabled] {
  color: var(--text-muted, #9AA0A6);
  pointer-events: none;
}

/* ============================================
   响应式调整 - 找回密码
   ============================================ */
@media (max-width: 480px) {
  .auth-steps {
    padding: 0;
  }
  
  .auth-steps__line {
    min-width: 30px;
    margin: 0 6px 20px;
  }
  
  .auth-steps__label {
    font-size: 11px;
  }
  
  .auth-modal__code-input {
    width: 40px;
    height: 48px;
    font-size: 18px;
  }
  
  .auth-modal__code-inputs {
    gap: 6px;
  }
}
