/* Global Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Ensure full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space out header, form, and footer */
    align-items: center;
    overflow-x: hidden;
    background-image: url('/images/login_background.webp');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    position: relative;
}

/* Overlay to dim the image */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: -1; /* Ensure overlay is behind content */
}

/* Form Container */
.form-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin: 20px 0; /* Ensure there is space above and below the form */
    transition: all 0.3s ease;
    border: 2px solid #e67e22; /* Added border to form container */
}

/* Form Header */
.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #333;
}

/* Form Inputs */
.form-container label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
}

.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-container input[type="email"]:focus,
.form-container input[type="password"]:focus,
.form-container input[type="text"]:focus {
    border-color: #f1c40f;
    outline: none;
}

/* Error Message */
.error-message {
    color: red;
    font-size: 0.875rem;
    margin-bottom: 15px;
    text-align: center;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 12px;
    background-color: #f1c40f;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #e67e22;
}

/* Register Link */
.form-container p {
    text-align: center;
}

.form-container a {
    color: #f1c40f;
    text-decoration: none;
}

.form-container a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0 15px; /* Adjusted for better mobile spacing */
    }

    .form-container {
        padding: 25px; /* Added padding to ensure form isn't too close to edges */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-top: 40px; /* Ensure there's space between header and form */
        margin-bottom: 40px; /* Ensure there's space between footer and form */
    }

    .form-container h2 {
        font-size: 1.3rem;
    }

    .submit-button {
        font-size: 1rem;
    }
}

/* For extra small devices */
@media (max-width: 480px) {
    body {
        padding: 0 10px; /* Adjusted padding for smaller screens */
    }

    .form-container {
        padding: 20px;
        width: 90%; /* Narrower form width for better spacing */
        max-width: 100%;
        box-sizing: border-box;
        margin-top: 30px; /* Ensures space between header and form */
        margin-bottom: 30px; /* Ensures space between footer and form */
    }

    .form-container h2 {
        font-size: 1.2rem;
    }

    .submit-button {
        font-size: 1rem;
    }
}
