/* ==================== 一、全局重置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================== 二、页面主体 ==================== */
body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: url(../images/banner.png) no-repeat center center fixed;
  background-size: cover;
  background-color: #fce4ec;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ==================== 三、主卡片容器 ==================== */
.auth-card {
  display: flex;
  max-width: 1000px;
  width: 100%;
  background: #ffffff;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 
    0 10px 40px rgba(200, 100, 120, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.1);
}

/* ==================== 四、左侧介绍区 ==================== */
.auth-intro {
  flex: 1;
  background: linear-gradient(160deg, #f8bbd0, #e8a0bf);
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* logo和文字横向排列 */
.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.logo-img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

.logo-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* 左侧描述文字 */
.auth-intro p {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

/* 切换按钮容器 */
.switch-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  z-index: 2;
}

/* 切换按钮 */
.switch-btn {
  padding: 14px 24px;
  border: 2px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-btn:hover {
  background: rgba(255,255,255,0.35);
  border-color: #fff;
}

.switch-btn.active {
  background: #fff;
  color: #d4738b;
  border-color: #fff;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* ==================== 五、右侧表单区 ==================== */
.auth-forms {
  flex: 1.2;
  padding: 50px 45px;
  background: #fffafc;
}

/* 表单面板 */
.form-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.4s ease;
}

.form-panel.active-form {
  display: flex;
}

/* 淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 表单标题 */
.form-panel h3 {
  font-size: 28px;
  color: #c0392b;
  font-weight: 700;
}

/* 表单副标题 */
.form-panel .sub-text {
  color: #999;
  font-size: 14px;
  margin-top: -10px;
}

/* ==================== 六、输入框样式 ==================== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  letter-spacing: 1px;
}

.input-field {
  display: flex;
  align-items: center;
  background: #fff5f7;
  border: 2px solid #f0d0d8;
  border-radius: 50px;
  padding: 4px 20px;
  transition: all 0.3s;
}

.input-field:focus-within {
  border-color: #e74c3c;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.input-field i {
  color: #e8a0bf;
  font-size: 16px;
  width: 24px;
}

.input-field input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 8px;
  font-size: 15px;
  outline: none;
  color: #333;
}

.input-field input::placeholder {
  color: #cba0ae;
}

/* ✅ 密码小眼睛图标（默认隐藏，JS 控制显示/隐藏） */
.input-field .toggle-password {
  display: none;
  color: #e8a0bf;
  font-size: 16px;
  cursor: pointer;
  padding: 0 10px;
  transition: color 0.3s;
  width: auto;
}

.input-field .toggle-password:hover {
  color: #d4738b;
}

/* ==================== 七、验证码 ==================== */
.code-field {
  padding-right: 8px;
}

.code-field input {
  flex: 1;
}

.code-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #f8bbd0, #e8a0bf);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
}

.code-btn:hover {
  background: linear-gradient(135deg, #e8a0bf, #d4738b);
}

.code-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ==================== 八、选项行 ==================== */
.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #888;
  cursor: pointer;
}

.forgot-link {
  color: #e74c3c;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* ==================== 九、提交按钮 ==================== */
.submit-btn {
  padding: 16px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
  letter-spacing: 2px;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.submit-btn:active {
  transform: scale(0.97);
}

/* ==================== 十、第三方登录 ==================== */
.social-login {
  text-align: center;
  margin-top: 10px;
}

.social-login span {
  color: #aaa;
  font-size: 13px;
}

/* SVG 社交图标样式 */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.social-icons .social-icon-svg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4738b;
  background: #fff5f7;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-icons .social-icon-svg:hover {
  color: #e74c3c;
  background: #ffe0e6;
  transform: scale(1.15);
}

/* ==================== 十一、自定义消息弹窗 ==================== */
.custom-alert {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.custom-alert.show {
  display: flex;
}

.custom-alert-content {
  background: #fff0f5;
  border: 3px solid #f8bbd0;
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(200, 100, 120, 0.4);
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.custom-alert-content p {
  font-size: 16px;
  color: #c0392b;
  margin-bottom: 20px;
  line-height: 1.8;
}

.custom-alert-btn {
  padding: 12px 40px;
  background: linear-gradient(135deg, #f8bbd0, #e8a0bf);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.custom-alert-btn:hover {
  background: linear-gradient(135deg, #e8a0bf, #d4738b);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(200, 100, 120, 0.3);
}

/* ==================== 十二、响应式设计 ==================== */
@media (max-width: 768px) {
  .auth-card {
    flex-direction: column;
    max-width: 450px;
  }
  
  .auth-intro {
    padding: 30px;
  }
  
  .logo-title {
    font-size: 24px;
  }
  
  .switch-buttons {
    flex-direction: row;
  }
  
  .switch-btn {
    flex: 1;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
  }
  
  .auth-forms {
    padding: 30px 25px;
  }
  
  .social-icons .social-icon-svg {
    width: 36px;
    height: 36px;
  }
}