/* forgot.css - 找回账号和密码页专属样式 */

/* ========================================
   🚀 GPU 硬件加速优化 - 找回密码页特定元素
   ======================================== */
.forgot-form,
.seg-wrap,
.seg,
.seg-thumb,
.seg-item,
#verifySlide,
#codeBox,
#passwordFields {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 确保使用与登录页相同的布局 */
body { 
  padding-top: 0 !important; 
}

/* 找回页面主标题优化 - iOS26 深灰蓝色 */
.auth-card h1 {
  color: #1E293B !important; /* 深灰蓝，提升层次感 */
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}

/* 找回页面特有的提示文字样式 */
.forgot-form .text-muted {
  color: #4A5568; /* 更深的灰色，增强可读性 */
  line-height: 1.5;
  font-size: 13px;
}

#formMessage,
#step2Message {
  font-size: 13px;
  margin-bottom: 20px;
  border-radius: 12px;
  padding: 12px 16px;
}

/* =========================
   两步流程样式
   ========================= */
.forgot-step {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.forgot-step.hidden {
  display: none;
  opacity: 0;
  transform: translateX(20px);
}

/* 返回按钮样式 */
.step-back {
  margin-bottom: 16px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

.btn-back svg {
  flex-shrink: 0;
}

/* 第二步验证邮箱显示 */
.step-info strong {
  color: #3B82F6;
  font-weight: 600;
}

/* 移动端优化 - 密码字段全宽 */
@media (max-width: 767px) {
  .forgot-step .mb-4 {
    margin-bottom: 1.25rem !important;
  }
  
  .step-info {
    margin-bottom: 1.5rem !important;
  }
  
  .step-info p {
    font-size: 14px !important;
  }
}

/* =========================
   Glass Tabs 通用样式（登录页同款 - 滑动指示器版）
   ========================= */

/* 容器：玻璃态背景 */
.seg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.seg {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* 滑动蓝色背景指示器（无边框） */
.seg-thumb {
  position: absolute;
  height: calc(100% - 12px);
  width: 0;
  left: 0;
  top: 6px;
  border-radius: 22px;
  background: linear-gradient(180deg, #E3EEFF, #C6DBFF);
  box-shadow: 
    inset 0 0 6px rgba(255, 255, 255, 0.4),
    0 4px 10px rgba(80, 140, 255, 0.25);
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
              width 0.28s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform, width;
  z-index: 0;
  /* GPU硬件加速 - 提升滑动动画流畅度 */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  /* 隐藏扫光动画元素 */
}

/* 隐藏扫光动画 */
.seg-thumb .sheen {
  display: none;
}

/* 按钮基础样式 */
.seg-item {
  position: relative;
  z-index: 1;
  min-width: 120px;
  padding: 10px 24px;
  background: transparent;
  border: none;
  border-radius: 22px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #64748B;
  cursor: pointer;
  transition: color 0.25s ease;
  white-space: nowrap;
  /* iOS字体优化 */
  font-family: "SF Pro Display", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 激活状态 - 深蓝文字（无边框） */
.seg-item.is-active {
  color: #1E3A8A;
  font-weight: 700;
}

/* hover 效果 */
.seg-item:hover:not(.is-active) {
  color: #1E293B;
}

/* active 按压效果 */
.seg-item:active {
  transform: scale(0.98);
}

/* 响应式优化 */
@media (max-width: 480px) {
  .seg {
    padding: 5px;
    border-radius: 24px;
  }
  
  .seg-thumb {
    height: calc(100% - 10px);
    left: 0;
    top: 5px;
    border-radius: 20px;
  }
  
  .seg-item {
    min-width: 100px;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 20px;
  }
}

/* ================================================
   ✅ 共享样式已移至 login.css
   ================================================
   以下样式已在 login.css 中定义，避免重复：
   - .form-group (表单组)
   - .tip (动态密码提示)
   - @keyframes tipGlowIn (提示动画)
   - .input-group-pwd (密码输入组)
   - .toggle-visibility (密码可见性切换)
   - .icon-eye (眼睛图标)
   - 相关响应式样式
   ================================================ */

/* 🎯 找回密码页特有：密码强度条样式 */
.pw-strength {
  margin-top: 8px;
  margin-bottom: 4px;
}

.pw-strength-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.pw-strength-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 40%, #10b981 100%);
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* 移动端优化 */
@media (max-width: 576px) {
  .forgot-form .text-muted {
    font-size: 12px !important;
  }
}
