/* ============================================
   注册/登录页面现代化样式 - 蓝色主题
   与全站 muban/assets/css 风格统一
   ============================================ */

/* ---------- 重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Microsoft YaHei', '微软雅黑', sans-serif;
  background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 50%, #4f46e5 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  position: relative;
  overflow: auto;
}

/* ---------- 背景装饰 ---------- */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

body::before {
  width: 500px;
  height: 500px;
  top: -200px;
  right: -150px;
}

body::after {
  width: 350px;
  height: 350px;
  bottom: -120px;
  left: -100px;
}

/* ---------- 页面容器 ---------- */
.auth-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  animation: authFadeIn 0.5s ease;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Logo / 标题区 ---------- */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 12px;
}

.auth-logo i {
  font-size: 48px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 20px;
  display: inline-block;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-title {
  font-family: 'Ubuntu', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.auth-subtitle a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.auth-subtitle a:hover {
  text-decoration: underline;
}

/* ---------- 表单卡片 ---------- */
.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 36px 32px;
}

/* ---------- 表单组 ---------- */
.auth-form-group {
  margin-bottom: 20px;
}

/* ---------- 输入框 ---------- */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #9ca3af;
  z-index: 1;
  transition: color 0.3s ease;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  font-size: 14px;
  font-family: inherit;
  color: #1a202c;
  background: #f8fafc;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: all 0.3s ease;
}

.auth-input:focus {
  background: #fff;
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.auth-input:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
  color: #1a56db;
}

.auth-input::placeholder {
  color: #9ca3af;
}

/* ---------- 验证码行 ---------- */
.auth-captcha-row {
  display: flex;
  gap: 12px;
}

.auth-captcha-input {
  flex: 1;
}

.auth-captcha-img {
  flex: 0 0 130px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid #e5e7eb;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
}

.auth-captcha-img:hover {
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.auth-captcha-img img {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-captcha-hint {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 3px;
  pointer-events: none;
}

/* ---------- 协议复选框 ---------- */
.auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.auth-agreement input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #1a56db;
  cursor: pointer;
}

.auth-agreement a {
  color: #1a56db;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-agreement a:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* ---------- 提交按钮 ---------- */
.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #1a56db;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.35);
}

.auth-submit-btn:hover {
  background: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26, 86, 219, 0.45);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* ---------- 底部链接 ---------- */
.auth-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.auth-footer-link a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

/* ---------- 密码强度指示器 ---------- */
.auth-password-strength {
  margin-top: 8px;
  display: flex;
  gap: 4px;
}

.auth-strength-bar {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.auth-strength-bar.weak {
  background: #ef4444;
}

.auth-strength-bar.medium {
  background: #f59e0b;
}

.auth-strength-bar.strong {
  background: #22c55e;
}

/* ---------- 错误/提示消息 ---------- */
.auth-tip {
  margin-top: 6px;
  font-size: 12px;
  color: #ef4444;
  padding-left: 4px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
  body {
    padding: 20px 16px;
    align-items: flex-start;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 14px;
  }

  .auth-title {
    font-size: 22px;
  }

  .auth-logo i {
    width: 64px;
    height: 64px;
    line-height: 64px;
    font-size: 36px;
  }

  .auth-input {
    height: 46px;
    font-size: 13px;
  }

  .auth-captcha-img {
    flex: 0 0 110px;
    height: 46px;
  }

  .auth-submit-btn {
    height: 46px;
    font-size: 15px;
  }
}
