body {
    font-family: Arial, sans-serif;
    background-color: #f3f3f3;
    margin: 0;
    padding: 20px;
}

h1, legend {
    color: #333;
}

form {
    background-color: #fff;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: auto;
}

fieldset {
    border: 1px solid #ccc;
    margin-bottom: 20px;
    padding: 20px;
}

/* Flexbox layout for personal info */
fieldset:first-of-type {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

fieldset:first-of-type > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

fieldset:first-of-type label {
    width: 150px;
    font-weight: bold;
}

fieldset:first-of-type input,
fieldset:first-of-type select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Default styles for other inputs */
input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 10px;
    margin-bottom: 8px;
}

input[type="submit"] {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
}

input[type="submit"]:hover {
    background-color: #0056b3;
}
