body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
    box-sizing: border-box;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

label {
    margin-bottom: 5px;
    font-weight: 500;
    width: 20%;  /* Labels haben eine feste Breite von 20% */
    text-align: left;  /* Labels werden linksbündig ausgerichtet */
    padding-right: 10px;  /* Abstand zwischen Label und Feld */
}

input[type="text"],
input[type="email"],
textarea,
select {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 75%;  /* Eingabefelder nehmen den restlichen Platz ein */
    font-size: 14px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

.group {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #fafafa;
    width: 100%;
    box-sizing: border-box;
}

.group legend {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 10px;
    padding-left: 10px;
    padding-right: 10px;
    text-transform: uppercase;  /* Gruppenbezeichnungen in Großbuchstaben */
}

.row {
    display: flex;
    align-items: center;  /* Vertikale Zentrierung */
    width: 100%;
    margin-bottom: 10px;
}

button {
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

a {
    text-decoration: none;
    color: #007bff;
    font-size: 14px;
    margin-top: 10px;
    display: block;
    text-align: center;
}

@media (max-width: 600px) {
    .row {
        flex-direction: column;
        align-items: flex-start;  /* Zurücksetzen auf Standard für mobile Geräte */
    }

    label {
        width: 100%;  /* Labels nehmen volle Breite auf mobilen Geräten */
        text-align: left;  /* Labels bleiben linksbündig auf mobilen Geräten */
        padding-right: 0;  /* Kein zusätzlicher Abstand auf mobilen Geräten */
    }

    input[type="text"],
    input[type="email"],
    textarea,
    select {
        width: 100%;  /* Eingabefelder nehmen volle Breite auf mobilen Geräten */
    }
}
