/* Allgemeine Stile für den gesamten Body */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #FFFFFF; /* Weiß */
    color: #333333;
    font-size: clamp(14px, 2.5vw, 16px);
    line-height: 1.5;
    padding-bottom: 80px; /* Reduziert von 100px, um Footer weniger Platz zu nehmen */
    box-sizing: border-box;
}

/* Header-Bereich */
header {
    background-color: #0038A8; /* Blau */
    color: #FFFFFF; /* Weiß */
    padding: clamp(0.8rem, 2vw, 1rem);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

header h1 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

header h3 a {
    color: #D91023; /* Rot */
    text-decoration: underline;
    font-size: 14px; /* Korrigierte Einheit */
}

#user-greeting {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Buttons im Header */
header button {
    padding: 0.4rem 0.75rem;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
}

/* Allgemeine Button-Stile */
button {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: #0038A8; /* Blau */
    color: #FFFFFF; /* Weiß */
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #00287A; /* Dunkleres Blau */
}

label button {
    margin-left: 5px;
    padding: 2px 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

button[id^="toggle-all-"] {
    margin: 5px 0;
    padding: 5px 10px;
    background: none;
    border: 1px solid #0038A8; /* Blau */
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

button[id^="toggle-all-"]:hover {
    background-color: #D91023; /* Rot */
}

/* Tabs-Container */
.tabs {
    display: flex;
    flex-wrap: wrap; /* Ermöglicht Umbruch bei Bedarf */
    border-bottom: 1px solid #D91023; /* Rot für Unterstreichung */
    background-color: #0038A8; /* Blau */
    justify-content: flex-start; /* Links ausrichten */
    gap: 0.2rem; /* Kleiner Abstand zwischen Buttons */
}

/* Einzelne Tab-Buttons */
.tab-button {
    flex: 0 1 auto; /* Breite an Inhalt anpassen, nicht strecken */
    padding: 0.4rem 0.6rem; /* Reduziertes Padding für kompakteres Aussehen */
    text-align: center;
    background-color: #0038A8; /* Blau */
    border: none;
    cursor: pointer;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #FFFFFF; /* Weiß */
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Verhindert Textumbruch */
    min-width: 0; /* Verhindert ungewollte Breitenanpassung */
}

.tab-button:hover {
    background-color: #D91023; /* Rot beim Hover */
}

.tab-button.active {
    background-color: #D91023; /* Rot beim Active */
    color: #FFFFFF; /* Weißer Text bleibt */
}

/* Tab-Inhalt */
.tab-content {
    display: none;
    padding: clamp(0.75rem, 2vw, 1rem);
    background-color: #F5F5F5; /* Leichtes Grau mit Rot-Ton-Einfluss */
}

.tab-content.active {
    display: block;
}

/* Karten innerhalb von Tab-Inhalten */
.tab-content .card {
    background-color: #FFFFFF; /* Weiß */
    border: 1px solid #D91023; /* Rot für Rahmen */
    border-radius: 8px;
    padding: clamp(0.75rem, 2vw, 1rem);
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(217, 16, 35, 0.2); /* Größerer roter Schatten */
    width: 100%; /* Vollständige Breite */
    box-sizing: border-box;
    color: #333333;
    max-width: none; /* Keine Breitenbeschränkung */
    margin-left: 0; /* Linksbündig */
    margin-right: 0; /* Keine Zentrierung */
}

.card-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

.card p {
    margin: 0.5rem 0;
    color: #333333;
}

.card .delete {
    background-color: #D91023; /* Rot */
}

.card .delete:hover {
    background-color: #B80E1F; /* Dunkleres Rot */
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 6rem;
    right: clamp(0.75rem, 2vw, 1rem);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #D91023; /* Rot */
    color: #FFFFFF; /* Weiß */
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(217, 16, 35, 0.3); /* Größerer roter Schatten */
    z-index: 1000;
}

/* Formular-Overlay */
.form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(217, 16, 35, 0.5); /* Halbtransparentes Rot */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.form-overlay.active {
    display: flex;
}

/* Sichtbarkeit Passwort */
#toggle-password, #toggle-confirm-password {
    margin-left: 5px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

/* Formular-Inhalt */
.form-content {
    background-color: #FFFFFF; /* Weiß */
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border: 2px solid #D91023; /* Rot für Rahmen */
    border-radius: 8px;
    width: 90%;
    max-width: 400px; /* Zentrierte Breite */
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(217, 16, 35, 0.2); /* Größerer roter Schatten */
}

.form-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #0038A8; /* Blau */
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

/* Eingabefelder in Formularen (inkl. Dropdowns und Datepicker) */
.form-content input,
.form-content select,
.form-content input.flatpickr,
.form-content textarea {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #D91023; /* Rot für Rahmen */
    border-radius: 4px;
    box-sizing: border-box;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    line-height: 1.5;
}

.form-content textarea {
    resize: vertical;
    min-height: 80px;
}

/* Formular-Buttons */
.form-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Der mittlere Button wird farblich angepasst */
.form-buttons button:nth-child(2) {
    background-color: #D91023; /* Rot */
    color: #FFFFFF; /* Weißer Text */
}

.form-buttons button:nth-child(2):hover {
    background-color: #B80E1F; /* Dunkleres Rot */
}

/* Buttons innerhalb von .form-buttons */
.form-buttons button {
    flex: 1 1 100px;
    padding: 0.5rem;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
}

/* Chat-Nachrichtenbereich */
#chat-messages {
    background-color: #FFFFFF; /* Weiß */
    padding: 0.75rem;
    border: 1px solid #D91023; /* Rot für Rahmen */
    border-radius: 4px;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 1rem;
    box-shadow: 0 6px 15px rgba(217, 16, 35, 0.2); /* Größerer roter Schatten */
}

#chat-messages p {
    margin: 0.4rem 0;
}

#chat-messages .sent {
    text-align: right;
    color: #0038A8; /* Blau */
}

