/* Lokale Schriftarten einbinden */
@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Regular.woff2') format('woff2'),
         url('fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Medium.woff2') format('woff2'),
         url('fonts/Roboto-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Bold.woff2') format('woff2'),
         url('fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2c2c2c;
    color: #f5f5f5;
    line-height: 1.6;
}

/* ... (Der Rest deines CSS-Codes bleibt unverändert) ... */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px;
}

h1 {
    text-align: center;
    font-weight: 700;
    color: #ffd700;
}

h2 {
    text-align: center;
    font-weight: 500;
    color: #ffd700;
}

h3 {
    text-align: center;
    font-weight: 300;
    color: #ffd700;
}

h4 {
    text-align: center;
    font-weight: 200;
    color: #f5f5f5;
}

form {
    background: #3c3c3c;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

fieldset {
    border: none;
    margin-bottom: 20px;
}

legend {
    font-weight: 500;
    color: #ffd700;
    margin-bottom: 10px;
    padding: 0 5px;
    position: relative;
    top: -22px; 
    left: -15px;
}

.optionen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

select, input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #2c2c2c;
    color: #f5f5f5;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: #ffd700;
}

.checkbox-gruppe {
    display: flex;
    flex-wrap: wrap; /* Ermöglicht Umbruch bei Platzmangel */
    align-items: flex-start; 
    margin-bottom: 10px; /* Fügt vertikalen Abstand zwischen den Checkboxen hinzu */
}

.checkbox-gruppe:last-child {
    margin-bottom: 0; /* Entfernt den Abstand nach der letzten Checkbox */
}

.checkbox-gruppe label {
    display: flex;
    align-items: center;
    gap: 10px; /* Abstand zwischen Checkbox und Text */
    white-space: nowrap; /* Prevents wrapping of the label text */
    overflow: hidden;
    text-overflow: ellipsis; /* Adds ellipsis if the text overflows */
    font-size: clamp(16px, 1.8vw, 18px); /* Größere Schriftgröße für Labels */
    position: relative;
    padding-left: 30px; /* Platz für Checkbox */
    cursor: pointer;
}

.checkbox-gruppe input[type="checkbox"] {
    display: none; /* Versteckt die Standard-Checkbox */
}

.checkbox-gruppe label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px; /* Größere Checkbox */
    height: 18px; /* Größere Checkbox */
    border: 2px solid #555; /* Grauer Rand */
    border-radius: 4px;
    background: #3c3c3c; /* Grauer Hintergrund */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.checkbox-gruppe input[type="checkbox"]:checked + label::before {
    background: #3c3c3c; /* Hintergrund bleibt grau */
    border-color: #ffd700; /* Gelber Rand bei Auswahl */
}

.checkbox-gruppe label::after {
    content: '✔'; /* Gelber Haken */
    position: absolute;
    left: 5px; /* Position des Hakens anpassen */
    top: 50%;
    transform: translateY(-50%) scale(0);
    font-size: 14px; /* Größerer Haken */
    color: #ffd700; /* Gelbe Farbe für den Haken */
    transition: transform 0.3s ease;
}

.checkbox-gruppe input[type="checkbox"]:checked + label::after {
    transform: translateY(-50%) scale(1); /* Haken wird sichtbar */
}

.checkbox-description {
    margin-left: 30px; /* Beibehaltung des Einzugs */
    margin-top: -10px; /* Verschiebt die Beschreibung näher an die Checkbox */
    font-size: clamp(12px, 1.5vw, 14px); /* Beibehaltung der Schriftgröße */
    color: #f5f5f5; /* Beibehaltung der Textfarbe */
    flex-basis: 100%; /* Beibehaltung der Zeilenbreite */
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background: #ffd700;
    color: #2c2c2c;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #e5c100;
}

button:disabled {
    background: #555;
    cursor: not-allowed;
}

#ausgabeBereich {
    margin-top: 20px;
    background: #3c3c3c;
    padding: 20px;
    border-radius: 8px;
    /*max-height: 400px;*/
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#ausgabeBereich h2 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 10px;
}

#ausgabeBereich p {
    margin-left: 20px;
    color: #f5f5f5;
}

.form-section {
    margin-bottom: 20px;
    padding: 10px 15px 1px 15px; /* Further reduced top padding */
    background: #3c3c3c;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#eingabeFeld {
    width: 100%; /* Ensures it matches the full width of the container */
    padding: 8px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #2c2c2c;
    color: #f5f5f5;
    font-size: 14px;
    box-sizing: border-box; /* Ensures padding is included in the width */
}

#eingabeFeld:focus {
    outline: none;
    border-color: #ffd700;
}

.buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: nowrap; /* Ensures buttons stay side by side */
}

.buttons button {
    width: 48%;
}

.form-content {
    padding: 0px;

    margin-top: -22px; /* Adds spacing between legend and content */
}

.form-row {
    display: flex;
    flex-wrap: wrap; /* Allows sections to stack vertically if space is limited */
    gap: 20px;
}

.form-row .form-section {
    flex: 1 1 30%; /* Allows sections to shrink or grow dynamically */
    min-width: 200px; /* Ensures a minimum width for each section */
}

.form-row .form-section:first-child {
    flex: 0.7; /* Makes "Wortart verwenden" smaller when side by side */
}

.form-row .form-section:last-child {
    flex: 1.3; /* Makes "Eingabe umwandeln" larger when side by side */
}

@media (max-width: 650px) {
    .form-row {
        flex-direction: column; /* Ordnet die Abschnitte untereinander an */
        gap: 0px; /* Gleicher Abstand wie bei anderen Elementen */
    }

    .form-row .form-section {
        flex: 1 1 100%; /* Nimmt die volle Breite ein */
        max-width: 100%; /* Verhindert Einschränkungen der Breite */
    }
}

a {
    color: #ffd700; /* Gelbe Farbe passend zum Design */
    text-decoration: none; /* Entfernt die Unterstreichung */
    font-weight: 500; /* Gleiche Schriftstärke wie andere Texte */
}

a:hover {
    color: #e5c100; /* Etwas dunkleres Gelb beim Hover */
    text-decoration: underline; /* Unterstreichung beim Hover */
}

footer {
    text-align: center; /* Zentriert den Text */
    font-size: 12px; /* Kleinere Schriftart */
    margin-top: 20px; /* Abstand nach oben */
    color: #f5f5f5; /* Gleiche Farbe wie der restliche Text */
}

input[type="range"] {
    -webkit-appearance: none; /* Für WebKit-basierte Browser */
    appearance: none; /* Standardisierte Eigenschaft */
    width: 100%;
    height: 8px;
    background: #555; /* Matches the dark background theme */
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffd700; /* Matches the yellow accent color */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #e5c100; /* Slightly darker yellow for hover */
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffd700; /* Matches the yellow accent color */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #e5c100; /* Slightly darker yellow for hover */
}

input[type="range"]::-ms-thumb {
    width: 16px;
    height: 16px;
    background: #ffd700; /* Matches the yellow accent color */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-ms-thumb:hover {
    background: #e5c100; /* Slightly darker yellow for hover */
}

input[type="range"]::-ms-track {
    width: 100%;
    height: 8px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

.slider-description {
    text-align: center;
    margin-top: 5px;
    font-size: clamp(12px, 1.5vw, 14px); /* Matches the description style */
    color: #f5f5f5; /* Matches the text color */
}
