/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', 'Source Han Sans CN', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden; /* 隐藏滚动条 */
  height: 100vh;
  width: 100vw;
}

/* 窄屏顶部品牌条（<1200px显示） */
.brand-bar {
  display: none; /* 默认隐藏 */
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.brand-bar-content {
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
}

.brand-logo-small {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  padding: 4px;
  background: linear-gradient(145deg, 
    rgba(255, 255, 255, 0.9) 0%, 
    rgba(255, 255, 255, 0.7) 100%);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    inset 0 -1px 2px rgba(0, 0, 0, 0.05);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: smallLogoFloat 2.5s ease-in-out infinite;
}

.brand-logo-small:hover {
  transform: scale(1.15) translateY(-2px) rotate(5deg);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(0, 0, 0, 0.08);
  animation: smallLogoFloat 2.5s ease-in-out infinite, smallLogoPulse 1s ease-in-out infinite;
}

/* 小 Logo 浮动动画 */
@keyframes smallLogoFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* 小 Logo 脉冲动画 */
@keyframes smallLogoPulse {
  0%, 100% {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  }
  50% {
    filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
  }
}

.brand-text-small {
  font-size: 18px;
  font-weight: 400;
  color: #333;
}

/* 主容器 */
.login-container {
  width: 100%;
  height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
}

/* 左侧品牌区（≥1200px显示） */
.brand-section {
  display: none; /* 默认隐藏 */
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, 
    #e0e7ff 0%, 
    #c7d2fe 30%,
    #a5b4fc 60%,
    #818cf8 100%);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 粘土风格背景装饰 */
.brand-section::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.3) 0%, 
    rgba(255, 255, 255, 0.1) 40%,
    transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: float 8s ease-in-out infinite;
}

.brand-section::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, 
    rgba(139, 92, 246, 0.2) 0%, 
    rgba(139, 92, 246, 0.1) 50%,
    transparent 80%);
  border-radius: 50%;
  filter: blur(50px);
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -20px) scale(1.1);
  }
}

.brand-content {
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 160px;
  height: 160px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: logoContainerFloat 4s ease-in-out infinite;
}

/* Logo 容器整体浮动 */
@keyframes logoContainerFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* 粘土风格容器 */
.brand-logo::before {
  content: '';
  position: absolute;
  inset: -12px;
  background: linear-gradient(145deg, 
    #f5f7fa 0%, 
    #c3cfe2 50%,
    #f5f7fa 100%);
  border-radius: 32px;
  box-shadow: 
    /* 外阴影 - 柔和的大阴影 */
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.1),
    /* 内阴影 - 营造凹陷感 */
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    /* 高光效果 */
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 0;
  transition: all 0.3s ease;
  animation: containerGlow 4s ease-in-out infinite;
}

.brand-logo:hover::before {
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.2),
    0 12px 35px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  animation: containerGlow 2s ease-in-out infinite, containerPulse 1.5s ease-in-out infinite;
}

/* 容器光晕动画 */
@keyframes containerGlow {
  0%, 100% {
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.15),
      0 10px 30px rgba(0, 0, 0, 0.1),
      inset 0 2px 4px rgba(255, 255, 255, 0.8),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 0 0 rgba(139, 92, 246, 0);
  }
  50% {
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.15),
      0 10px 30px rgba(0, 0, 0, 0.1),
      inset 0 2px 4px rgba(255, 255, 255, 0.8),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 0 30px rgba(139, 92, 246, 0.2);
  }
}

/* 容器脉冲动画 */
@keyframes containerPulse {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.02) translateY(-1px);
  }
}

.logo-image {
  width: 140px;
  height: 140px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 20px;
  padding: 8px;
  background: linear-gradient(145deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  animation: logoFloat 3s ease-in-out infinite, logoPulse 2s ease-in-out infinite;
}

.logo-image:hover {
  transform: scale(1.08) translateY(-2px);
  animation: logoFloat 3s ease-in-out infinite, logoPulse 2s ease-in-out infinite, logoRotate 0.6s ease-in-out;
}

/* Logo 浮动动画 */
@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

/* Logo 脉冲动画 */
@keyframes logoPulse {
  0%, 100% {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1)) 
            drop-shadow(0 0 0 rgba(139, 92, 246, 0));
  }
  50% {
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.15)) 
            drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
  }
}

