* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  position: relative;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/img/backgrounds/backlogin.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.5) blur(3px);
  z-index: -1;
}



.container {
  width: 700px;
  height: 480px;
  background: rgba(255, 255, 255, 0.2); 
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); 
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3); 
}


.form-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.form-container {
  width: 200%;
  height: 100%;
  display: flex;
  transition: transform 0.5s ease;
}

.form-box {
  width: 50%;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.form-box img {
  width: 200px;
  height: auto;
  border-radius: 10px;
  margin: 0 20px;
}
@keyframes flipWithCircle {
  0% {
    transform: scaleX(1);
    border-radius: 0%;
  }
  50% {
    transform: scaleX(-1);
    border-radius: 50%;
  }
  100% {
    transform: scaleX(1);
    border-radius: 0%;
  }
}

img.flip-on-load {
  animation: flipWithCircle 1s ease-in-out;
  transition: transform 0.3s ease, border-radius 0.3s ease;
  cursor: pointer;
}

img.flip-on-load:hover {
  transform: scale(1.1);
}


.form-content {
  flex: 1;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #00796b;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Password Toggle Icon */
.password-container {
  position: relative;
  margin-bottom: 10px;
}

.password-container input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}

.toggle-password:hover {
  color: #00796b;
}

/* Slide-down animation on mobile */
@media (max-width: 768px) {
  .container {
    width: 90%;
    height: auto;
    min-height: 500px; /* Add minimum height */
  }

  .form-wrapper {
    height: auto;
  }

  .form-container {
    width: 100% !important; /* Override the 200% width */
    flex-direction: column; /* Stack forms vertically */
    height: auto;
    transform: none !important; /* Disable the horizontal translation */
  }

  .form-box:first-child {
    display: flex; /* Show login form by default */
  }
  
  .form-box {
    width: 100%;
    flex-direction: column;
    padding: 30px;
    display: none; /* hide others by default */
  }

  .form-box.active {
    display: flex !important; /* show only active one */
  }

  .form-box img {
    width: 120px;
    margin: 0 0 15px 0; /* Adjust margin for mobile */
  }
}


.forgot-link {
  position: absolute;
  right: 0;
  top: 100%;
  /* transform: translateY(-50%); */
  font-size: 13px;
  color:rgb(22, 24, 35);
  text-decoration: none;
}

.forgot-link:hover {
  color:rgb(0, 74, 65);
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin: 10px 0;
  font-size: 14px;
}

.checkbox-container input {
  margin-right: 8px;
}

button {
  width: 100%;
  padding: 12px;
  border: none;
  background-color: #26a69a;
  color: white;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #00796b;
}

h4 {
  text-align: center;
  margin-top: 20px;
}

.toggle-btn {
  background: none;
  color:rgb(18, 37, 35);
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

.toggle-btn:hover {
  color: #00796b;
}

/* ✅ Responsive Fix */
@media (max-width: 768px) {
  .container {
    width: 90%;
    height: auto;
    min-height: 500px; /* Add minimum height */
  }

  .form-wrapper {
    height: auto;
  }

  .form-container {
    width: 100% !important; /* Override the 200% width */
    flex-direction: column; /* Stack forms vertically */
    height: auto;
    transform: none !important; /* Disable the horizontal translation */
  }

  .form-box:first-child {
    display: flex; /* Show login form by default */
  }
  
  .form-box {
    width: 100%;
    flex-direction: column;
    padding: 30px;
    display: none; /* hide others by default */
  }

  .form-box.active {
    display: flex !important; /* show only active one */
  }

  .form-box img {
    width: 120px;
    margin: 0 0 15px 0; /* Adjust margin for mobile */
  }
}