/* 及简乐享 Demo - 登录页样式 */

/* 登录页容器 */
.login-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientBg 12s ease infinite;
  overflow: hidden;
}

@keyframes gradientBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 背景装饰 */
.login-bg-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-bg-decor .circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.login-bg-decor .circle:nth-child(1) {
  width: 500px;
  height: 500px;
  top: -120px;
  right: -100px;
}

.login-bg-decor .circle:nth-child(2) {
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: -60px;
}

.login-bg-decor .circle:nth-child(3) {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 10%;
  background: rgba(255, 255, 255, 0.04);
}

.login-bg-decor .circle:nth-child(4) {
  width: 150px;
  height: 150px;
  bottom: 20%;
  right: 15%;
  background: rgba(255, 255, 255, 0.05);
}

/* 登录容器 - 左右布局 */
.login-container {
  display: flex;
  width: 900px;
  max-width: 95%;
  min-height: 520px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: loginIn 0.6s ease;
  position: relative;
  z-index: 1;
}

@keyframes loginIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 左侧品牌区 */
.login-brand {
  flex: 1;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 60%, #0050b3 100%);
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.login-brand::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -80px;
  right: -80px;
}

.login-brand::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  bottom: -40px;
  left: -40px;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.login-brand-logo .logo-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  backdrop-filter: blur(4px);
}

.login-brand-logo .logo-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
}

.login-brand-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.login-brand-desc {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.85;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.login-brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.9;
}

.login-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* 右侧表单区 */
.login-form-area {
  flex: 1;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-header {
  margin-bottom: 36px;
}

.login-form-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.login-form-header p {
  font-size: 14px;
  color: #999;
}

/* 表单样式 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  position: relative;
}

.login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  z-index: 1;
  color: #bbb;
  transition: color 0.3s;
}

.login-field input {
  width: 100%;
  padding: 14px 14px 14px 46px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #333;
  background: #fafafa;
  transition: all 0.3s ease;
  outline: none;
}

.login-field input:focus {
  border-color: #1890ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.1);
}

.login-field input:focus ~ .login-field-icon,
.login-field input:not(:placeholder-shown) ~ .login-field-icon {
  color: #1890ff;
}

.login-field input::placeholder {
  color: #bbb;
}

/* 密码显示切换 */
.login-pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #bbb;
  padding: 4px;
  transition: color 0.3s;
}

.login-pwd-toggle:hover {
  color: #666;
}

/* 记住密码和忘记密码 */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1890ff;
  cursor: pointer;
}

.login-forgot {
  font-size: 14px;
  color: #1890ff;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.3s;
}

.login-forgot:hover {
  color: #096dd9;
}

/* 登录按钮 */
.login-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1890ff, #096dd9);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-submit:hover {
  background: linear-gradient(135deg, #40a9ff, #1890ff);
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.35);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 登录按钮加载动画 */
.login-submit.loading {
  pointer-events: none;
  opacity: 0.8;
}

.login-submit.loading::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 分割线 */
.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ccc;
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

/* 第三方登录 */
.login-social {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.login-social-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid #e8e8e8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-social-btn:hover {
  border-color: #1890ff;
  background: #e6f7ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 底部注册提示 */
.login-footer {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: #999;
}

.login-footer a {
  color: #1890ff;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.login-footer a:hover {
  color: #096dd9;
  text-decoration: underline;
}

/* 错误提示 */
.login-error {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 8px;
  color: #f5222d;
  font-size: 13px;
  animation: shakeX 0.4s ease;
}

.login-error.show {
  display: flex;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

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

.login-captcha-row .login-field {
  flex: 1;
}

.login-captcha-img {
  width: 120px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0f2f5, #e6e8eb);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  letter-spacing: 6px;
  color: #333;
  user-select: none;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 2px solid #e8e8e8;
}

.login-captcha-img::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  top: 40%;
  transform: rotate(-5deg);
}

.login-captcha-img::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  top: 65%;
  transform: rotate(3deg);
}

.login-captcha-img:hover {
  border-color: #1890ff;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    min-height: auto;
    max-height: 95vh;
    overflow-y: auto;
    width: 92%;
    border-radius: 16px;
  }

  /* 移动端隐藏左侧品牌大区块，显示精简版 */
  .login-brand {
    padding: 30px 24px 24px;
    min-height: auto;
  }

  .login-brand-logo .logo-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .login-brand-logo .logo-text {
    font-size: 22px;
  }

  .login-brand-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .login-brand-desc {
    font-size: 13px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .login-brand-features {
    display: none;
  }

  .login-form-area {
    padding: 28px 24px 32px;
  }

  .login-form-header {
    margin-bottom: 24px;
  }

  .login-form-header h2 {
    font-size: 22px;
  }

  .login-field input {
    padding: 12px 12px 12px 42px;
    font-size: 14px;
  }

  .login-submit {
    padding: 13px;
    font-size: 15px;
  }

  .login-social-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (max-width: 375px) {
  .login-container {
    width: 96%;
  }

  .login-brand {
    padding: 24px 20px 20px;
  }

  .login-brand-title {
    font-size: 18px;
  }

  .login-form-area {
    padding: 24px 20px 28px;
  }
}