#chat-messages .received {
    text-align: left;
    color: #333333;
}

/* Karten in der Chats-Liste */
#chats-list .card {
    cursor: pointer;
}

#chats-list .card:hover {
    background-color: #FFE6E6; /* Leichtes Rot für Hover */
}

/*Ladeindikator anzeigen */
#loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(217, 16, 35, 0.5); /* Halbtransparentes Rot */
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#loading-spinner > div {
    background: #FFFFFF; /* Weiß */
    padding: 20px;
    border: 2px solid #D91023; /* Rot für Rahmen */
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(217, 16, 35, 0.2); /* Größerer roter Schatten */
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #D91023; /* Rot */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-spinner p {
    margin-top: 10px;
    color: #333;
}

/* Blink-Animation für Tabs */
@keyframes blink {
    0% { background-color: #D91023; } /* Rot */
    50% { background-color: #FFFFFF; } /* Weiß */
    100% { background-color: #D91023; } /* Rot */
}

.tab-button.blink {
    animation: blink 1s ease-in-out 5;
}

/* Flatpickr-Datepicker-Styling */
.flatpickr-calendar {
    font-family: Arial, sans-serif;
    border: 1px solid #D91023; /* Rot für Rahmen */
    border-radius: 4px;
    box-shadow: 0 6px 15px rgba(217, 16, 35, 0.2); /* Größerer roter Schatten */
    width: 100%;
    max-width: 300px;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background-color: #0038A8; /* Blau */
    border-color: #D91023; /* Rot */
    color: #FFFFFF;
}

.flatpickr-day.today {
    border-color: #D91023; /* Rot */
}

.flatpickr-day:hover {
    background-color: #FFE6E6; /* Leichtes Rot */
    border-color: #D91023; /* Rot */
}

.flatpickr-monthDropdown-months,
.flatpickr-year {
    font-size: 0.9rem;
    color: #333333;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month .numInputWrapper:hover {
    background-color: #FFE6E6; /* Leichtes Rot */
}

/* Sicherstellen, dass Flatpickr-Eingabefeld nicht mit anderen Stilen kollidiert */
input.flatpickr {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #FFFFFF;
}

/* Footer-Styling */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #0038A8; /* Blau */
    color: #FFFFFF; /* Weiß */
    padding: 0.25rem 0; /* Weiter reduziert */
    text-align: center;
    font-size: 0.6rem; /* Noch kleiner */
    box-sizing: border-box;
    border-top: 2px solid #D91023; /* Rot für Oberen Rand */
}

.footer-links {
    margin: 0.2rem 0; /* Weniger Abstand */
}

.footer-links a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 0.2rem; /* Enge Abstände zwischen Links */
    font-size: 0.6rem; /* Anpassung an Footer-Größe */
}

.footer-links a:hover {
    color: #D91023; /* Rot beim Hover */
    text-decoration: underline;
}

.donate-button {
    display: inline-block;
    padding: 0.3rem 0.6rem; /* Reduziertes Padding */
    background-color: #D91023; /* Rot */
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.6rem; /* Kleinere Schrift */
    max-width: 100px; /* Begrenzte Breite */
    margin: 0.2rem 0; /* Weniger Abstand */
    box-shadow: 0 6px 15px rgba(217, 16, 35, 0.3); /* Größerer roter Schatten */
}

.donate-button:hover {
    background-color: #B80E1F; /* Dunkleres Rot */
}

/* Google Translate Widget */
.translate-container {
    margin: 0.2rem 0; /* Weniger Abstand */
}

#google_translate_element {
    display: inline-block;
    margin: 0.2rem 0; /* Reduzierter Abstand */
    padding: 0.2rem; /* Reduzierter Innenabstand */
    background-color: #FFFFFF; /* Weiß */
    border: 1px solid #D91023; /* Rot für Rahmen */
    border-radius: 5px;
    font-size: 0.6rem; /* Anpassung an Footer-Größe */
    box-shadow: 0 6px 15px rgba(217, 16, 35, 0.2); /* Größerer roter Schatten */
}

