* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  font-family: Inter;
}

:root {
  --linear-grad: #ffa03f;
}

.login-main {
  display: flex;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  height: 80vh;
  justify-content: center;
  align-items: center;
}

.container {
  position: relative;
  width: 850px;
  height: 500px;
  background-color: #fff;
  box-shadow: 25px 30px 55px #5557;
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
}

.form-container {
  position: absolute;
  width: 60%;
  height: 100%;
  padding: 0px 30px;
  transition: all 0.6s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sign-up-container,
.sign-in-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sign-up-container {
  opacity: 0;
  z-index: 1;
}

.sign-in-container {
  z-index: 2;
}
form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-container h1 {
  color: #000;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.8rem;
}

.infield {
  position: relative;
  margin: 10px 0;
  width: 100%;
  height: 40px;
}

.infield input {
  border-radius: 4px;
  height: 80%;
  width: 100%;
  border: none;
  outline: none;
  padding: 8px 35px;
  transition: all 0.2s ease;
  border-bottom: 1.5px solid #aaaaaa;
  font-size: 0.8rem;
}

.form-container button {
  border-radius: 8px;
  width: 100%;
  border: none;
  outline: none;
  padding: 8px 0;
  background-color: #040200;
  color: #fff;
  text-align: center;
  cursor: pointer;
  margin-top: 12px;
  font-size: 0.9rem;
}

.log-in .forgot {
  font-size: 11px;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #ff3f6c;
}

.sign-up-form .have_account a,
.sign-in-form .Dont_have_account a {
  color: #ff3f6c;
  font-size: 11px;
}

.sign-up-form .have_account a:hover,
.sign-in-form .Dont_have_account a:hover {
  text-decoration: underline;
}

.infield i {
  position: absolute;
  top: 40%;
  font-size: 15px;
  transform: translateY(-52%);
  color: #707070;
  left: 8px;
}

.infield img {
  position: absolute;
  width: 18px;
  top: 45%;
  transform: translateY(-50%);
  color: #707070;
  right: 8px;
  z-index: 9999;
  cursor: pointer;
  transition: color 0.3s ease;
}

/* Existing Overlay Container & Other Specific Styles */
.overlay-container {
  position: absolute;
  top: 0;
  left: 60%;
  width: 40%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 9;
}

#overlayBtn {
  cursor: pointer;
  position: absolute;
  left: 50%;
  top: 304px;
  transform: translateX(-50%);
  width: 143.67px;
  height: 40px;
  border: 1px solid #fff;
  background: transparent;
  border-radius: 20px;
}

.overlay {
  position: relative;
  background: var(--linear-grad);
  color: #fff;
  left: -150%;
  height: 100%;
  width: 250%;
  transition: transform 0.6s ease-in-out;
}

.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0px 30px;
  text-align: center;
  height: 100%;
  width: 300px;
  transition: 0.6s ease-in-out;
}

.overlay-left {
  right: 60%;
  transform: translateX(-12%);
}

.overlay-right {
  right: 0;
  transform: translateX(0%);
}

.overlay-panel h1 {
  color: #fff;
  font-size: 1.5rem;
}

.form-container p {
  font-size: 13px;
  font-weight: 300;
  line-height: 18px;
  letter-spacing: 0.4px;
  margin: 20px 0px 30px;
}

.right-panel-active .overlay-container {
  transform: translateX(-150%);
}

.right-panel-active .overlay {
  transform: translateX(50%);
}

.right-panel-active .overlay-left {
  transform: translateX(25%);
}

.right-panel-active .overlay-right {
  transform: translateX(35%);
}

.right-panel-active .sign-in-container {
  transform: translateX(20%);
  opacity: 0;
}

.right-panel-active .sign-up-container {
  transform: translateX(66.7%);
  opacity: 1;
  z-index: 5;
  animation: show 0.6s;
}

@keyframes show {
  0%,
  50% {
    opacity: 0;
    z-index: 1;
  }
  50.1%,
  100% {
    opacity: 1;
    z-index: 5;
  }
}

.btnScaled {
  animation: scaleBtn 0.6s;
}

@keyframes scaleBtn {
  0% {
    width: 143.67px;
  }
  50% {
    width: 250px;
  }
  100% {
    width: 143.67px;
  }
}

