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

.switch-container {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

input[type="radio"] {
    display: none;
}

.label {
    padding: 10px 20px;
    border-radius: 25px;
    user-select: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.icon {
    margin: 0 10px;
}

.toggle {
    position: absolute;
    background-color: orange;
    border-radius: 25px;
    height: 100%;
    z-index: -1;
    transition: transform 0.3s;
}

.switch-container:nth-of-type(1) .toggle {
    width: 50%;
}

.switch-container:nth-of-type(2) .toggle {
    width: 25%;
}

input[name="switch1"]#relevanz:checked ~ .toggle {
    transform: translateX(0);
}

input[name="switch1"]#datum:checked ~ .toggle {
    transform: translateX(100%);
}

input[name="switch1"]#relevanz:checked + label {
    background-color: orange;
    color: white;
}

input[name="switch1"]#datum:checked + label {
    background-color: orange;
    color: white;
}

input[name="switch2"]#option1:checked ~ .toggle {
    transform: translateX(0);
}

input[name="switch2"]#option2:checked ~ .toggle {
    transform: translateX(100%);
}

input[name="switch2"]#option3:checked ~ .toggle {
    transform: translateX(200%);
}

input[name="switch2"]#option4:checked ~ .toggle {
    transform: translateX(300%);
}

input[name="switch2"]#option1:checked + label,
input[name="switch2"]#option2:checked + label,
input[name="switch2"]#option3:checked + label,
input[name="switch2"]#option4:checked + label {
    background-color: orange;
    color: white;
}
