/* 登录/注册弹窗样式 */

/* 弹窗遮罩层 */
.auth-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* 弹窗显示状态 */
.auth-overlay.active {
  display: flex;
}

/* 弹窗容器 */
.auth-modal {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  animation: authFadeIn 0.25s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 弹窗标题 */
.auth-modal h2 {
  color: #1D2129;
  font-family: 'MiSans', sans-serif;
  font-size: 24px;
  margin-bottom: 24px;
  text-align: center;
}

/* 关闭按钮 */
.auth-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #86909C;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.auth-close:hover {
  color: #1D2129;
}

/* 表单组 */
.auth-form-group {
  margin-bottom: 16px;
}

/* 输入框 */
.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'MiSans', sans-serif;
  color: #1D2129;
  background: #F7F8FA;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #1D2129;
  background: #FFFFFF;
}

.auth-input::placeholder {
  color: #C9CDD4;
}

/* 验证码行 */
.auth-code-row {
  display: flex;
  gap: 12px;
}

.auth-code-row .auth-input {
  flex: 1;
}

/* 发送验证码按钮 */
.auth-send-code-btn {
  white-space: nowrap;
  padding: 12px 16px;
  border: 1px solid #1D2129;
  border-radius: 8px;
  background: transparent;
  color: #1D2129;
  font-size: 14px;
  font-family: 'MiSans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 110px;
  text-align: center;
}

.auth-send-code-btn:hover {
  background: #1D2129;
  color: #FFFFFF;
}

.auth-send-code-btn:disabled {
  border-color: #E5E6EB;
  color: #C9CDD4;
  cursor: not-allowed;
  background: transparent;
}

/* 提交按钮 */
.auth-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #1D2129;
  color: #FFFFFF;
  font-size: 16px;
  font-family: 'MiSans', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}

.auth-submit-btn:hover {
  opacity: 0.85;
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 错误提示 */
.auth-error {
  color: #F53F3F;
  font-size: 13px;
  margin-top: 4px;
  display: none;
  font-family: 'MiSans', sans-serif;
}

.auth-error.active {
  display: block;
}

/* 确认弹窗：高危操作输入确认框 */
.confirm-input-wrap {
  margin-top: 14px;
}

.confirm-input-wrap .auth-input {
  width: 100%;
  box-sizing: border-box;
}

/* 成功提示 */
.auth-success {
  color: #00B42A;
  font-size: 13px;
  margin-top: 4px;
  display: none;
  font-family: 'MiSans', sans-serif;
}

.auth-success.active {
  display: block;
}

/* 切换链接 */
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #86909C;
  font-family: 'MiSans', sans-serif;
}

/* 登录表单"去注册 | 忘记密码"分隔符 */
.auth-switch-sep {
  margin: 0 8px;
  color: #E5E6EB;
}

.auth-switch a {
  color: #1D2129;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* 密码规则提示 */
.auth-password-hint {
  font-size: 12px;
  color: #86909C;
  margin-top: 4px;
  font-family: 'MiSans', sans-serif;
  line-height: 1.5;
}

/* 密码强度指示器 */
.pwd-strength-container {
  height: 4px;
  background: #E5E6EB;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.pwd-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.pwd-strength-bar.weak {
  background: #F53F3F;
}

.pwd-strength-bar.medium {
  background: #FF7D00;
}

.pwd-strength-bar.strong {
  background: #00B42A;
}

.pwd-strength-text {
  font-size: 12px;
  margin-top: 4px;
  font-family: 'MiSans', sans-serif;
  line-height: 1.5;
}

.pwd-strength-text.weak {
  color: #F53F3F;
}

.pwd-strength-text.medium {
  color: #FF7D00;
}

.pwd-strength-text.strong {
  color: #00B42A;
}

/* 表单切换 */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

/* ========== 个人资料弹窗 ========== */

/* 字段标签 */
.auth-label {
  display: block;
  font-size: 14px;
  color: #1D2129;
  margin-bottom: 6px;
  font-family: 'MiSans', sans-serif;
}

/* 辅助提示（如"邮箱不可修改"） */
.auth-hint {
  font-size: 12px;
  color: #86909C;
  margin-top: 4px;
  font-family: 'MiSans', sans-serif;
}

/* 只读邮箱输入框 */
#profile-email {
  cursor: not-allowed;
  color: #86909C;
}

/* 底部操作区：修改密码 / 退出登录 / 注销账号 */
.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  border-top: 1px solid #F2F3F5;
  padding-top: 20px;
}

.profile-action-btn {
  flex: 1;
  min-width: 0;
}

/* 通用底部按钮 */
.profile-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'MiSans', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
  text-align: center;
}

.profile-btn:hover {
  opacity: 0.85;
}

/* 退出登录按钮（描边样式） */
.profile-btn-logout {
  border: 1px solid #1D2129;
  background: transparent;
  color: #1D2129;
}

/* 注销账号按钮（红色描边） */
.profile-btn-danger {
  border: 1px solid #F53F3F;
  background: transparent;
  color: #F53F3F;
}

/* ========== 通用确认弹窗 ========== */

/* 确认弹窗容器（更窄） */
.confirm-modal {
  width: 360px;
  text-align: center;
}

.confirm-modal h2 {
  margin-bottom: 12px;
}

/* 确认文案 */
.confirm-text {
  font-size: 15px;
  color: #4E5969;
  line-height: 1.6;
  margin: 0 0 24px;
  font-family: 'MiSans', sans-serif;
  word-break: break-all;
}

/* 确认按钮行 */
.confirm-actions {
  display: flex;
  gap: 12px;
}

.confirm-actions .auth-send-code-btn {
  flex: 1;
  min-width: 0;
}

.confirm-ok {
  flex: 1;
  margin-top: 0;
  min-width: 0;
}