/* 引入更优雅的字体 */
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Poppins:wght@100;200;300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

section {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  overflow-x: hidden;
}

section .bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: cover;
}

section .trees {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 100;
  pointer-events: none;
}

section .qc {
  position: absolute;
  top: 36.5vh;
  scale: (0.5);
  height: 40vh;
  width: auto;
  pointer-events: none;
  animation: animateqc 30s linear infinite;
}

@keyframes animateqc {
  0% {
    transform: translateX(-120vw) scale(0.5) scaleX(1);
  }

  50% {
    transform: translateX(110vw) scale(0.5) scaleX(1);
  }

  50.01%,
  100% {
    transform: translateX(110vw) scale(0.5) scaleX(-1);
  }

  99.99% {
    transform: translateX(-120.1vw) scale(0.5) scaleX(-1);
  }

  100% {
    transform: translateX(-120vw) scale(0.5) scaleX(1);
  }
}

.login {
  position: relative;
  padding: 60px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid transparent;
  border-radius: 24px;
  width: 500px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 80px rgba(255, 107, 157, 0.12);
  z-index: 4;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 登录卡片光泽边框效果 */
.login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 154, 139, 0.35) 50%,
    rgba(255, 107, 157, 0.4) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* 登录卡片悬停效果 */
.login:hover {
  transform: translateY(-4px);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 0 100px rgba(255, 107, 157, 0.18);
}

/* 标题样式美化 - 使用优雅的手写字体 */
/* 统一渐变色：珊瑚橙 → 玫瑰粉 → 桃粉 → 浅杏橙 */
.login h2 {
  position: relative;

  width: 100%;
  text-align: center;
  font-size: 3em;
  font-weight: 700;
  font-family: "Dancing Script", cursive;
  background: linear-gradient(
    135deg,
    #f15156 0%,
    #ff6b9d 35%,
    rgb(253, 160, 133) 65%,
    #fcb69fd7 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: 3px;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.4));
  }

  50% {
    filter: drop-shadow(0 0 20px rgba(255, 154, 139, 0.6));
  }
}

/* 右上角切换图片按钮 - 橙粉玻璃态设计 */
button {
  background: linear-gradient(
    135deg,
    rgba(255, 154, 139, 0.35) 0%,
    rgba(255, 107, 157, 0.28) 50%,
    rgba(253, 160, 133, 0.22) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border: 1px solid rgba(255, 154, 139, 0.4);
  border-radius: 12px;
  box-shadow:
    0 4px 15px rgba(255, 107, 157, 0.25),
    0 0 0 1px rgba(255, 154, 139, 0.15) inset;
  outline: none;
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0.9;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

#button:hover {
  opacity: 1;
  transform: scale(1.05);
  background: linear-gradient(
    135deg,
    rgba(255, 154, 139, 0.5) 0%,
    rgba(255, 107, 157, 0.42) 50%,
    rgba(253, 160, 133, 0.38) 100%
  );
  border-color: rgba(255, 107, 157, 0.6);
  box-shadow:
    0 8px 25px rgba(255, 107, 157, 0.4),
    0 0 0 1px rgba(255, 154, 139, 0.25) inset,
    0 0 15px rgba(255, 107, 157, 0.25);
}

#button:active {
  transform: scale(0.98);
}

/* 登录按钮 - 橙粉渐变设计 */
.login .inputBox #btn {
  position: relative;
  border: none;
  outline: none;
  background: linear-gradient(
    135deg,
    #ff9a8b 0%,
    #ff6b9d 35%,
    #fda085 65%,
    #fcb69f 100%
  );
  background-size: 200% 200%;
  opacity: 1;
  box-shadow:
    0 10px 30px rgba(255, 107, 157, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  color: rgba(255, 255, 255, 0.98);
  cursor: pointer;
  font-size: 1.2em;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* 按钮光泽效果 */
.login .inputBox #btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s ease;
}

.login .inputBox #btn:hover::before {
  left: 100%;
}

.login .inputBox #btn:hover {
  transform: translateY(-3px);
  background-position: 100% 50%;
  box-shadow:
    0 15px 40px rgba(255, 107, 157, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 0 25px rgba(255, 154, 139, 0.35);
}