#overlayBtn {
  cursor: pointer;
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  width: 143.67px;
  height: 40px;
  border: 1px solid #fff;
  background: transparent;
  border-radius: 20px;
}
.overlay-left button {
  border: none;
  background-color: transparent;
  position: absolute;
  left: 52%;
  color: #fff;
  top: 70%;
  transform: translate(-50%, -50%);
  width: 143.67px;
  height: 40px;
}
.overlay-right button {
  border: none;
  background-color: transparent;
  position: absolute;
  left: 48%;
  color: #fff;
  top: 70%;
  transform: translate(-50%, -50%);
  width: 143.67px;
  height: 40px;
}

.overlay {
  position: relative;
  background: url("../../assets/login-background.jpg");
  background-size: cover;
  color: #fff;
  left: -150%;
  height: 100%;
  width: 250%;
  transition: transform 0.6s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay-panel {
  position: absolute;
  display: flex;
  margin-right: 1rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  height: 100%;
  width: 300px;
  transition: 0.6s ease-in-out;
}
.overlay-panel h1 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.overlay-panel p {
  color: #fff;
  font-size: 12px;
}
.overlay-content {
  margin-bottom: 4rem;
}

.Dont_have_account {
  display: none;
}
.have_account {
  display: none;
}

@media (max-width: 985px) {
  .container {
    width: 700px;
  }
  #overlayBtn {
    left: 50%;
    top: 70%;
    transform: translate(-50%, -50%);
    width: 143.67px;
    height: 40px;
    border-radius: 20px;
  }
  .overlay-left button {
    left: 58%;
    color: #fff;
    top: 70%;
    transform: translate(-50%, -50%);
    width: 143.67px;
    height: 40px;
  }
  .overlay-right button {
    border: none;
    background-color: transparent;
    position: absolute;
    left: 59%;
    color: #fff;
    top: 70%;
    transform: translate(-50%, -50%);
    width: 143.67px;
    height: 40px;
  }

  .overlay-panel {
    margin-right: 1rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    height: 100%;
    width: 300px;
    transition: 0.6s ease-in-out;
  }
  .overlay-panel h1 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  .overlay-panel p {
    color: #fff;
    font-size: 12px;
  }
  .overlay-content {
    margin-bottom: 4rem;
    margin-left: 3rem;
  }
}

@media (max-width: 805px) {
  .form button {
    width: 100px;
  }
  .login-main {
    height: 83vh;
  }
  .container {
    width: 560px;
    height: 400px; /* Adjust height as needed */
  }

  .form-container {
    width: 60%;
    padding: 0 20px;
  }

  .overlay-container {
    width: 40%;
    left: 60%; /* Position it next to the form-container */
  }

  .overlay {
    width: 250%; /* Maintain the width for the overlay animation */
    left: -150%; /* Adjust position according to the new width */
  }

  .right-panel-active .overlay-container {
    transform: translateX(-150%);
  }

  .right-panel-active .overlay {
    transform: translateX(50%);
  }

  .overlay-panel {
    width: 250px;
  }

  .form-container h1 {
    font-size: 1.5rem;
  }

  .form-container button {
    font-size: 0.8rem;
  }

  .form-container p {
    font-size: 12px;
  }

  .infield input {
    font-size: 0.75rem;
  }

  .overlay-panel h1 {
    font-size: 1.2rem;
  }

  .overlay-panel p {
    font-size: 11px;
  }

  #overlayBtn {
    width: 120px;
    height: 35px;
  }

  .overlay-left button {
    width: 120px;
    left: 60%;
    height: 35px;
  }
  .overlay-right button {
    width: 120px;
    left: 62%;
    height: 35px;
  }
}

@media (max-width: 630px) {
  /* Hide the overlay container */
  .overlay-container {
    display: none;
  }

  /* Adjust the container to take full width without the overlay */
  .container {
    width: 70%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .form-container {
    width: 100%;
    padding: 0;
  }

  .Dont_have_account {
    display: block;
    margin-top: 25px;
    font-size: 12px;
  }
  .have_account {
    display: block;
    margin-top: 25px;
    font-size: 12px;
  }

  .right-panel-active .sign-up-container {
    transform: translateX(0px);
    opacity: 1;
    z-index: none;
  }
  .login-main #container .up {
    opacity: 1;
    z-index: 2;
    transition: all 0s ease-in;
  }
  .login-main #container .down {
    opacity: 0;
    z-index: 1;
    transition: all 0.1s ease-in;
  }
  .right-panel-active .sign-in-container {
    transform: translateX(0%);
    opacity: 0;
  }
}

@media (max-width: 500px) {
  .container {
    width: 80%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .form-container {
    width: 90%;
    padding: 0;
  }
}

@media (max-width: 350px) {
  .container {
    width: 90%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
  }

  .form-container {
    width: 90%;
    padding: 0;
  }
}
