.wrapper {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  display: flex;
  max-width: 400px;
  height: 500px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all 0.3s ease-in-out;
  z-index: 99999;
}
.wrapper:hover {
  background: rgba(129, 199, 212, 0.8);
  box-shadow: 0px 0px 19px 0px rgba(0, 0, 0, 0.75);
}
.wrapper.active-popup {
  opacity: 1;
  transform: scale(1);
  transition: all 0.5s ease;
  pointer-events: auto;
}
.wrapper.active {
  pointer-events: auto;
}
.wrapper.active.show-register {
  height: 630px;
}

.wrapper.active.show-forgot {
  height: 350px;
}
.wrapper.active.show-forgot .login-register {
  margin-bottom: -15px;
}
.wrapper .form-box {
  width: 100%;
  padding: 40px;
}
/* .wrapper .form-box.login { */
/* transition: transform 0.18s ease; */
/* transform: translateX(0px); */
/* } */
.wrapper .form-box.register {
  position: absolute;
  transition: none;
  transform: translateX(400px);
}
.wrapper .form-box.forgot {
  position: absolute;
  transition: none;
  transform: translateX(400px);
}
.wrapper.active .form-box.login {
  transition: none;
  transform: translateX(-400px);
}
.wrapper.active .form-box.register {
  transition: transform 0.18s ease;
  transform: translateY(10px);
}
.wrapper.active .form-box.forgot {
  transition: transform 0.18s ease;
  transform: translateY(10px);
}
/* 登入 */
.wrapper.show-login .form-box.register,
.wrapper.show-login .form-box.forgot {
  display: none;
}

/* 註冊 */
.wrapper.show-register .form-box.login,
.wrapper.show-register .form-box.forgot {
  display: none;
}
.wrapper.show-register .form-box.register {
  transform: translateX(0);
}

/* 忘記密碼 */
.wrapper.show-forgot .form-box.login,
.wrapper.show-forgot .form-box.register {
  display: none;
}
.wrapper.show-forgot .form-box.forgot {
  transform: translateX(0);
}

.wrapper .icon-close {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 50px;
  height: 50px;
  font-size: 2em;
  color: #fff;
  justify-content: center;
  display: flex;
  align-items: center;
  border-bottom-left-radius: 20px;
  cursor: pointer;
  z-index: 1;
}
.form-box h2 {
  font-size: 2em;
  color: #fff;
  text-align: center;
}
.input-box {
  position: relative;
  width: 100%;
  height: 50px;
  border-bottom: 2px solid #fff;
  margin: 30px 0;
}
.input-box label {
  position: absolute;
  top: 16px; /* 初始位置 */
  left: 5px;
  font-size: 1.2em;
  color: #fff;
  font-weight: 600;
  pointer-events: none;
  transition: 0.3s ease;
}
.input-box input:focus ~ label,
.input-box input:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 5px;
  font-size: 1em;
  color: #ccf9fe;
}
.input-box input {
  width: 100%;
  height: 80%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1em;
  color: #fff;
  font-weight: 600;
  padding: 0 35px 0 5px;
  border-radius: 20px;
  text-indent: 10px;
  margin: 8px 0;
}
.input-box .icon {
  position: absolute;
  top: 50%;
  right: 8px;
  margin-top: -25px;
  /* transform: translateY(-50%); */
  font-size: 1.2em;
  color: #fff;
  line-height: 57px;
}
.remember-forgot {
  font-size: 0.9em;
  font-weight: bold;
  margin-top: -25px;
  display: flex;
  justify-content: space-between;
  color: #fff;
}
.remember-forgot label input {
  accent-color: #87ceeb;
  margin-right: 3px;
}
.remember-forgot a {
  text-decoration: none;
  color: #fff;
}
.remember-forgot a:hover {
  text-decoration: underline;
}
#btn-login {
  color: #81c7d4;
  width: 100%;
  height: 45px;
  background: #ccf9fe;
  border: none;
  outline: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.3em;
  transition: 0.5s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
}
#btn-register {
  color: #81c7d4;
  width: 100%;
  height: 45px;
  background: #ccf9fe;
  border: none;
  outline: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.3em;
  transition: 0.5s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
}
#btn-forgot {
  color: #81c7d4;
  width: 100%;
  height: 45px;
  background: #ccf9fe;
  border: none;
  outline: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.3em;
  transition: 0.5s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
}
#btn-login:hover,
#btn-register:hover,
#btn-forgot:hover {
  background: #b3f0f5;
  transform: scale(1.05);
}
.login-register,
.login-social {
  font-size: 1em;
  color: #fff;
  text-align: center;
  font-weight: 500;
}
.login-social img {
  width: 32px;
  height: 32px;
  margin: 0 3px;
  background: #fff;
  border-radius: 100%;
  padding: 5px;
}
.login-social img:hover {
  background: #f1f1f1;
  transform: scale(1.1);
  transition: 0.5s;
}
.login-register p a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.login-register p a:hover {
  text-decoration: underline;
}
.login-text-container {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 15px;
}
.login-text-container::before,
.login-text-container::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background-color: #fff;
  margin: 0 10px;
}
@media screen and (max-width: 446px) {
  .wrapper {
    margin-inline: 20px;
  }

}