body{
    margin: 0;  
    padding: 0; 
    overflow-x: hidden;
    height:100vh;
    font-family: Arial, Helvetica, sans-serif;
   }
   body img{
       position: relative;
       top: -2%;
       left: 46%;
       width: 165px;
       height: auto;
   }
.loader {
    display: none;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

   /* Styling for success or error messages */
.login-container .message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
}
.success-message, .error-message {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    text-align: start;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: bold;
    z-index: 5000;
    border-radius: 10px;
}

.success-message {
    background-color: #F1F7EE;
    color:  #2A9134;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4), 0 0 10px rgba(0, 123, 255, 0.3);
}

.error-message {
    background-color:  #F7A399;
    color: #f44336;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4), 0 0 10px rgba(0, 123, 255, 0.3);
}
.close-msg {
    float: right;
    font-weight: bold;
    cursor: pointer;
    font-size: 20px;
}

   .login-container{
       position: absolute;
       top: 100px;
       left: 38%;
       width: 400px;
       height: 500px;
       background-color: white;
      
       
   }
   .login-container h2{
       text-align: center;
       border-bottom: 5px solid white;
       padding: 0 0 20px 0;
   
   }
   .login-container form{
   padding: 0 50px;
   box-sizing: border-box;
   }
   form .field-text{
       position: relative;
       border-bottom: 2px solid grey;
       margin: 30px 0;
   }
   
   .field-text input{
       width: 100%;
       padding: 0 5px;
       height: 40px;
       font-size: 0.9rem;
       border: none;
       background: none;
       outline: none;
   }
   
   .field-text label{
       position: absolute;
       top: 50%;
       left: 5px;
       color: black;
       font-size: 14px;
       pointer-events: none;
       transform: translateY(-50%);
   }
   .field-text span::before{
       content: '';
       position: absolute;
       top: 40px;
       left: 0;
       width: 0%;
       height: 2px;
       background: #007bff;  
       transition: .5s;
   }
   .field-text input:focus~ label,
   .field-text input:valid~ label{
       top:-5px;
       color:  #007bff;  
   }
   .field-text input:focus~ span::before,
   .field-text input:valid~ span::before{
       width: 100%;
   }
   .togglePassword {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    z-index: 1;
}
   .pass{
       margin: -5px 0 20px 5px;
       color: #007bff;  
       cursor: pointer;
       font-size: 1rem;
   }
   .pass:hover{
       text-decoration: underline;
   }
   input[type="submit"]{
       width: 100%;
       height: 50px;
       border: none;
       background-color: #007bff; 
       color: white;
       font-size: 18px;
       font-weight: 700;
       cursor: pointer;
       outline: none;
       box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
   
   }
   input[type="submit"]:hover{
    background-color: #2963a1; 
    transition: background-color 0.3s ease;
    border-color:  #007bff;  
   }
   .signup-link{
       margin: 30px 0;
       text-align: center;
       font-size: 16px;
       color: black
   
   }
   .signup-link a{
       color:  #007bff; 
       text-decoration: none;
   }
   .signup-link a:hover{
       text-decoration: underline;
   }
   /* Responsive Design for Smaller Screens */
@media(max-width: 768px) {
    body img {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .login-container {
        width: 80%;
        left: 5%;
        top: 120px;
        height: auto;
        padding: 20px;
    }

    .login-container form {
        padding: 0 20px;
    }

    .login-container h2 {
        font-size: 1.5rem;
    }

    input[type="submit"] {
        font-size: 16px;
    }

    .success-message, .error-message {
    width: 300px;
    padding: 10px 15px;
    font-size: 0.9rem;
   }
    .pass {
        font-size: 0.9rem;
    }

    .signup-link {
        font-size: 14px;
    }
}
