/* Root Variables for easier theme management */
:root {
    --primary-color: #4CAF50; /* Green */
    --secondary-color: #607D8B; /* Blue Grey */
    --text-color: #333;
    --light-background: #e8f5e9; /* Light green background */
    --white: #ffffff;
    --grey-border: #ddd;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
}

/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--light-background);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align items to the start to push header up */
    min-height: 100vh;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Header Styles */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem 0;
    text-align: center;
    width: 100%; /* Full width header */
    box-shadow: 0 2px 4px var(--shadow-medium);
    position: fixed; /* Keep header at top */
    top: 0;
    left: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-weight: 600; /* Poppins semi-bold */
    font-size: 2.2rem;
}

/* Main Content Area */
main {
    padding: 30px;
    max-width: 600px;
    width: 100%;
    margin-top: 120px; /* Space for fixed header */
    margin-bottom: 30px; /* Space at the bottom */
    background: var(--white);
    box-shadow: 0 5px 15px var(--shadow-medium);
    border-radius: 12px;
    box-sizing: border-box;
}

/* Section Styling */
section {
    margin-bottom: 30px;
}

section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-weight: 400; /* Poppins regular */
    font-size: 1.8rem;
    text-align: center;
}

/* Form Grouping */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: var(--text-color);
    font-size: 1.1rem;
}

.form-group input[type="file"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--grey-border);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    box-shadow: inset 0 1px 3px var(--shadow-light);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="file"]:focus,
.form-group input[type="email"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
    outline: none;
}

.form-group input[type="file"] {
    padding: 10px; /* Adjust padding for file input */
}

/* Button Styling */
button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px var(--shadow-medium);
}

button[type="submit"]:hover {
    background: #45a049; /* Slightly darker green */
    box-shadow: 0 6px 12px var(--shadow-medium);
}

button[type="submit"]:active {
    background: #39843c; /* Even darker on click */
    box-shadow: 0 2px 4px var(--shadow-light);
}

/* Message Area for Feedback */
#message-area {
    margin-top: 30px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    min-height: 20px; /* Ensure it has some height even when empty */
    font-size: 1.1rem;
    font-weight: 400;
    box-shadow: 0 2px 5px var(--shadow-light);
}

.message-area.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-area.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        margin-top: 100px;
        padding: 20px;
        border-radius: 0; /* Full width on smaller screens */
        box-shadow: none;
    }

    header h1 {
        font-size: 1.8rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    button[type="submit"] {
        font-size: 1rem;
        padding: 12px 15px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group input {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem 0;
    }

    main {
        margin-top: 80px;
        padding: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    section h2 {
        font-size: 1.3rem;
    }
}
