/* Login page specific styles */
.main-content {
  display: flex;
  min-height: calc(100vh - 150px);
  background-image: url('../images/login_background.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.login-banner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 340px;
}

.banner-content {
  color: white;
  max-width: 500px;
  position: relative;
  z-index: 2;
}

.banner-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
}

.banner-subtitle {
  display: inline-block;
  padding: 10px 30px;
  border: 2px solid white;
  border-radius: 50px;
  font-size: 16px;
  margin-bottom: 20px;
}

/* Tool image that appears in the banner */
.tool-image {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 1;
}

/* Login form section */
.login-form-container {
  position: absolute;
  top: 50%;
  right: 250px;
  transform: translateY(-50%);
  width: 400px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  z-index: 2;
  overflow: hidden;
}

.login-box {
  padding: 30px;
  border-radius: 5px;
}

/* Tabs for login types */
.login-tabs {
  display: flex;
  position: relative;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.login-tab {
  padding: 10px 0;
  margin-right: 30px;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.3s;
  position: relative;
  z-index: 1;
}

.login-tab.active {
  color: var(--primary-color);
}

/* 滑块指示器 */
.tab-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
}

/* 确保在不同屏幕尺寸下选项卡布局合理 */
@media (max-width: 480px) {
  .login-tabs {
    justify-content: space-around;
  }
  
  .login-tab {
    margin-right: 0;
    text-align: center;
    flex: 1;
  }
}

/* 登录卡片内部对齐优化 */
.tab-content {
  padding: 5px 0;
}

.input-group {
  margin-bottom: 25px;
}

.input-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-color-light);
  font-weight: 500;
}

.input-field {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-field:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(21, 117, 64, 0.1);
}

/* 验证码输入框和按钮样式 */
.verification-code-group {
  display: flex;
  align-items: center;
}

.verification-input {
  flex: 1;
  margin-right: 10px;
}

.send-code-btn {
  white-space: nowrap;
  padding: 12px 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
  height: 42px; /* 确保与输入框高度一致 */
}

.send-code-btn:hover {
  background-color: var(--primary-color-dark);
}

.send-code-btn:disabled {
  background-color: var(--text-color-lighter);
  cursor: not-allowed;
}

/* 登录按钮优化 */
.login-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s, transform 0.2s;
  height: 45px;
}

.login-btn:hover {
  background-color: var(--primary-color-dark);
}

.login-btn:active {
  transform: translateY(1px);
}

/* 底部选项对齐优化 */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-color-light);
}

.login-options a {
  color: var(--primary-color);
  text-decoration: none;
}

.login-options a:hover {
  text-decoration: underline;
}

/* 自定义复选框样式 */
.custom-checkbox {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  display: inline-block;
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: #157540;
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: #157540;
  border-color: #157540;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  opacity: 0.9;
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
  animation: checkmark-appear 0.2s ease-out;
}

@keyframes checkmark-appear {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }
  100% {
    opacity: 0.9;
    transform: rotate(45deg) scale(1);
  }
} 

/* ========== 中等屏幕适配（平板/小桌面） ========== */
@media (max-width: 1400px) {
  .login-banner {
    padding-left: 120px;
  }

  .login-form-container {
    right: 120px;
  }
}

@media (max-width: 1200px) {
  .login-banner {
    padding-left: 60px;
  }

  .login-form-container {
    right: 60px;
    width: 380px;
  }
}

@media (max-width: 1000px) {
  .login-banner {
    padding-left: 30px;
  }

  .login-form-container {
    right: 30px;
    width: 360px;
  }

  .banner-title {
    font-size: 32px;
  }
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    min-height: calc(100vh - 56px);
    background-position: center;
    background-size: cover;
  }

  .login-banner {
    display: none;
  }

  .login-form-container {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: 360px;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

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

  .login-tabs {
    margin-bottom: 16px;
  }

  .login-tab {
    font-size: 14px;
    padding: 8px 0;
  }

  .input-group {
    margin-bottom: 14px;
  }

  .input-group input {
    height: 42px;
    font-size: 14px;
  }

  .login-btn,
  .submit-btn {
    height: 42px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .login-form-container {
    max-width: 92%;
    margin: 20px auto;
    border-radius: 10px;
  }

  .login-box {
    padding: 20px 16px;
  }
}
