/* Global Styles */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(45deg, #6a11cb, #2575fc); /* Beautiful background gradient */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #fff;
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden; /* Prevents any overflow issues */
}

/* Background gradient animation */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Container and Form */
.container {
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: formSlideUp 0.8s ease-out;
    overflow-y: auto; /* Ensure scrolling for content overflow */
    max-height: 90vh; /* Limit height to 90% of viewport */
}

/* Form Slide Up Animation */
@keyframes formSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Heading Style */
h2 {
    text-align: center;
    font-size: 30px;
    margin-bottom: 20px;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Input Fields */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #f4f4f4;
    font-size: 16px;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

/* Focus effect for input fields */
input:focus, select:focus, textarea:focus {
    border: 2px solid #2575fc;
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.3);
    background-color: #e0f0ff; /* Light blue background when focused */
}

/* Submit button */
button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: #2575fc;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background: #6a11cb;
    transform: scale(1.05);
}

button[type="submit"]:active {
    transform: scale(0.98); /* Shrink effect on click */
}

/* Links */
a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    display: block;
    text-align: center;
    margin-top: 20px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 1;
}

/* Input label styling */
label {
    font-size: 18px;
    margin-bottom: 8px;
    display: inline-block;
    color: #fff;
    transition: color 0.3s ease;
}

/* Style for form section */
.form-section {
    animation: fadeInForm 1s ease-in-out;
}

@keyframes fadeInForm {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* For error messages (e.g., alert messages) */
.alert {
    color: red;
    font-size: 14px;
    margin-top: 5px;
    opacity: 0;
    animation: fadeInError 0.5s forwards;
}

@keyframes fadeInError {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* For file input styling */
input[type="file"] {
    padding: 10px;
    font-size: 16px;
    background-color: #f4f4f4;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

input[type="file"]:hover {
    background-color: #e0f0ff;
}

/* Form layout styling */
form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* For spacing between form elements */
.form-group {
    width: 100%;
}

/* Media Query for smaller devices */
@media (max-width: 600px) {
    .container {
        width: 90%;
        padding: 20px;
    }

    h2 {
        font-size: 24px;
    }

    input, select, textarea, button {
        font-size: 14px;
    }
}

/* For very small screens */
@media (max-width: 400px) {
    h2 {
        font-size: 20px;
    }

    input, select, textarea, button {
        font-size: 12px;
    }
}

