/* 科技感浅色背景设计 */
body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f1f3f4 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-attachment: fixed;
}

/* 曲线装饰元素 */
.bg-curves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.curve {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.curve-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(45deg, #b65148, transparent);
  top: -300px;
  left: -100px;
}

.curve-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #6c757d, transparent);
  bottom: -250px;
  right: -50px;
}

.curve-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(225deg, #b65148, transparent);
  top: 30%;
  left: 70%;
}

/* 登录卡片样式增强 */
.card-login {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(182, 81, 72, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.98);
  transition: box-shadow 0.3s ease;
  /* 使用transform而非margin定位 */
  transform: translateZ(0);
  will-change: transform;
}

.card-login:hover {
  box-shadow: 0 12px 40px rgba(182, 81, 72, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-login a {
  color: var(--bs-active-color);
  text-decoration: none;
}
.card-login input {
  font-size: 0.875rem;
}
.card-login .btn {
  font-size: 0.875rem;
}
.card-login .btn-login {
  font-size: 1rem;
}

/* 表单元素样式 */
.form-control {
  border: 1px solid #e9ecef;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  /* 移除transform过渡 */
  padding: 12px 16px;
}

.form-control:focus {
  border-color: #b65148;
  box-shadow: 0 0 0 0.2rem rgba(182, 81, 72, 0.25);
}

/* 按钮样式 */
.btn-secondary {
  background: linear-gradient(135deg, #b65148, #a04740);
  border: none;

  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #a04740, #8b3d36);
  box-shadow: 0 5px 15px rgba(182, 81, 72, 0.3);
}

.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  transform: translateY(-1px);
}

.vh-100 {
  min-height: 100vh;
  /* 使用flexbox避免vh单位导致的抖动 */
  display: flex;
  align-items: center;
}
/* 响应式调整 */
@media (max-width: 576px) {
  .card-login {
    margin: 20px;
    border-radius: 12px;
  }

  body {
    /* 移动设备使用固定背景 */
    background-attachment: fixed;
  }
}
.container,
.row,
.card {
  transform: translateZ(0);
}

/* 重新设计的粒子效果 - 随机大小和颜色 */
.particles {
  display: block !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* 粒子基础样式 - 使用CSS变量实现动态大小 */
.particle {
  position: absolute;
  width: var(--particle-size);
  height: var(--particle-size);
  background: var(--particle-color);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat var(--animation-duration) linear infinite;
  animation-delay: var(--animation-delay);
}

/* 主题色调的粒子颜色变量 */
:root {
  --primary-color: #b65148;
  --secondary-color: #6c757d;
  --primary-light: rgba(182, 81, 72, 0.6);
  --primary-medium: rgba(182, 81, 72, 0.4);
  --primary-dark: rgba(182, 81, 72, 0.2);
  --secondary-light: rgba(108, 117, 125, 0.5);
  --secondary-medium: rgba(108, 117, 125, 0.3);
  --secondary-dark: rgba(108, 117, 125, 0.1);
}

/* 更快的粒子动画 - 持续时间缩短 */
@keyframes particleFloat {
  0% {
    transform: translate3d(0, 100vh, 0) scale(0.3);
    opacity: 0;
  }
  3% {
    opacity: var(--particle-opacity);
    transform: translate3d(0, 97vh, 0) scale(1);
  }
  97% {
    opacity: var(--particle-opacity);
    transform: translate3d(var(--x-offset), 3vh, 0) scale(1);
  }
  100% {
    transform: translate3d(var(--x-offset), -20vh, 0) scale(0.8);
    opacity: 0;
  }
}

/* 响应式调整 - 移动端也更大 */
@media (max-width: 768px) {
  .particle {
    --particle-size: var(--mobile-size, 4px) !important;
  }
}
