/* styles.css */
/* Base styles from the provided file */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif, Arial, Verdana;
}

body {
    font-size: 1.0em;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

h1 {
    background-color: #003767;
    font-size: 1.6em;
    font-weight: bold;
    color: white;
    padding: 10px 15px;
    text-align: center;
    border-radius: 5px;
}

h2 {
    background-color: #00b2ce;
    font-size: 1.3em;
    font-weight: bold;
    color: #003767;
    padding: 5px 10px;
}

h3 {
    font-style: italic;
    padding: 5px 10px;
    background-color: #414a51;
    color: white;
}

h4 {
    font-weight: bold;
    font-style: italic;
    color: #003767;
    margin-left: 5px;
    margin-top: 3px;
    margin-bottom: 3px;
    text-decoration: underline;
}

button {
    border-radius: 2em;
    background: #003767;
    color: white;
    font-weight: bold;
    padding: 1em, .5em, 1.5em, .5em;
    width: 7em;
    height: 2.5em;
    transition-duration: 0.2s;
    cursor: pointer;
    box-shadow: 5px 5px #999;
}

button:hover {
    background-color: #00b2ce;
}

button:active {
    background-color: #003767;
    box-shadow: 0 1px #666;
    transform: translateY(4px);
}

a:link, a:visited {
    color: #ff5000;
}

a:hover, a:active {
    color: white;
    background: #00b2ce;
}

.note {
    font-family: Arial, Verdana, sans-serif;
    font-size: .8em;
    padding: 10px 10px;
    border-top-style: solid;
    border-left-style: solid;
    border-bottom-style: solid;
    border-right-style: none;
    border-left-width: 1em;
    border-color: #ff5000;
    background-color: #d5d5d5;
    margin: 7px 3px;
}

/* Custom styles for the registration form */
.container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 18px;
    margin-top: 10px;
}

fieldset {
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #f8fafc;
}

legend {
    font-weight: bold;
    font-size: 1.2em;
    color: #3498db;
    padding: 0 15px;
    background-color: white;
    border-radius: 20px;
    border: 2px solid #3498db;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

input:valid {
    border-color: #2ecc71;
}

input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

.name-group {
    display: flex;
    gap: 15px;
}

.name-group > div {
    flex: 1;
}

.checkbox-group, .radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item, .radio-item {
    display: flex;
    align-items: center;
}

.checkbox-item input, .radio-item input {
    margin-right: 10px;
}

.char-count {
    text-align: right;
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

button[type="submit"] {
    background-color: #2ecc71;
    color: white;
}

button[type="submit"]:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

button[type="reset"] {
    background-color: #e74c3c;
    color: white;
}

button[type="reset"]:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.required::after {
    content: " *";
    color: #e74c3c;
}

@media (max-width: 600px) {
    .name-group {
        flex-direction: column;
        gap: 0;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    button {
        width: 100%;
    }
}