@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(120deg, #6a1b9a, #8e24aa);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.main-container {
    display: flex;
    width: 90%;
    max-width: 900px;
    height: auto; /* allow dynamic height */
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap; /* allows stacking on small screens */
}

.left-side, .right-side {
    flex: 1 1 50%; /* flexible basis, allow shrinking */
    min-width: 250px; /* prevents collapsing */
} 

/* LEFT SIDE (Logo) */
.left-side {
  width: 45%;
background: url('background.jpg') center/cover no-repeat;

  display: flex;
  justify-content: center;
  align-items: center;
}



/* Logo adjustments */
.logo {
    max-width: 100%; /* responsive */
    height: auto;
}

/* Optional hover animation */
.logo:hover {
  transform: scale(1.05);
}


/* RIGHT SIDE (Forms) */
.right-side {
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.form-wrapper {
  width: 100%;
  color: #fff;
  transition: all 0.4s ease;
}

.form-wrapper.hidden {
  display: none;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 600;
}

label {
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
}

input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  margin-bottom: 15px;
  font-size: 14px;
}

input::placeholder {
  color: #e3c9f8;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
   background: linear-gradient(135deg, #ffffff, #e1bee7);
  color: #6a1b9a;

  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  margin-top: 5px;
}

.btn:hover {
  background: linear-gradient(135deg, #ab47bc, #ce93d8);
color: #4a0072;
  transform: translateY(-2px);
}
.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center; /* centers vertically */
  margin-bottom: 20px;
  width: 100%;
  font-size: 13px;
}

.remember {
  display: flex;
  align-items: center; /* makes checkbox and text same line */
  gap: 6px;
 margin-top: -15px;
}

.remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #a765f5;
  margin: 0;
  position: relative;
  top: -2px; /* 👈 tiniest vertical fix to make them perfectly aligned */
  cursor: pointer;
  
}

.remember label {
  display: flex;
  align-items: center;
  line-height: 2;
  cursor: pointer;
 
}

.remember-forgot a {
  color: #f3c8ff; /* light pink-lavender, readable and elegant */
  text-decoration: none;
  font-weight: 500;
   margin-top: -15px;
}

.remember-forgot a:hover {
  color: #ffffff; /* brighten on hover for contrast */
  text-decoration: underline;
}

/* “Don’t have an account?” text */
.switch-text {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: #f5dbff; /* soft pastel pink-lavender */
}

.switch-text a {
  color: #ffffff; /* white for contrast and clarity */
  text-decoration: none;
  font-weight: 600;
}

.switch-text a:hover {
  color: #f3c8ff;
  text-decoration: underline;
}


.hidden {
  display: none;
}

/* Password input wrapper */
.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

/* Password input */
.password-wrapper input {
  width: 100%;
  padding: 10px 40px 10px 14px; /* extra right padding for the icon */
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
}

.password-wrapper .toggle-password {
  position: absolute;
  right: 12px;
  top: 42%; /* ⬅️ try 45% to move it a bit higher */
  transform: translateY(-50%);
  cursor: pointer;
  color: #e3c9f8;
  font-size: 18px;
  transition: color 0.3s ease;
}


.password-wrapper .toggle-password:hover {
  color: #fff;
}

/* Password strength bar */
.password-strength {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  margin-top: -8px;
  margin-bottom: 8px;
  overflow: hidden;
}

#strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  transition: width 0.3s ease, background 0.3s ease;
}

#strength-text {
  display: block;
  font-size: 12px;
  text-align: right;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 500;
}
.password-strength div {
  height: 100%;
  width: 0;
  transition: width 0.3s ease;
}

small {
  display: block;
  margin-top: 4px;
}




/* Extra Small Devices - phones (max-width: 480px) */
@media (max-width: 480px) {
    .main-container { flex-direction: column; width: 95%; height: auto; }
    .left-side, .right-side { width: 100%; border-radius: 20px; }
    .right-side { padding: 20px; margin-top: 15px; }
    .logo { width: 180px; }
    h2 { font-size: 18px; }
    input, .btn { font-size: 13px; padding: 10px; }
    .remember-forgot { flex-direction: column; align-items: flex-start; gap: 5px; }
    .switch-text { font-size: 12px; }


    /* Password adjustments */
    .password-wrapper input { padding: 10px 32px 10px 12px; font-size: 13px; }
    .password-wrapper .toggle-password { font-size: 16px; }
    .password-strength { height: 5px; }
    #strength-text { font-size: 11px; }
}


/* Small Devices - tablets (max-width: 768px) */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }
    .left-side, .right-side {
        width: 100%;
        flex: none;
    }
    .right-side { padding: 20px; }
    .logo { width: 220px; margin: 0 auto; }
    h2 { font-size: 20px; }
}


/* Medium Devices - small laptops (max-width: 992px) */
@media (max-width: 992px) {
    .main-container { width: 85%; height: auto; }
    .left-side { width: 40%; }
    .right-side { width: 60%; padding: 30px; }
    .logo { width: 280px; }
    h2 { font-size: 22px; }
    input, .btn { font-size: 15px; padding: 12px; }
    .password-wrapper input { padding: 10px 38px 10px 14px; font-size: 15px; }
    .password-wrapper .toggle-password { font-size: 18px; }
}



@media (max-width: 480px) {
    .main-container { width: 95%; }
    .logo { width: 180px; }
    h2 { font-size: 18px; }
    input, .btn { font-size: 13px; padding: 10px; }
    .remember-forgot { flex-direction: column; align-items: flex-start; gap: 5px; }
}

/* Extra breakpoint for small phones (≤567px) */
@media (max-width: 567px) {
  .main-container {
    flex-direction: column;
    width: 95%;
    height: auto;
  }

  .left-side, .right-side {
    width: 100%;
    flex: none;
  }

  .left-side {
    min-height: 200px; /* ensures background image shows properly */
  }

  .right-side {
    padding: 15px 20px;
  }

  .logo {
    width: 200px;
    margin: 0 auto;
  }

  h2 {
    font-size: 18px;
  }

  input, .btn {
    font-size: 13px;
    padding: 10px;
  }

  .remember-forgot {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .switch-text {
    font-size: 12px;
  }

  .password-wrapper input {
    padding: 10px 32px 10px 12px;
    font-size: 13px;
  }

  .password-wrapper .toggle-password {
    font-size: 16px;
  }

  .password-strength {
    height: 5px;
  }

  #strength-text {
    font-size: 11px;
  }
}
