  .navbar {
    z-index: 1050;
    width: 40%;
    border-radius: 30px;
  }

  /* Modal Styling */
  .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(90% - 1rem);
    margin: 1.75rem auto;
    max-width: 400px;
    width: calc(100% - 2rem);
  }

  .modal-content-l {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* Prevents scrolling */
    height: auto; /* Adjusts height based on content */
    max-height: calc(100vh - 3.5rem); /* Prevents modal from being taller than viewport */
  }

  .modal-content-registration {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* Prevents scrolling */
    height: auto; /* Adjusts height based on content */
    max-height: calc(100vh - 3.5rem); /* Prevents modal from being taller than viewport */
  }

  .modal-header {
    border-bottom: none;
    text-align: center;
    padding-bottom: 1rem;
  }


  .modal-body {
    padding: 1.5rem;
    overflow-y: hidden; /* Prevents scrolling */
  }

  .form-control {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #333;
    height: 45px;
  }

  .form-control::placeholder {
    color: rgba(0, 0, 0, 0.5);
  }

  .login-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  
  .registration-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Improve form aesthetics */
  .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
  }

  .form-check-label {
    user-select: none;
  }

  /* Make links more visible on glass background */
  .modal-body a {
    font-weight: 500;
  }

  .modal-body a:hover {
    text-decoration: underline !important;
  }

  /* Ensure modal is centered on mobile */
  @media (max-width: 768px) {
    .modal-dialog {
      margin: 1rem auto;
      width: calc(100% - 1rem);
    }
    
    .modal-content-l {
      max-width: 100%;
    }
    .modal-content-registration {
      max-width: 100%;
    }
  }

  /* Ensure the modal backdrop is slightly visible */
  .modal-backdrop.show {
    background-color: rgba(25, 0, 0, 0);
  }

  /* Fixed positioning for top-right buttons */

  /* Update the navbar and auth buttons styling */
  .navbar {
    background: transparent !important;
    padding: 1rem;
    width: 100%;
  }

  .auth-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    display: flex;
    gap: 10px;
  }

  /* Responsive adjustments for mobile */
  @media (max-width: 768px) {
    .auth-buttons {
      top: 10px;
      right: 10px;
    }
    
    .auth-buttons .btn {
      padding: 0.25rem 0.5rem;
      font-size: 0.875rem;
    }
  }

  /* Add these new styles */
  body.modal-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
  }

  .modal {
    overflow: hidden !important;
  }



  .modal-content-l {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    max-height: calc(100vh - 3.5rem);
    overflow: hidden;
    margin: 0;
    padding: 1.5rem;
    border-radius: 20px;
    width: 350px;
    height: 425px;
    pointer-events: auto; /* Ensure form elements are clickable */
  }

  .modal-content-registration {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    max-height: calc(100vh - 3.5rem);
    overflow: hidden;
    margin: 0;
    padding: 1.5rem;
    border-radius: 20px;
    width: 400px;
    height: 625px;
    pointer-events: auto; /* Ensure form elements are clickable */
  }

  .modal-body {
    padding: 1rem 0;
    overflow: hidden;
  }

  .login-form {
    margin: 0;
    padding: 0;
  }

  .registration-form {
    margin: 0;
    padding: 0;
  }

  /* Ensure inputs don't cause overflow */
  .form-control {
    max-height: 45px;
    margin-bottom: 0.5rem;
  }
  .input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #162938;
    margin: 11px 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .input-box label {
    position: absolute;
    top: 50%;
    left: 5px;;
    transform: translateY(-50%);
    font-size: 1em;
    color: #162938;
    font-weight: 400;
    pointer-events: none;
    transition: .5s;
      }


  .input-box input:focus~label,
  .input-box input:valid~label {
   top: -3px;
  }

.input-box input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1em;
  color: #162938;
  font-weight: 600;
  padding: 0 35px 0 5px;
}

.input-box i {
  position: absolute;
  right: 8px;
  font-size: 1.2em;
  color: #162938;
  line-height: 57px;
}

.remember-forgot {
  font-size: .9em;
  color: #162938;
  font-weight: 500;
  margin: 0px 0 10px;
  display: flex;
  justify-content: space-between;
}

.remember-forgot label input{
  accent-color: #162938;
  margin-right: 3px;
}

.remember-forgot a {
  color: #162938;
  text-decoration: none ;
}

.remember-forgot a:hover {
  text-decoration: underline; 
}

.remember-forgot-registration {
  font-size: 1em;
  color: #162938;
  font-weight: 500;
  margin: 6px 0 18px;
  display: flex;
  justify-content: space-between;
}

.remember-forgot-registration label input{
  accent-color: #162938;
  margin-right: 3px;
}


.btn-login {
  width: 100%;
  height: 45px;
  background: #162938;
  border: none;
  outline: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  color: #fff;
  font-weight: 500;
}

.btn-register {
  width: 100%;
  height: 45px;
  background: #162938;
  border: none;
  outline: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  color: #fff;
  font-weight: 500;
}

.login-register {
  font-size: .9em;
  color: #162938;
  text-align: center;
  font-weight: 500;
  margin: 15px 0 5px;
}
.login-register p a{
  color: #162938;
  text-decoration: none;
  font-weight: 600;
}

.login-register p a:hover {
  text-decoration: underline;
}

  /* Mobile optimization */
  @media (max-width: 768px) {
    .modal-dialog {
      width: calc(100% - 2rem);
    }
    
    .modal-content-l {
      padding: 1rem;
    }

    .modal-content-registration {
      padding: 1rem;
    }
  }

  .remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .remember-forgot label {
    display: flex;
    align-items: center;
    gap: 3px; /* Space between checkbox and text */
  }

  input[type="checkbox"] {
    transform: scale(1.3); /* Increase checkbox size */
    cursor: pointer;
  }

  .remember-forgot-registration {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .remember-forgot-registration label {
    display: flex;
    align-items: center;
    gap: 3px; /* Space between checkbox and text */
  }

  .remember-forgot-registration input[type="checkbox"] {
    transform: scale(1.55); /* Increase checkbox size */
    cursor: pointer;
  }

  a {
    text-decoration: none;
  }

  .modal-content-l .icon-close  {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: #162938;
    font-size: 1.5em;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    z-index: 1;
  }

  .modal-content-registration .icon-close  {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: #162938;
    font-size: 1.5em;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    z-index: 1;
  }




  
  .modal-content-l {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .modal-content-registration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }



  .modal-content-l .logo_l {
    position: absolute;
    top: -5px;
    left: 35px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1;

  }
  
  .modal-title_l {
    position: absolute;
    top: 40px;
    right: 95px;
    color: #333;
    font-weight: bold;
  }

  
  .modal-title_r {
    position: absolute;
    top: 50px;
    right: 75px;
    color: #333;
    font-weight: bold;
  }

  .modal-content-registration .logo_r {
    position: absolute;
    top: 8px;
    left: 25px;
    font-size: 1.5em;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1;
  }