body {
  margin: 0;
}

.main {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  /* background-color: #2c3e50; */
  background: linear-gradient(to right, #654ea3, #eaafc8);
}

.card {
  position: relative;
  height: 450px;
  width: 300px;
  /* background-color: #34495e; */
  background-color: #eaafc8;
  box-shadow: #43346b 5px 5px 20px;
  border-radius: 20px;
  overflow: hidden;
}

.card h1 {
  position: relative;
  text-align: center;
  font-size: 48px;
  margin-top: 100px;
  color: white;
  font-weight: bold;
  letter-spacing: 0.3rem;
  text-shadow: #43346bab 2px 2px 10px;
  z-index: 1;
}

.form {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100px;
  z-index: 1;
}

.form input {
  border: none;
  padding: 10px 0;
  outline: none;
  background: none;
  border-bottom: 2px solid white;
  color: white;
  width: 200px;
  z-index: 1;
}

.form input::placeholder {
  color: white;
}

.form input:focus::placeholder {
  color: #ddd;
}

.card button {
  display: block;
  background: none;
  outline: none;
  color: white;
  border: 1px solid white;
  border-radius: 40px;
  height: 36px;
  width: 160px;
  cursor: pointer;
  position: relative;
  margin: 0 auto;
  margin-top: 30px;
  z-index: 1;
}

/* 设置鼠标进入的样式 */
.card .in {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  display: block;
  width: 0;
  height: 0;
  border-radius: 50%;
  /* background: #3498bd; */
  background-image: linear-gradient(
    57.4deg,
    rgba(249, 206, 183, 1) 4.6%,
    rgba(234, 174, 202, 1) 26%,
    rgba(210, 182, 226, 1) 49.1%,
    rgba(173, 209, 242, 1) 86.5%
  );
  transform: translate(-50%, -50%);
  /* 使用in动画，持续0.8s,缓出的时间函数，停留在最后一帧 */
  animation: in 0.8s ease-out forwards;
}

/* 设置鼠标离开的样式 */
.card .out {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 1200px;
  height: 1200px;
  border-radius: 50%;
  /* background: #3498bd; */
  background-image: linear-gradient(
    57.4deg,
    rgba(249, 206, 183, 1) 4.6%,
    rgba(234, 174, 202, 1) 26%,
    rgba(210, 182, 226, 1) 49.1%,
    rgba(173, 209, 242, 1) 86.5%
  );
  transform: translate(-50%, -50%);
  animation: out 0.8s ease-out forwards;
}

/* 设置鼠标进入时，元素的动画 */
@keyframes in {
  /* 初始关键帧 */
  0% {
    width: 0;
    height: 0;
  }
  /* 结尾关键帧 */
  100% {
    width: 1200px;
    height: 1200px;
  }
}

/* 设置鼠标离开时，元素的动画 */
@keyframes out {
  /* 初始关键帧 */
  0% {
    width: 1200px;
    height: 1200px;
  }
  /* 结尾关键帧 */
  100% {
    width: 0;
    height: 0;
  }
}
