:root {
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-color: #896F99; /* Dein Lila-Ton */
    --nav-active: #e74c3c;
}

/* Haupt-Container der Leiste */
.floating-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: var(--nav-bg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Trennt Links von Rechts */
    z-index: 9999;
    box-sizing: border-box;
}

/* Bereich für die normalen Menüpunkte */
.nav-links {
    display: flex;
    gap: 15px;
    flex-grow: 1;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--nav-color);
    text-decoration: none;
    font-size: 11px;
    transition: transform 0.2s;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

.nav-item:hover {
    transform: translateY(-2px);
}

/* Rechter Aktionsbereich (Scroll-to-Top) */
.nav-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px; /* Fester Platzhalter rechts */
    margin-left: 10px;
    border-left: 1px solid rgba(0,0,0,0.05);
}

/* Der Scroll-to-Top Button selbst */
.scroll-top-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--nav-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    
    /* Standardmäßig unsichtbar und nach unten verschoben */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Zustand, wenn der Button eingeblendet wird */
.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--nav-active);
}
/* Flex-Optimierung für dein angepasstes HTML */
.floating-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 600px; /* Leicht erhöht für die zusätzlichen Buttons rechts */
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    box-sizing: border-box;
}

.nav-links, .nav-actions {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: space-around;
}

/* Trennlinie zwischen den beiden Blöcken */
.nav-actions {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    padding-left: 10px;
}

/* --- BOTTOM SHEETS STYLE --- */

/* Hintergrund-Verdunkelung */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sheet-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Die Menü-Karten, die von unten hochfahren */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%); /* Startet versteckt unter dem Bildschirm */
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 30px 30px 0 0;
    padding: 15px 20px 35px 20px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
    z-index: 10001;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1); /* Schöner "Bounce"-Effekt */
    box-sizing: border-box;
}
.bottom-sheet.is-active {
    transform: translate(-50%, 0); /* Fährt hoch */
}

/* Der kleine Balken zum "Runterziehen" oben im Sheet */
.sheet-handle {
    width: 40px;
    height: 50px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 0 auto 10px auto;
}
.sheet-header h3 {
    text-align: center;
    margin: 0 0 20px 0;
    font-family: sans-serif;
    color: #896F99;
}

/* Buttons innerhalb der hochgefahrenen Sheets */
.sheet-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sheet-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    background: #f8f6f9;
    color: #333;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 500;
    transition: background 0.2s;
}
.sheet-btn i {
    color: #896F99;
    font-size: 18px;
    width: 24px;
}
.sheet-btn:hover {
    background: #eedfef;
}
a.sheet-btn.active {
    background-color: #896F99;
    color: #fff;
}
a.sheet-btn.active i {
    color: #fff !important;
}
.sheet-btn.logout {
    color: #e74c3c;
    margin-top: 10px;
}
.sheet-btn.logout i {
    color: #e74c3c;
}

/* Spezifische Anpassung, damit das Such-Sheet stabil steht */
.search-sheet {
    background: #fff;
}

/* Suchfeld mit integriertem Icon links */
.search-input-wrapper {
    position: relative;
    width: 100%;
}
.search-icon-inside {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
#live-search-field {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #eedfef;
    border-radius: 15px;
    font-size: 16px; /* Wichtig: 16px verhindert das automatische Reinzoomen bei iOS! */
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#live-search-field:focus {
    border-color: #896F99;
}

/* 3 Filter nebeneinander */
.search-filters-row {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 5px;
}
/* 1. Die echten Radio-Buttons unsichtbar machen */
.search-filters-row input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 2. Die Labels exakt so stylen wie die alten Buttons */
.filter-label {
    flex: 1;
    padding: 10px 5px;
    background: #f8f6f9;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none; /* Verhindert unschönes Markieren von Text beim schnellen Tippen */
}

/* Hover-Effekt für die inaktiven Optionen */
.filter-label:hover {
    background: #eedfef;
}

/* 3. Der magische Wechsel: Wenn das Radio AKTIV ist, 
   wird das direkt darauf folgende Label eingefärbt */
.search-filters-row input[type="radio"]:checked + .filter-label {
    background: #896F99; /* Dein Community-Lila */
    color: #fff;
}

/* Optional: Ein leichter blauer/lila Rahmen, wenn man sich per Tastatur (Tab) durchbewegt */
.search-filters-row input[type="radio"]:focus-visible + .filter-label {
    outline: 2px solid #896F99;
    outline-offset: 2px;
}
.filter-btn {
    flex: 1; /* Teilt den Platz exakt in 3 gleiche Teile */
    padding: 10px 5px;
    background: #f8f6f9;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover {
    background: #eedfef;
}
.filter-btn.active {
    background: #896F99;
    color: #fff;
}

/* Sortier-Bereich darunter */
.search-sort-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.search-sort-row label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}
#search-sort-select {
    width: 100%;
    padding: 12px 15px;
    background: #f8f6f9;
    color: #333;
    border: 2px solid #f8f6f9;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    appearance: none; /* Entfernt den Standard-Browser-Pfeil */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23896F99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

/* Der finale Action-Button ganz unten */
.search-submit-btn {
    margin-top: 15px;
    width: 100%;
    padding: 14px;
    background: #896F99;
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
}

/* Den Header für die absolute Positionierung vorbereiten */
.sheet-header {
    position: relative;
    width: 100%;
    padding-top: 5px;
}

/* Der neue Schließen-Button */
.sheet-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0edf2; /* Dezenter, heller Hintergrund */
    color: #666;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    padding: 0;
}

/* Visuelles Feedback beim Tippen/Hovern */
.sheet-close-btn:hover {
    background: #eedfef;
    color: #896F99; /* Dein Community-Lila */
    transform: scale(1.05);
}

.sheet-close-btn:active {
    transform: scale(0.95);
}
/* Diese Gruppe sorgt dafür, dass die 3 Buttons perfekt nebeneinander liegen */
.filter-buttons-group {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 2px; /* Minimaler Abstand zur Überschrift darüber */
}

/* Die echten Radio-Knöpfe bleiben unsichtbar */
.filter-buttons-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Das Styling für die Kacheln bleibt gleich */
.filter-label {
    flex: 1;
    padding: 10px 5px;
    background: #f8f6f9;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.filter-label:hover {
    background: #eedfef;
}

/* Aktiv-Zustand */
.filter-buttons-group input[type="radio"]:checked + .filter-label {
    background: #896F99;
    color: #fff;
}

/* Tastatur-Fokus */
.filter-buttons-group input[type="radio"]:focus-visible + .filter-label {
    outline: 2px solid #896F99;
    outline-offset: 2px;
}

.filter-buttons-group input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
input[type="radio"] + label:before {
    display:none !important;
	width:0 !important;
	height:0 !important;
	position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
input[type="radio"] + label {    
    padding-left: 10px !important;
    padding-right: 10px;
}

input[type="checkbox"] + label:before {
    display:none !important;
	width:0 !important;
	height:0 !important;
	position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}
input[type="checkbox"] + label {    
    padding-left: 10px !important;
    padding-right: 10px;
}
.filter-buttons-group input[type="checkbox"]:focus-visible + .filter-label {
    outline: 2px solid #896F99;
    outline-offset: 2px;
}
input[type="checkbox"]:checked + .filter-label {
    background: #896F99;
    color: #fff;
}

.hashtagsearch {
    display: flex;
    justify-content: space-between;
    gap: 0 15px;
    flex-wrap: wrap;
    white-space: nowrap;
	max-height: 120px;
    overflow: hidden;
}