#google_translate_element a {
    color: #0038A8; /* Blau */
    text-decoration: none;
    font-size: 0.6rem; /* Anpassung */
}

#google_translate_element a:hover {
    color: #D91023; /* Rot beim Hover */
    text-decoration: underline;
}

#google_translate_element select {
    padding: 0.2rem; /* Reduzierter Abstand */
    border: 1px solid #D91023; /* Rot für Rahmen */
    border-radius: 4px;
    background-color: white;
    font-size: 0.6rem; /* Anpassung */
    width: 80px; /* Begrenzte Breite für Kompaktheit */
}

/* Toast-Styling */
.toast {
    opacity: 0.9;
    transition: opacity 1.5s;
    box-shadow: 0 8px 20px rgba(217, 16, 35, 0.3); /* Größerer roter Schatten */
    position: fixed;
    bottom: 90px; /* Anpassung, um Footer Platz zu geben */
    right: clamp(0.5rem, 2vw, 1rem);
    background-color: #D91023; /* Rot */
    color: white;
    padding: 0.75rem;
    border-radius: 10px;
    z-index: 1000;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    max-width: 90%;
}

.toast.hide {
    opacity: 0;
}

/* Responsive Design */

/* Smartphones (max-width: 600px) */
@media (max-width: 600px) {
    .tabs {
        flex-direction: row; /* Nebeneinander statt untereinander */
        gap: 0.1rem; /* Noch kleinerer Abstand */
        padding: 0.2rem; /* Reduzierter Padding */
    }

    .tab-button {
        padding: 0.3rem 0.4rem; /* Noch kompakter */
        font-size: 0.7rem; /* Kleinere Schrift */
        flex: 0 1 auto; /* An Inhalt anpassen */
    }
}

