/* Base Styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Full height of the viewport */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    overflow-y: auto; /* Allow vertical scrolling if necessary */
    background-color: #f4f4f9; /* Subtle background for contrast */
    box-sizing: border-box; /* Ensure consistent box model */
}

body.dark-mode {
    background-color: #121212;
}

/* Login / Recovery Form Container */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    width: 100%;
    max-width: 600px;
    background: white; /* Main form background */
    box-sizing: border-box; /* Include padding and border in box size */
}

body.dark-mode .login-container {
    background-color: #444;
}

/* Title Section */
.login-container h2 {
    color: black;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem; /* Adapt font size for heading */
}

body.dark-mode .login-container h2 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem; /* Adapt font size for heading */
}

/* Error Messages */
.error {
    color: red;
    font-size: 0.9rem; /* Slightly smaller font for error messages */
    text-align: center;
    margin-bottom: 10px;
}

/* Input Fields */
.login-container .form-control {
    width: 100%; /* Full width of container */
    padding: 15px; /* Comfortable padding */
    margin-bottom: 20px; /* Space between fields */
    border: 1px solid #ccc; /* Subtle border */
    border-radius: 5px; /* Rounded corners for inputs */
    box-sizing: border-box; /* Ensure padding doesn’t affect size */
    font-size: 1rem; /* Readable font size */
}

body.dark-mode .login-container label {
    color: white;
    margin-top: 5px;
    margin-bottom: 5px;
    display: block;
}

/* Buttons */
.button {
    background-color: blue;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%; /* Full width for responsiveness */
    text-align: center;
    font-size: 1rem;
}

.button:hover {
    background-color: darkblue; /* Hover effect for buttons */
}

body.dark-mode .button, 
body.dark-mode .form-button {
  background-color: #555;
}

body.dark-mode .button:hover, 
body.dark-mode .form-button:hover {
  background-color: #777;
}

.form-button {
    background-color: blue;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%; /* Full width for responsiveness */
    max-width: 300px; /* Restrict maximum button width */
    margin: 0 auto;
    text-align: center;
    font-size: 1rem;
}

.form-button:hover {
    background-color: darkblue;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 20px;
        border-radius: 8px; /* Adjusted for smaller screens */
        max-width: 90%;
    }

    .login-container h2 {
        font-size: 1.5rem; /* Smaller title font for tablets */
    }

    .form-control {
        padding: 12px; /* Smaller padding for fields */
        margin-bottom: 15px; /* Tighter spacing */
    }

    .form-button {
        padding: 8px; /* Compact button size */
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
        border-radius: 5px; /* More compact radius for mobile */
        max-width: 95%;
    }

    .login-container h2 {
        font-size: 1.2rem; /* Further reduced font for small screens */
    }

    .form-control {
        padding: 10px; /* Smaller padding */
        margin-bottom: 10px; /* Tighter spacing */
    }

    .form-button {
        padding: 7px; /* Reduced button padding */
        font-size: 0.8rem; /* Smaller font size */
    }
}
