body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px; /* Matches image width */
    box-sizing: border-box;
}

.header-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    margin-bottom: 20px;
}

.header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area */
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* New container for password input and eye icon */
.password-field-container {
    position: relative;
    width: 100%; /* Take full width available */
    margin-bottom: 10px; /* Space between password field and generate button */
}

.password-field-container input[type="password"],
.password-field-container input[type="text"] { /* Also target text type when visible */
    width: 100%;
    padding: 10px;
    padding-right: 40px; /* Make space for the eye icon inside the input */
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 10px; /* Position inside the input field */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.1em;
    z-index: 2; /* Ensure it's above the input */
}

.toggle-password i {
    pointer-events: none; /* Allows click to pass through to the span */
}

button#generatePassword { /* Target only the generate button */
    background-color: #6c757d; /* A different color for distinction */
    color: white;
    padding: 8px 12px; /* Slightly smaller padding */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    width: auto; /* Allow button to size according to content */
    display: inline-block; /* Keep it next to the input area if space allows, otherwise it will stack */
    margin-top: 5px; /* Space below the password field */
}

button#generatePassword:hover {
    background-color: #5a6268;
}

/* Submit button specific styling */
button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: 20px; /* More space above the submit button */
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    .header-image {
        height: 100px;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 10px;
        margin: 5px;
    }

    .header-image {
        height: 70px;
    }

    .password-field-container {
        margin-bottom: 5px; /* Less space on small screens */
    }

    button#generatePassword {
        width: 100%; /* Make button full width on small screens */
        display: block; /* Ensure it stacks below the password field */
        margin-top: 10px; /* Space it out more clearly */
    }
}