/* Smartphones mit hoher Auflösung (z. B. Xiaomi 11T, max-width: 1080px) */
@media (max-width: 1080px) and (min-width: 601px) {
    .tabs {
        gap: 0.3rem; /* Kleinerer Abstand */
    }

    .tab-button {
        padding: 0.4rem 0.6rem;
        flex: 0 1 calc(20% - 0.24rem); /* Fünf Buttons nebeneinander, kleiner Abstand */
    }
}

/* Desktops (min-width: 1081px) */
@media (min-width: 1081px) {
    .tabs {
        gap: 0.5rem;
    }

    .tab-button {
        padding: 0.6rem 0.8rem;
        flex: 0 1 calc(16.66% - 0.4rem); /* Sechs Buttons nebeneinander, kleiner Abstand */
        max-width: 150px; /* Begrenzte maximale Breite */
    }
}
/* Desktops (min-width: 1081px) */
@media (min-width: 1081px) {
    header {
        padding: 1rem 2rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .tabs {
        justify-content: center;
    }

    .tab-button {
        max-width: 200px;
    }

    .tab-content .card {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .form-content {
        max-width: 450px;
        width: 90%;
    }

    footer {
        padding: 0.25rem 0;
    }

    .donate-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
        max-width: 120px;
    }
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #D91023; /* Rot */
    color: #fff;
    padding: 10px;
    text-align: center;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 20px rgba(217, 16, 35, 0.3); /* Größerer roter Schatten */
}

.cookie-buttons button {
    margin: 0 10px;
    padding: 8px 16px;
    cursor: pointer;
    background-color: #0038A8; /* Blau */
    color: #FFFFFF;
}

.cookie-buttons button:hover {
    background-color: #00287A; /* Dunkleres Blau */
}

.ad-links {
    list-style: none;
    padding: 0;
}
.ad-links li {
    margin-bottom: 1rem;
}
.ad-image {
    max-width: 100px;
    height: auto;
    margin-right: 1rem;
    vertical-align: middle;
    border-radius: 4px;
}
.ad-links a {
    display: flex;
    align-items: center;
    color: #0038A8; /* Blau */
    text-decoration: none;
}
.ad-links a:hover {
    color: #D91023; /* Rot beim Hover */
    text-decoration: underline;
}

.highlighted-ad-text {
    color: #D91023; /* Rot */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); /* Größerer Schatten */
    border: 1px solid #B80E1F; /* Dunkleres Rot */
    font-size: 16px;
    font-weight: bold;
    background-color: #FFFFFF; /* Weiß */
    padding: 10px;
    border-radius: 5px;
    text-align: left;
    margin: 10px 0;
}

.highlighted-ad-text a {
    color: #D91023; /* Rot */
    text-decoration: underline;
}

/* Statistik-Card */
#statsCard {
    background-color: #FFFFFF; /* Weiß */
    box-shadow: 0 8px 20px rgba(217, 16, 35, 0.2); /* Größerer roter Schatten */
    padding: 1rem;
    border: 1px solid #D91023; /* Rot für Rahmen */
    border-radius: 8px;
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 250px;
    z-index: 1000;
}

#statsCard h3 {
    margin-top: 0;
    color: #0038A8; /* Blau */
}

#statsCard p {
    margin: 0.5rem 0;
}

#statsCard button {
    padding: 0.5rem;
    background-color: #D91023; /* Rot */
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#statsCard button:hover {
    background-color: #B80E1F; /* Dunkleres Rot */
}

/* Medienabfrage für kleine Bildschirme (z. B. Handys) */
@media (max-width: 768px) {
    #statsCard {
        width: 90%; /* Anpassung an die Bildschirmbreite */
        max-width: 200px; /* Begrenzung der maximalen Breite */
        left: 5%; /* Zentriert die Card horizontal */
        right: auto; /* Entfernt das feste right */
    }
}

em {
    color: #e74c3c; /* Rote Warnfarbe */
    font-style: italic;
}