.login .inputBox #btn:active {
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px rgba(255, 107, 157, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.login .inputBox {
  position: relative;
}

.login .inputBox input {
  position: relative;
  width: 100%;
  padding: 16px 50px 16px 24px;
  outline: none;
  font-size: 1.15em;
  font-family: "Poppins", sans-serif;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.login .inputBox input:focus {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-color: rgba(255, 107, 157, 0.5);
  box-shadow:
    0 0 25px rgba(255, 107, 157, 0.25),
    0 0 0 1px rgba(255, 154, 139, 0.35) inset;
  transform: translateY(-1px);
}

.login .inputBox ::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
  letter-spacing: 1px;
}

/* 密码显示/隐藏按钮 */
.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgba(253, 160, 133, 0.7);
  transition: all 0.3s ease;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.toggle-password:hover {
  color: rgba(255, 154, 139, 1);
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.leaves {
  position: absolute;
  width: 100%;
  height: 140%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  pointer-events: none;
}

.leaves .set {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.leaves .set div {
  position: absolute;
  display: block;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
  background-image: var(--leaf-svg);
  background-size: contain;
  background-repeat: no-repeat;
  width: 40px;
  height: 40px;
  opacity: 0.8;
}

.leaves .set div:nth-child(1) {
  left: 5%;
  animation: animate 18s linear infinite;
  animation-delay: 0s;
}

.leaves .set div:nth-child(2) {
  left: 15%;
  animation: animate2 22s linear infinite;
  animation-delay: 2s;
  transform: scale(0.9);
}

.leaves .set div:nth-child(3) {
  left: 30%;
  animation: animate3 25s ease-in-out infinite;
  animation-delay: 5s;
  transform: scale(1.1);
}

.leaves .set div:nth-child(4) {
  left: 45%;
  animation: animate 20s linear infinite;
  animation-delay: 7s;
  opacity: 0.6;
}

.leaves .set div:nth-child(5) {
  left: 60%;
  animation: animate2 16s linear infinite;
  animation-delay: 1s;
  transform: scale(0.8);
}

.leaves .set div:nth-child(6) {
  left: 75%;
  animation-delay: 3s;
  opacity: 0.8;
}

.leaves .set div:nth-child(7) {
  left: 85%;
  animation: animate 24s linear infinite;
  animation-delay: 4s;
  transform: scale(1.2);
}

.leaves .set div:nth-child(8) {
  left: 95%;
  animation: animate2 14s linear infinite;
  animation-delay: 6s;
  opacity: 0.7;
  transform: scale(0.7);
}

.leaves .set div:nth-child(9) {
  left: 10%;
  animation-delay: 8s;
  transform: scale(0.85);
}

.leaves .set div:nth-child(10) {
  left: 25%;
  animation: animate 17s linear infinite;
  animation-delay: 9s;
  opacity: 0.75;
}

.leaves .set div:nth-child(11) {
  left: 40%;
  animation: animate2 13s linear infinite;
  animation-delay: 10s;
  transform: scale(1.15);
}

.leaves .set div:nth-child(12) {
  left: 55%;
  animation: animate3 25s ease-in-out infinite;
  animation-delay: 11s;
  opacity: 0.6;
}

@keyframes animate {
  0% {
    opacity: 0;
    top: -10%;
    transform: translateX(0px) rotate(0deg) scale(1);
  }

  10% {
    opacity: 0.6;
  }

  20% {
    transform: translateX(-30px) rotate(45deg) scale(0.95);
  }

  40% {
    transform: translateX(40px) rotate(120deg) scale(0.9);
  }

  60% {
    transform: translateX(-30px) rotate(200deg) scale(0.95);
    opacity: 0.8;
  }

  80% {
    transform: translateX(30px) rotate(300deg) scale(0.9);
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    top: 110%;
    transform: translateX(-40px) rotate(360deg) scale(1);
  }
}

@keyframes animate2 {
  0% {
    opacity: 0;
    top: -5%;
    transform: translateX(-60px) rotate(-30deg) scale(1);
  }

  10% {
    opacity: 0.6;
  }

  30% {
    transform: translateX(50px) rotate(60deg) scale(1.05);
  }

  50% {
    transform: translateX(20px) rotate(150deg) scale(0.95);
    opacity: 0.7;
  }

  70% {
    transform: translateX(-30px) rotate(240deg) scale(1.1);
  }

  90% {
    transform: translateX(15px) rotate(320deg) scale(0.9);
    opacity: 0.4;
  }

  100% {
    opacity: 0;
    top: 105%;
    transform: translateX(30px) rotate(420deg) scale(1);
  }
}

@keyframes animate3 {
  0% {
    opacity: 0;
    top: -8%;
    transform: translateX(60px) rotate(20deg) scale(1);
  }

  15% {
    opacity: 0.85;
    transform: rotate(90deg) scale(1.1);
  }

  35% {
    transform: translateX(-30px) rotate(180deg) scale(0.85);
  }

  55% {
    transform: rotate(270deg) scale(1.05);
    opacity: 0.7;
  }

  75% {
    transform: translateX(20px) rotate(340deg) scale(0.9);
    opacity: 0.5;
  }

  100% {
    opacity: 0;
    top: 108%;
    transform: rotate(450deg) scale(1);
  }
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-1deg) translateX(-1px);
  }

  50% {
    transform: rotate(1deg) translateX(1px);
  }
}

.leaves .set div:nth-child(2),
.leaves .set div:nth-child(5),
.leaves .set div:nth-child(8),
.leaves .set div:nth-child(11) {
  animation:
    var(--animation-type) var(--animation-duration) linear infinite,
    sway 2s ease-in-out infinite;
}

/* 提示消息文字样式美化 */
#message {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ff9a8b 0%, #ff6b9d 50%, #fda085 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  line-height: 1.6;
}