/* Logo 旋转动画（悬停时） */
@keyframes logoRotate {
  0% {
    transform: rotate(0deg) scale(1.08);
  }
  25% {
    transform: rotate(-5deg) scale(1.1);
  }
  75% {
    transform: rotate(5deg) scale(1.1);
  }
  100% {
    transform: rotate(0deg) scale(1.08);
  }
}

/* Logo 渐变光晕动画 */
.brand-logo::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 40px;
  background: conic-gradient(
    from 0deg,
    rgba(139, 92, 246, 0.1) 0deg,
    rgba(99, 102, 241, 0.2) 90deg,
    rgba(139, 92, 246, 0.1) 180deg,
    rgba(99, 102, 241, 0.2) 270deg,
    rgba(139, 92, 246, 0.1) 360deg
  );
  z-index: -1;
  opacity: 0;
  animation: logoAura 3s ease-in-out infinite;
  filter: blur(15px);
}

@keyframes logoAura {
  0%, 100% {
    opacity: 0;
    transform: rotate(0deg) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: rotate(180deg) scale(1.1);
  }
}

.brand-title {
  font-size: 36px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0;
}

/* 右侧表单区 */
.form-section {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* 表单卡片 */
.form-card {
  width: 380px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  padding: 32px;
}

/* 表单标题 */
.form-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 24px;
}

/* 表单组 */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

/* 输入框包装器 */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  z-index: 1;
  pointer-events: none;
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 40px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-input::placeholder {
  color: #999;
}

/* 密码显隐按钮 */
.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: color 0.3s;
}

.password-toggle:hover {
  color: #1890ff;
}

/* 验证码模块 */
.captcha-group {
  margin-bottom: 16px;
}

.captcha-wrapper {
  display: flex;
  gap: 8px;
}

.captcha-input {
  flex: 1;
  padding: 0 12px;
}

.captcha-image {
  width: 100px;
  height: 48px;
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  color: #1890ff;
  letter-spacing: 4px;
  user-select: none;
}

.captcha-image:hover {
  border-color: #1890ff;
}

/* 操作区 */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-input {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #1890ff;
}

.checkbox-label {
  font-size: 14px;
  font-weight: 400;
  color: #333;
}

.forgot-password {
  font-size: 12px;
  font-weight: 400;
  color: #1890ff;
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-password:hover {
  color: #096dd9;
}

/* 登录按钮 */
.login-button {
  width: 100%;
  height: 48px;
  background: #1890ff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 0;
}

.login-button:hover {
  background: #40a9ff;
}

.login-button:active {
  background: #096dd9;
}

.login-button:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

/* 错误提示 */
.error-message {
  margin-top: 16px;
  padding: 12px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  font-size: 12px;
  color: #ff4d4f;
  text-align: center;
}

/* 响应式设计 */
/* 宽屏（≥1200px） */
@media (min-width: 1200px) {
  .brand-section {
    display: flex !important;
  }
  
  .form-section {
    width: 60%;
  }
  
  .brand-bar {
    display: none !important;
  }
}

/* 窄屏（<1200px） */
@media (max-width: 1199px) {
  .brand-section {
    display: none !important;
  }
  
  .form-section {
    width: 100%;
    padding-top: 80px; /* 为顶部品牌条留空间 */
  }
  
  .brand-bar {
    display: block !important;
  }
}

/* 超小屏（≤768px） */
@media (max-width: 768px) {
  .form-card {
    width: calc(100% - 32px);
    padding: 24px;
    box-shadow: none;
  }
  
  .form-section {
    padding: 16px;
    padding-top: 80px;
  }
}
