* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background-color: #c9d6ff;
    background: linear-gradient(to right, #e2e2e2, #c9d6ff);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Base container styles (mobile-first) */
.container {
    background: #fff;
    width: 90%; /* Start with mobile width */
    max-width: 450px; /* Maximum width for larger screens */
    padding: 1rem;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 20px 35px rgba(0, 0, 1, 0.9);
}

form {
    margin: 0 1rem; /* Smaller margin on mobile */
}

.form-title {
    font-size: 1.2rem; /* Smaller font on mobile */
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    margin-bottom: 0.4rem;
}

/* Input styles */
input {
    color: inherit;
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #757575;
    padding-left: 1.5rem;
    font-size: 14px; /* Smaller font on mobile */
}

.input-group {
    padding: 1% 0;
    position: relative;
}

.input-group i {
    position: absolute;
    color: black;
}

input:focus {
    background-color: transparent;
    outline: transparent;
    border-bottom: 2px solid hsl(327, 90%, 28%);
}

input::placeholder {
    color: transparent;
}

label {
    color: #757575;
    position: relative;
    left: 1.2em;
    top: -1.3em;
    cursor: auto;
    transition: 0.3s ease all;
}

input:focus~label,
input:not(:placeholder-shown)~label {
    top: -3em;
    color: hsl(327, 90%, 28%);
    font-size: 15px;
}

/* Other form elements */
.recover {
    text-align: right;
    font-size: 0.9rem; /* Smaller font on mobile */
    margin-bottom: 1rem;
}

.recover a {
    text-decoration: none;
    color: rgb(125, 125, 235);
}

.recover a:hover {
    color: blue;
    text-decoration: underline;
}

button {
    font-size: 1rem; /* Smaller button text on mobile */
    padding: 8px 0;
    border-radius: 5px;
    outline: none;
    border: none;
    width: 100%;
    background: rgb(125, 125, 235);
    color: white;
    cursor: pointer;
    transition: 0.9s;
}

button:hover {
    background: #07001f;
}

.or {
    font-size: 0.9rem; /* Smaller text on mobile */
    margin-top: 0.5rem;
    text-align: center;
}

.icons {
    text-align: center;
}

.icons i {
    color: rgb(125, 125, 235);
    padding: 0.6rem 1rem; /* Smaller padding on mobile */
    border-radius: 10px;
    font-size: 1.2rem; /* Smaller icons on mobile */
    cursor: pointer;
    border: 2px solid #dfe9f5;
    margin: 0 10px; /* Less margin on mobile */
    transition: 1s;
}

.icons i:hover {
    background: #07001f;
    font-size: 1.3rem; /* Smaller hover effect on mobile */
    border: 2px solid rgb(125, 125, 235);
}

.links {
    display: flex;
    flex-direction: column; /* Stack links vertically on mobile */
    align-items: center;
    padding: 0;
    margin-top: 0.9rem;
    font-weight: bold;
}

#signUpButton,
#signInButton {
    color: rgb(125, 125, 235);
    border: none;
    background-color: transparent;
    font-size: 0.9rem; /* Smaller font on mobile */
    font-weight: bold;
    margin: 5px 0; /* Space between stacked links */
}

#signUpButton:hover,
#signInButton:hover {
    text-decoration: underline;
    color: blue;
}

.messageDiv {
    background-color: hsl(327, 90%, 28%);
    color: white;
    padding: 10px 20px;
    margin: 10px;
    border-radius: 5px;
    font-size: 0.9rem; /* Smaller font on mobile */
    opacity: 0;
    animation: fadeOut 7s forwards;
}

/* Tablet and larger mobile devices (min-width: 481px) */
@media (min-width: 481px) {
    .container {
        width: 80%;
        padding: 1.2rem;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .icons i {
        padding: 0.7rem 1.2rem;
        font-size: 1.3rem;
    }
    
    .links {
        flex-direction: row; /* Side-by-side links on larger screens */
        justify-content: space-around;
    }
    
    #signUpButton,
    #signInButton {
        margin: 0;
    }
}

/* Small desktops and tablets (min-width: 768px) */
@media (min-width: 768px) {
    .container {
        width: 450px;
        padding: 1.5rem;
        margin: 50px auto;
    }
    
    .form-title {
        font-size: 1.5rem;
        padding: 1.3rem;
    }
    
    input {
        font-size: 15px;
    }
    
    button {
        font-size: 1.1rem;
    }
    
    .or {
        font-size: 1.1rem;
    }
    
    .icons i {
        padding: 0.8rem 1.5rem;
        font-size: 1.5rem;
        margin: 0 15px;
    }
    
    .icons i:hover {
        font-size: 1.6rem;
    }
    
    .links {
        padding: 0 4rem;
    }
    
    #signUpButton,
    #signInButton {
        font-size: 1rem;
    }
    
    .messageDiv {
        font-size: 1rem;
    }
}

/* Larger desktops (min-width: 1024px) */
@media (min-width: 1024px) {
    /* Add any specific desktop styles here if needed */
}