/* ============================================
   ForDJOnly Lounge - MELO-Inspired Design
   Modern, timeless, club-ready aesthetic
   ============================================ */

:root {
    --header-logo-image: url('../assets/logo.png');
    --splash-logo-image: url('../assets/logo.png');
}

/* Form Controls - Match Profile Style */
.chart-filter-bar {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 0 !important;
    /* display: flex entfernt - wird per inline style gesteuert */
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    border-radius: 12px 12px 0 0 !important; /* Abgerundete obere Ecken wie Table Header */
}

/* Chart-Filter-Bar nur anzeigen wenn explizit display: flex gesetzt ist */
.chart-filter-bar[style*="display: flex"],
.chart-filter-bar[style*="display:flex"] {
    display: flex !important;
}

/* Filter-Bar passt sich an Table Header an */
.chart-filter-bar + .file-browser-list .file-browser-header {
    border-radius: 0 !important; /* Keine abgerundeten Ecken oben, da Filter-Bar darüber ist */
    margin-top: 0 !important;
}

.chart-filter-bar .form-control,
.lounge-wrapper .form-control {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.chart-filter-bar .form-control:focus,
.lounge-wrapper .form-control:focus {
    background: var(--bg-secondary) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 51, 102, 0.25) !important;
    outline: none !important;
}

.chart-filter-bar .form-control:hover,
.lounge-wrapper .form-control:hover {
    border-color: rgba(255, 51, 102, 0.5) !important;
}

/* Ensure filter bar container keeps flex layout */
.chart-filter-bar > div[style*="display: flex"] {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
}

/* Lounge Layout - Sidebar + Main Content */
.lounge-wrapper {
    display: flex !important;
    height: 100vh !important; /* Feste Höhe statt min-height */
    width: 100vw !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    overflow: hidden !important; /* Kein Scrollbar auf Wrapper */
    background: linear-gradient(135deg, #000000 0%, hsl(0, 0%, 17%) 100%) !important;
    color: #ffffff !important;
}

/* Texte in der Lounge weiß, aber Icons und Cards behalten ihre Farben */
.lounge-wrapper {
    color: #ffffff !important;
}

.lounge-wrapper .lounge-sidebar,
.lounge-wrapper .lounge-main,
.lounge-wrapper .lounge-right-sidebar {
    background: transparent !important;
}

/* Statistik-Cards und Icons behalten ihre Farben */
.lounge-stat-card,
.lounge-stat-icon,
.lounge-stat-icon *,
.lounge-stat-icon i {
    color: inherit !important;
}

/* Spezifische Icon-Farben beibehalten */
.lounge-stat-icon.server-status,
.lounge-stat-icon.server-status *,
.lounge-stat-icon.server-status i {
    color: #00ff99 !important;
}

.lounge-stat-icon.collection,
.lounge-stat-icon.collection *,
.lounge-stat-icon.collection i {
    color: var(--primary-color) !important;
}

.lounge-stat-icon.traffic,
.lounge-stat-icon.traffic *,
.lounge-stat-icon.traffic i {
    color: #00d4ff !important;
}

.lounge-stat-icon.tracks-today,
.lounge-stat-icon.tracks-today *,
.lounge-stat-icon.tracks-today i {
    color: #00ff99 !important;
}

/* Andere Icons behalten ihre Farben */
.lounge-wrapper .fas:not(.lounge-stat-icon *),
.lounge-wrapper .far:not(.lounge-stat-icon *),
.lounge-wrapper .fab:not(.lounge-stat-icon *),
.lounge-wrapper i:not(.lounge-stat-icon *) {
    color: inherit !important;
}

/* Sidebar */
.lounge-sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 80px; /* Start unter dem Header */
    height: calc(100vh - 80px - 90px); /* Höhe minus Header und Player */
    overflow-y: auto; /* Nur Sidebar scrollt */
    overflow-x: hidden;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.3s ease,
                bottom 0.3s ease,
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth transition mit modernen Animationen */
    /* Verhindere ALLE Animationen auf Sidebar-Inhalt */
    contain: layout style paint !important; /* Isoliere Sidebar-Layout */
}

/* Verhindere ALLE Animationen/Transitions auf Sidebar-Inhalt beim Öffnen - KOMPLETT */
.lounge-sidebar,
.lounge-sidebar *,
.lounge-sidebar *::before,
.lounge-sidebar *::after {
    animation: none !important;
    transition-duration: 0s !important; /* Sofortige Transitions, keine Verzögerung */
    transition-delay: 0s !important; /* Keine Verzögerungen */
    animation-delay: 0s !important; /* Keine Animations-Verzögerungen */
    will-change: auto !important; /* Verhindere Browser-Optimierungen die Animationen auslösen */
}

/* Verhindere speziell alle Transitions beim Sidebar-Öffnen - auch auf allen Kindern */
.lounge-sidebar:not(.sidebar-initialized) *,
.lounge-sidebar:not(.sidebar-initialized) *::before,
.lounge-sidebar:not(.sidebar-initialized) *::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Verhindere ALLE Transitions beim Öffnen der Sidebar - auch nach Initialisierung */
.lounge-sidebar:not(.collapsed) *,
.lounge-sidebar:not(.collapsed) *::before,
.lounge-sidebar:not(.collapsed) *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/* Verhindere speziell Transitions auf Nav-Items beim Sidebar-Öffnen */
.lounge-sidebar:not(.collapsed) .lounge-nav-item,
.lounge-sidebar:not(.collapsed) .lounge-nav-section,
.lounge-sidebar:not(.collapsed) .lounge-nav-section-title,
.lounge-sidebar:not(.collapsed) .lounge-sidebar-nav,
.lounge-sidebar:not(.collapsed) .lounge-playlist-item,
.lounge-sidebar:not(.collapsed) .lounge-chart-item,
.lounge-sidebar:not(.collapsed) .lounge-create-playlist,
.lounge-sidebar:not(.collapsed) .lounge-sidebar-footer,
.lounge-sidebar:not(.collapsed) .lounge-playlist-delete-btn,
.lounge-sidebar:not(.collapsed) .playlist-name,
.lounge-sidebar:not(.collapsed) .playlist-color-dot {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Nav-Items haben nur Hover-Transitions, keine anderen */
.lounge-nav-item {
    transition: color 0.2s ease, background 0.2s ease !important; /* Nur Hover-Effekte */
}

/* Verhindere Transitionen beim ersten Laden - Sidebar startet collapsed */
.lounge-sidebar:not(.sidebar-initialized) {
    transition: none !important;
}

/* Sidebar Scrollbar - KOMPLETT ENTFERNT */
.lounge-sidebar::-webkit-scrollbar {
    display: none; /* Scrollbar komplett verstecken */
    width: 0;
    height: 0;
}

.lounge-sidebar {
    -ms-overflow-style: none; /* IE und Edge */
    scrollbar-width: none; /* Firefox */
}

/* Sidebar collapsed state - Standard beim Laden - HOCHSTE PRIORITÄT */
.lounge-sidebar.collapsed {
    width: 60px !important;
    transform: translateX(0) !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Verhindere FOUC - Sidebar startet collapsed, keine Transition beim ersten Laden */
.lounge-sidebar.collapsed:not(.sidebar-initialized) {
    transition: none !important;
}

/* Stelle sicher, dass Sidebar beim Laden IMMER collapsed ist - auch ohne Klasse */
.lounge-sidebar:not(.sidebar-initialized):not(.open) {
    width: 60px !important;
    transform: translateX(0) !important;
    overflow: visible !important;
    transition: none !important;
}

/* Verhindere, dass Sidebar durch andere Regeln geöffnet wird */
.lounge-sidebar:not(.sidebar-initialized) {
    width: 60px !important;
    transform: translateX(0) !important;
}

/* Zeige Sidebar wieder nach Initialisierung - nur wenn nicht collapsed */
.lounge-sidebar.sidebar-initialized:not(.collapsed) {
    transform: translateX(0) !important;
    width: 280px !important;
    visibility: visible !important;
}

/* WICHTIG: Verstecke Text wenn Sidebar collapsed ist, aber zeige Icons */
.lounge-sidebar.collapsed .lounge-nav-item span,
.lounge-sidebar.collapsed .lounge-nav-section-title,
.lounge-sidebar.collapsed .lounge-playlist-item .playlist-name,
.lounge-sidebar.collapsed .lounge-playlist-item .playlist-color-dot,
.lounge-sidebar.collapsed .playlist-track-count {
    opacity: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    display: none !important;
}

/* WICHTIG: Verstecke "No playlists yet" Message wenn Sidebar collapsed ist */
.lounge-sidebar.collapsed #lounge-playlists-list > div {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* WICHTIG: Verstecke Create Playlist Button und Footer wenn collapsed */
.lounge-sidebar.collapsed .lounge-sidebar-footer,
.lounge-sidebar.collapsed .lounge-create-playlist {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* WICHTIG: Zentriere Icons wenn Sidebar collapsed ist */
.lounge-sidebar.collapsed .lounge-nav-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
}

.lounge-sidebar.collapsed .lounge-nav-item i {
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* WICHTIG: Verstecke Section-Titel wenn collapsed */
.lounge-sidebar.collapsed .lounge-nav-section {
    padding: 0 !important;
    margin-bottom: 1rem !important;
}

.lounge-sidebar.collapsed .lounge-nav-section-title {
    display: none !important;
}

/* WICHTIG: Zentriere Playlist-Icons wenn collapsed */
.lounge-sidebar.collapsed .lounge-playlist-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    cursor: pointer !important;
}

/* WICHTIG: Zeige nur Icon wenn collapsed, zentriert (Color-Dots sind versteckt) */
.lounge-sidebar.collapsed .lounge-playlist-item i {
    margin: 0 auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
}

/* Sidebar wenn Player minimiert ist */
body:has(#lounge-player-bar.minimized) .lounge-sidebar {
    height: calc(100vh - 80px); /* Volle Höhe wenn Player minimiert */
}

/* Sidebar wenn Player nicht sichtbar ist */
body:not(:has(#lounge-player-bar[style*="display: flex"])) .lounge-sidebar {
    height: calc(100vh - 80px); /* Volle Höhe wenn Player nicht sichtbar */
}

/* Sidebar wenn Player maximiert ist */
body:has(#lounge-player-bar:not(.minimized):not(.fully-minimized)[style*="display: flex"]) .lounge-sidebar {
    height: calc(100vh - 80px - 80px); /* Höhe minus Header und Player */
}

.lounge-sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    margin-top: 0; /* No margin needed - header bar is separate */
    opacity: 1 !important; /* Immer sichtbar, kein Fade-Effekt */
    transform: none !important; /* Keine Transform-Animationen */
    transition: none !important; /* Keine Transitionen */
    animation: none !important; /* Keine Animationen */
}

.lounge-nav-section {
    margin-bottom: 2rem;
    opacity: 1 !important; /* Immer sichtbar, kein Fade-Effekt */
    transform: none !important; /* Keine Transform-Animationen */
    transition: none !important; /* Keine Transitionen */
    animation: none !important; /* Keine Animationen */
}

.lounge-nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
    opacity: 1 !important; /* Immer sichtbar, kein Fade-Effekt */
    transform: none !important; /* Keine Transform-Animationen */
    transition: none !important; /* Keine Transitionen */
    animation: none !important; /* Keine Animationen */
}

/* Chart Section Header mit Toggle */
.lounge-nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.lounge-nav-section-header .lounge-nav-section-title {
    margin-bottom: 0;
    padding: 0;
    flex: 1;
}

/* Alte Dropdown/Toggle Styles entfernt - nicht mehr benötigt */

/* Chart Items */
.lounge-chart-item {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    transition: color 0.2s ease, background 0.2s ease !important; /* Nur Hover-Effekte */
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.lounge-chart-item i {
    color: var(--primary-color);
    opacity: 0.8;
    transition: opacity 0.2s ease !important; /* Nur Hover-Effekt */
    animation: none !important;
    transform: none !important;
}

.lounge-chart-item:hover i {
    opacity: 1;
}

/* Chart Header */
.lounge-chart-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.lounge-chart-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lounge-chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.lounge-chart-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lounge-chart-close:hover {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.1);
}

/* Chart Track Items */
.file-browser-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-browser-track-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-browser-track-item:hover {
    background: rgba(255, 51, 102, 0.05);
    border-color: rgba(255, 51, 102, 0.3);
    transform: translateX(4px);
}

.track-item-rank {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.track-item-info {
    flex: 1;
    min-width: 0;
}

.track-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
    position: relative;
    max-width: 100%;
}

.track-item-title:hover {
    position: relative;
}

.track-item-title[data-full-text]:hover::before {
    content: attr(data-full-text);
    position: absolute;
    left: 0;
    bottom: 100%;
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.track-item-artist {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    max-width: 100%;
}

.track-item-artist:hover {
    position: relative;
}

.track-item-artist[data-full-text]:hover::before {
    content: attr(data-full-text);
    position: absolute;
    left: 0;
    bottom: 100%;
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.track-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.track-item-bpm,
.track-item-key {
    white-space: nowrap;
}

.track-item-genre {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 0.2rem;
    font-style: italic;
}

.track-item-pool {
    font-size: 0.65rem;
    color: var(--primary-color);
    margin-top: 0.15rem;
    opacity: 0.8;
}

.lounge-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease; /* Nur notwendige Transitions, kein 'all' */
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
    opacity: 1 !important; /* Immer sichtbar, kein Fade-Effekt */
    transform: none !important; /* Keine Transform-Animationen */
    animation: none !important; /* Keine Animationen */
    visibility: visible !important; /* Immer sichtbar */
}

.lounge-nav-item:hover {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.1);
}

.lounge-nav-item.active {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.15);
}

.lounge-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.lounge-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.125rem;
}

.lounge-playlist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease !important; /* Nur Hover-Effekte, kein 'all' */
    font-size: 0.875rem;
    position: relative;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.lounge-playlist-item:hover {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.1);
}

.lounge-playlist-item.active {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.15);
    font-weight: 600;
}

.lounge-playlist-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.lounge-playlist-item i {
    width: 20px;
    text-align: center;
    font-size: 1.125rem;
}

.playlist-name {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.lounge-playlist-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: #dc3545;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease !important; /* Nur Hover-Effekte, kein 'all' */
    opacity: 0;
    padding: 0;
    font-size: 0.7rem;
    margin-left: 0.375rem;
    flex-shrink: 0;
    vertical-align: middle;
    line-height: 1;
    animation: none !important;
    transform: none !important;
    visibility: visible !important;
}

.lounge-playlist-item:hover .playlist-name .lounge-playlist-delete-btn {
    opacity: 1;
}

.lounge-playlist-item:hover .lounge-playlist-delete-btn {
    opacity: 1;
}

/* Drag & Drop Styles */
.file-item-row.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.lounge-playlist-item.drag-over {
    background: rgba(157, 78, 221, 0.2) !important;
    border: 2px dashed var(--secondary-color, #9d4edd) !important;
    transform: scale(1.02);
}

.lounge-playlist-delete-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    transform: scale(1.1);
}

.lounge-playlist-delete-btn:active {
    transform: scale(0.95);
}

.playlist-track-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    flex-shrink: 0;
}

.lounge-playlist-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lounge-playlist-dot.red { background: #ff3366; }
.lounge-playlist-dot.green { background: #00ff99; }
.lounge-playlist-dot.orange { background: var(--primary-color); }
.lounge-playlist-dot.purple { background: var(--secondary-color); }

.lounge-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Push to bottom */
    flex-shrink: 0; /* Don't shrink */
    background: var(--bg-sidebar);
    z-index: 10;
}

.lounge-create-playlist {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.2s ease, text-shadow 0.2s ease !important; /* Nur Hover-Effekte, kein 'all' */
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.lounge-create-playlist:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

/* Main Content Area */
.lounge-main {
    flex: 1;
    margin-left: 280px; /* Space for fixed sidebar */
    margin-right: 80px; /* Space for right sidebar toggle button */
    margin-top: 80px; /* Space for fixed header */
    padding: 2rem;
    padding-bottom: 100px; /* Platz für Player Bar (80px + 20px margin) */
    background: var(--bg-primary);
    height: calc(100vh - 80px); /* Feste Höhe statt min-height */
    overflow-y: auto; /* Nur Main Content scrollt */
    overflow-x: hidden;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-right 0.3s ease; /* wie App – sanftes Sidebar-Toggle */
    position: relative;
    /* z-index entfernt - verhindert, dass Header sichtbar bleibt */
}

/* Main Content Scrollbar - KOMPLETT ENTFERNT */
.lounge-main::-webkit-scrollbar {
    display: none; /* Scrollbar komplett verstecken */
    width: 0;
    height: 0;
}

.lounge-main {
    -ms-overflow-style: none; /* IE und Edge */
    scrollbar-width: none; /* Firefox */
}

/* Alle Content-Container - z-index entfernt, damit Header sichtbar bleibt */
.lounge-content-section,
.file-browser-list,
.file-browser-content,
.file-item-row,
.file-browser-header,
.playlist-toolbar,
.playlist-browser-header {
    position: relative;
    /* z-index entfernt - verhindert dass Header sichtbar bleibt */
}

/* Wrapper für Lounge-Seite - verhindert Browser-Scrollbar */
.lounge-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden !important; /* Kein Browser-Scrollbar */
    display: flex;
    flex-direction: column;
}

/* Main Content when left sidebar is collapsed */
.lounge-sidebar.collapsed ~ .lounge-main {
    margin-left: 60px !important; /* Space for collapsed sidebar (nur Icons) */
}

/* Main Content wenn Player minimiert ist */
body:has(#lounge-player-bar.minimized) .lounge-main,
body:has(#lounge-player-bar.fully-minimized) .lounge-main {
    padding-bottom: 2rem; /* Normal padding wenn Player minimiert */
}

/* Main Content wenn Player nicht sichtbar ist */
body:not(:has(#lounge-player-bar[style*="display: flex"])) .lounge-main {
    padding-bottom: 2rem; /* Normal padding wenn Player nicht sichtbar */
}

/* Header Bar */
.lounge-header-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 80px !important;
    background: var(--bg-header) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 2rem !important;
    gap: 2rem !important;
    z-index: 99 !important;
    overflow: visible !important;
    isolation: isolate !important; /* Erstellt neuen Stacking Context */
}

/* Header-Right Container muss hohen z-index haben für Dropdown */
.lounge-header-right {
    position: relative !important;
    z-index: 999999 !important;
    overflow: visible !important;
    isolation: isolate !important; /* Erstellt neuen Stacking Context */
}

/* Stelle sicher, dass der Dropdown-Container nicht abgeschnitten wird */
.lounge-user-dropdown {
    position: relative !important;
    z-index: 10001 !important;
    overflow: visible !important;
}

.lounge-header-left {
    display: flex !important;
    align-items: center !important;
    min-width: 200px !important;
    padding-left: 0 !important;
    flex-shrink: 0 !important;
    order: 1 !important;
}

.lounge-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.lounge-logo-link:hover {
    transform: scale(1.05);
}

.lounge-header-logo {
    width: 400px;
    height: 60px;
    object-fit: contain;
}

.lounge-header-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.lounge-header-center {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    max-width: 600px !important;
    order: 2 !important;
}

.lounge-search {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.lounge-search input {
    width: 100%;
    padding: 0.75rem 3.5rem 0.75rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.lounge-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 51, 102, 0.05);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

.lounge-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
    pointer-events: none;
}

.lounge-search-advanced-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    z-index: 1;
}

.lounge-search-advanced-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    color: var(--primary-color);
}

.lounge-header-right {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    min-width: 200px !important;
    justify-content: flex-end !important;
    order: 3 !important;
}

.lounge-notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lounge-notification-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

.lounge-user-dropdown {
    position: relative !important;
    z-index: 10000 !important;
}

.lounge-user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.lounge-user-menu-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    color: var(--primary-color);
}

.lounge-user-label {
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    color: var(--text-primary) !important;
}

.lounge-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    overflow: hidden;
}

.lounge-user-menu-btn .fa-chevron-down {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.lounge-user-menu-btn[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.lounge-user-dropdown-menu {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 0 !important;
    min-width: 280px !important;
    margin-top: 0.5rem !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    z-index: 999999 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    overflow: visible !important;
    isolation: isolate !important; /* Erstellt neuen Stacking Context über allem */
    /* Standard: versteckt - nur mit .show sichtbar */
}

/* Dropdown Container muss auch hohen z-index haben */
.lounge-user-dropdown {
    position: relative !important;
    z-index: 999999 !important;
    isolation: isolate !important; /* Erstellt neuen Stacking Context */
}

/* Stelle sicher, dass das Dropdown-Menü über allem liegt wenn geöffnet */
.lounge-user-dropdown .dropdown-menu.show,
.lounge-user-dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
    overflow: visible !important;
    position: absolute !important;
    isolation: isolate !important; /* Erstellt neuen Stacking Context über allem */
}

.lounge-user-dropdown-menu.show .dropdown-item,
.lounge-user-dropdown-menu.show li {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 100000 !important;
}

.lounge-user-dropdown-menu.show .dropdown-item {
    color: var(--text-primary) !important;
    pointer-events: auto !important;
}

.lounge-dropdown-header {
    padding: 1.5rem 1rem 1rem 1rem !important;
    text-align: center !important;
    border-bottom: 1px solid var(--border-color) !important;
    background-color: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.lounge-dropdown-avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.lounge-user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.lounge-dropdown-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.5rem;
}

.lounge-user-dropdown-menu .dropdown-item {
    color: var(--text-primary) !important;
    background-color: transparent !important;
    padding: 0.75rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none !important;
    position: relative !important;
    z-index: 100000 !important;
    pointer-events: auto !important;
}

.lounge-user-dropdown-menu .dropdown-item:link,
.lounge-user-dropdown-menu .dropdown-item:visited {
    color: var(--text-primary) !important;
}

.lounge-user-dropdown-menu .dropdown-item:active {
    color: var(--primary-color) !important;
}

.lounge-user-dropdown-menu .dropdown-item:hover {
    background: rgba(255, 51, 102, 0.1) !important;
    background-color: rgba(255, 51, 102, 0.1) !important;
    color: var(--primary-color) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.lounge-user-dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.lounge-user-dropdown-menu .dropdown-divider {
    border-color: var(--border-color) !important;
    margin: 0.5rem 0 !important;
}

/* Featured Content */
.lounge-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.lounge-featured-card {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), rgba(255, 107, 53, 0.2));
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.lounge-featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.3), transparent);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.lounge-featured-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.lounge-featured-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.lounge-featured-artwork {
    width: 100%;
    height: 200px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 3rem;
}

.lounge-featured-large {
    grid-column: span 2;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    min-height: 300px;
}

.lounge-featured-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lounge-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 2rem;
    color: white;
}

.lounge-featured-overlay h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.lounge-featured-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

/* Content Sections */
.lounge-content-section {
    margin-bottom: 3rem;
    /* Container für Stats und File-Browser */
    display: flex;
    flex-direction: column;
    /* Kein max-height - alle Inhalte sollen sichtbar sein */
    /* Scrollbar wird durch Browser-Scrolling gehandhabt */
    overflow: visible; /* Kein overflow - Browser-Scrolling */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Scrollbar-Styling entfernt - Browser-Scrolling verwenden */

.lounge-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.lounge-section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lounge-section-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.lounge-section-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

/* Tabs */
/* Announcements Banner */
.lounge-announcements-container {
    margin-left: 280px;
    margin-right: 80px;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 50;
}

.lounge-announcement {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lounge-announcement.info {
    background: linear-gradient(135deg, rgba(0, 255, 153, 0.15) 0%, rgba(0, 255, 153, 0.1) 100%);
    border: 1px solid rgba(0, 255, 153, 0.3);
    color: #00ff99;
}

.lounge-announcement.warning {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%);
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: #ffa500;
}

.lounge-announcement.error {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.15) 0%, rgba(255, 51, 102, 0.1) 100%);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: #ff3366;
}

.lounge-announcement-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lounge-announcement-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.lounge-announcement-message {
    flex: 1;
    line-height: 1.5;
}

.lounge-announcement-close {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.lounge-announcement-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Bild-Banner Styling */
.lounge-announcement-image {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lounge-announcement-image-wrapper {
    width: 100%;
    height: 200px; /* Feste Höhe */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    overflow: hidden;
}

.lounge-announcement-banner-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* Zeigt gesamtes Bild, behält Proportionen */
    object-position: center;
}

.lounge-announcement-image .lounge-announcement-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: #ffffff;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.lounge-announcement-image .lounge-announcement-close:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* ============================================
   Feedback Modal (Website)
   ============================================ */

.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feedback-modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.feedback-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.feedback-modal-content {
    position: relative;
    background: var(--bg-primary, #1a1a1a);
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color, #333);
}

.feedback-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.feedback-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary, #999);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.feedback-modal-close:hover {
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
}

.feedback-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    /* Scrollbar-Styling: dark und thin wie auf der Website */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255, 51, 102, 0.3) transparent; /* Firefox */
}

/* Chrome/Safari Scrollbar Styling - dark und thin */
.feedback-modal-body::-webkit-scrollbar {
    width: 8px;
}

.feedback-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.feedback-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 51, 102, 0.3);
    border-radius: 4px;
}

.feedback-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 51, 102, 0.5);
}

.feedback-modal-description {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary, #ccc);
    line-height: 1.6;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feedback-questions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feedback-question {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feedback-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary, #fff);
    margin-bottom: 0.25rem;
}

.feedback-required {
    color: #ff3366;
}

.feedback-input,
.feedback-textarea,
.feedback-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #2a2a2a);
    border: 1px solid var(--border-color, #333);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.feedback-input:focus,
.feedback-textarea:focus,
.feedback-select:focus {
    outline: none;
    border-color: var(--primary-color, #00ff99);
    box-shadow: 0 0 0 3px rgba(0, 255, 153, 0.1);
}

.feedback-textarea {
    resize: vertical;
    min-height: 100px;
}

.feedback-radio-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.feedback-radio-group input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.feedback-radio-group label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.feedback-message-group {
    margin-top: 1rem;
}

.feedback-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #333);
}

.feedback-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-btn-primary {
    background: var(--primary-color, #00ff99);
    color: #000;
}

.feedback-btn-primary:hover {
    background: #00cc7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 153, 0.3);
}

.feedback-btn-secondary {
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
    border: 1px solid var(--border-color, #333);
}

.feedback-btn-secondary:hover {
    background: var(--bg-tertiary, #3a3a3a);
}

/* ============================================
   Feedback Success/Error Modals
   ============================================ */

.feedback-success-modal,
.feedback-error-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feedback-success-modal.show,
.feedback-error-modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.feedback-success-backdrop,
.feedback-error-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.feedback-success-content,
.feedback-error-content {
    position: relative;
    background: var(--bg-primary, #1a1a1a);
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

.feedback-success-icon,
.feedback-error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.feedback-success-icon {
    color: #00ff99;
}

.feedback-error-icon {
    color: #ff3366;
}

.feedback-success-title,
.feedback-error-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.feedback-success-message,
.feedback-error-message {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary, #ccc);
    line-height: 1.6;
}

/* Mobile Responsive für Announcements */
@media (max-width: 768px) {
    .lounge-announcements-container {
        margin-left: 0;
        margin-right: 60px;
        padding: 0 1rem;
    }
}

/* Statistics Cards Grid */
.lounge-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0; /* Kein Abstand - Header kommt direkt darunter */
    padding-bottom: 0.5rem; /* Minimaler Padding für visuellen Abstand */
    /* Nicht sticky - scrollt normal mit */
    /* FIX: Sicherstellen dass Grid sich an Container anpasst */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.lounge-stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 51, 102, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    max-height: 48px;
}

.lounge-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), rgba(255, 51, 102, 0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lounge-stat-card:hover {
    border-color: rgba(255, 51, 102, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.15);
}

.lounge-stat-card:hover::before {
    opacity: 1;
}

.lounge-stat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 0;
}

.lounge-stat-icon {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.lounge-stat-icon.server-status {
    background: linear-gradient(135deg, rgba(0, 255, 153, 0.2), rgba(0, 255, 153, 0.1));
    color: #00ff99;
}

.lounge-stat-icon.collection {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(255, 51, 102, 0.1));
    color: var(--primary-color);
}

.lounge-stat-icon.traffic {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
    color: #00d4ff;
}

.lounge-stat-icon.tracks-today {
    background: linear-gradient(135deg, rgba(0, 255, 153, 0.2), rgba(0, 255, 153, 0.1));
    color: #00ff99;
}

.lounge-stat-title {
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
}

.lounge-stat-title h3 {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lounge-stat-subtitle {
    font-size: 0.55rem;
    color: var(--text-tertiary);
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lounge-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-width: 0;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
}

.lounge-stat-value {
    font-size: 0.55rem !important;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Spezifische Regeln für Collection und New Tracks */
#collection-size-value,
#tracks-today-value {
    font-size: 0.55rem !important;
    font-weight: 600;
}

.lounge-stat-value span {
    font-size: 0.55rem;
    font-weight: 600;
}

.lounge-stat-value .status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.status-indicator.online {
    background: #00ff99;
    box-shadow: 0 0 8px rgba(0, 255, 153, 0.5);
}

.status-indicator.offline {
    background: #ff3366;
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

.status-indicator.checking {
    background: #ffa500;
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.5);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.lounge-stat-progress {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
    align-items: flex-end;
    overflow: hidden;
}

.lounge-stat-progress-bar {
    width: 100%;
    max-width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.lounge-stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), rgba(255, 51, 102, 0.7));
    border-radius: 2px;
    transition: width 0.5s ease;
    position: relative;
}

.lounge-stat-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.lounge-stat-progress-fill.warning {
    background: linear-gradient(90deg, #ffa500, rgba(255, 165, 0, 0.7));
}

.lounge-stat-progress-fill.danger {
    background: linear-gradient(90deg, #ff3366, rgba(255, 51, 102, 0.7));
}

.lounge-stat-progress-text {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lounge-stat-meta {
    font-size: 0.6rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.15rem;
    line-height: 1;
    white-space: nowrap;
}

/* Spezielle Anpassung für Traffic-Anzeige */
#user-traffic-value {
    font-size: 0.55rem !important;
    font-weight: 700;
}

#user-traffic-meta {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.2rem !important;
    margin-top: 0.3rem !important;
}

#user-traffic-used,
#user-traffic-limit {
    font-size: 0.55rem !important;
    line-height: 1.2;
}

/* Mobile Responsive für Stats Grid */
@media (max-width: 768px) {
    .lounge-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .lounge-stat-card {
        padding: 0.35rem 0.5rem;
        min-height: 40px;
        max-height: 44px;
        gap: 0.5rem;
    }

    .lounge-stat-value {
        font-size: 0.5rem;
    }

    .lounge-stat-value span {
        font-size: 0.5rem;
    }

    .lounge-stat-icon {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .lounge-stat-title h3 {
        font-size: 0.6rem;
    }

    .lounge-stat-subtitle {
        font-size: 0.5rem;
    }

    .lounge-stat-progress-text,
    .lounge-stat-meta {
        font-size: 0.55rem;
    }

    .lounge-stat-value .status-indicator {
        width: 5px;
        height: 5px;
    }
}

/* Mobile Responsive für Stats Grid */
@media (max-width: 768px) {
    .lounge-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .lounge-stat-card {
        padding: 1.25rem;
    }

    .lounge-stat-value {
        font-size: 0.7rem;
    }
}

/* Playlist Grid */
.lounge-playlists-grid,
.lounge-playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 1.5rem;
    padding: 1rem 2rem;
    justify-content: start;
    width: 100%;
    box-sizing: border-box;
}

.lounge-playlist-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    width: 100%;
    min-width: 0; /* Wichtig für Grid-Layout */
    cursor: pointer;
}

.lounge-playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 51, 102, 0.3);
    border-color: var(--primary-color);
}

.lounge-playlist-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lounge-playlist-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.lounge-playlist-card-cover {
    position: relative;
    overflow: hidden;
}

.lounge-playlist-card-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

.lounge-playlist-card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lounge-playlist-card-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lounge-playlist-card-genres {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.lounge-playlist-card-genres .genre-badge {
    background: rgba(255, 51, 102, 0.15);
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(255, 51, 102, 0.2);
    transition: all 0.2s ease;
}

.lounge-playlist-card-genres .genre-badge:hover {
    background: rgba(255, 51, 102, 0.25);
    border-color: rgba(255, 51, 102, 0.4);
    transform: translateY(-1px);
}

.playlist-toolbar-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.playlist-toolbar-text {
    flex: 1;
}

.playlist-toolbar-genres {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.genre-badge {
    background: rgba(255, 51, 102, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.playlist-description-container {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.playlist-description-container #playlist-description-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.lounge-playlist-card-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.lounge-playlist-card-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.lounge-playlist-card-stat i {
    color: var(--primary-color);
}

.lounge-playlist-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}

.lounge-section-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
}

/* Playlist Card Buttons - verwenden btn-action Style */
.lounge-playlist-card-actions .btn-action {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
}

.btn-playlist-open {
    color: var(--primary-color);
    border-color: rgba(255, 51, 102, 0.3);
}

.btn-playlist-open:hover:not(:disabled) {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.btn-playlist-edit {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-playlist-edit:hover:not(:disabled) {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.btn-playlist-delete {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-playlist-delete:hover:not(:disabled) {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.lounge-playlist-artwork {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
}

.lounge-playlist-artwork::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lounge-playlist-card:hover .lounge-playlist-artwork::after {
    opacity: 1;
}

.lounge-playlist-info {
    padding: 1rem;
}

.lounge-playlist-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.lounge-playlist-meta {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Statistics Cards */
.lounge-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Diese Regeln wurden entfernt, da sie die Lounge-Stats überschrieben haben */
/* Die korrekten Regeln für Lounge-Stats sind weiter oben definiert */

.lounge-stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Artists List */
.lounge-artists-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lounge-artist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.lounge-artist-item:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
}

.lounge-artist-number {
    font-weight: 700;
    color: var(--text-tertiary);
    width: 24px;
    font-size: 1.125rem;
}

.lounge-artist-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin-right: 1rem;
    flex-shrink: 0;
}

.lounge-artist-info {
    flex: 1;
}

.lounge-artist-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.lounge-artist-subscribers {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Bottom Player Bar - Mit kleinem Abstand links, geht auch unter Sidebar */
.lounge-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px; /* Kompakte Höhe wie im Referenzbild */
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0.75rem 2rem;
    padding-left: 1rem !important; /* Kleiner Abstand links */
    padding-right: 2rem;
    gap: 1.5rem;
    z-index: 1000; /* Über der Sidebar (z-index: 100) */
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

/* Track Info mit kleinem Abstand links */
.lounge-player-bar .lounge-player-track {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Player minimiert - komplett versteckt */
/* Player minimiert - komplett versteckt */
.lounge-player-bar.minimized,
.lounge-player-bar.fully-minimized {
    transform: translateY(100%);
}

.lounge-player-minimize-btn {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1001;
}

.lounge-player-minimize-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

.lounge-player-track {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
    max-width: 450px; /* Mehr Platz für Tracknamen */
    flex: 0 0 auto; /* Feste Breite, nimmt keinen zusätzlichen Platz */
    flex-shrink: 0;
    order: 1; /* Ganz links */
    margin-left: 0 !important;
    padding-left: 0 !important;
    justify-content: flex-start !important;
}

.lounge-player-artwork {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background-image: var(--splash-logo-image, url('../assets/logo.png'));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.lounge-player-artwork i {
    display: none; /* Verstecke Icon, zeige nur Logo */
}

.lounge-player-info {
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.lounge-player-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: visible;
    line-height: 1.3;
    position: relative;
    display: inline-block;
    width: auto;
    max-width: 100%;
}

/* Scroll-Animation für lange Tracknamen - Marquee-Effekt */
.lounge-player-title.scrolling {
    animation: scroll-text-marquee 12s linear infinite;
    padding-right: 2rem;
    display: inline-block;
}

@keyframes scroll-text-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% + 100%));
    }
}

/* Fade-Effekt am Ende für lange Texte */
.lounge-player-info::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.lounge-player-info:has(.lounge-player-title.scrolling)::after {
    opacity: 1;
}

/* Wenn Text zu lang ist, zeige Scroll-Animation */
.lounge-player-title:has-text-overflow {
    animation: scroll-text 10s linear infinite;
    padding-right: 2rem;
}

/* Alternative: Marquee-Effekt für lange Texte */
.lounge-player-title-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.lounge-player-title-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
}

.lounge-player-artist {
    color: var(--text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ============================================
   File Browser - MELO-Inspired Design
   ============================================ */

/* Toolbar - Wird jetzt im Browser integriert */
.lounge-toolbar {
    display: none; /* Versteckt, da jetzt im Browser integriert */
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-right .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-right .btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
}

.toolbar-right .btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.4);
}

.toolbar-right .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

.view-toggle-buttons {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

.view-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 12px rgba(255, 51, 102, 0.4);
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

.breadcrumb-item i {
    font-size: 0.75rem;
}

/* File Browser - Spaltenansicht (wie MELO) */
.file-browser-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-y: auto; /* Scrollbar für File-Browser - damit sticky funktioniert */
    overflow-x: hidden !important; /* FIX: Kein horizontaler Scroll - Inhalt passt sich an */
    position: relative;
    max-height: calc(100vh - 80px - 90px - 60px); /* Viewport minus Header (80px), Player (90px), Stats (~60px) */
    margin-top: 0; /* Kein Margin oben - kommt direkt nach Stats */
    padding-top: 0; /* Kein Padding oben - Header kommt direkt */
    /* Wichtig: Container muss scrollbar sein, damit sticky funktioniert */
    /* Native Browser-Scrollbar verwenden (sieht aus wie Browser-Scrolling) */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255, 51, 102, 0.3) transparent; /* Firefox */
    /* FIX: Breite muss sich an verfügbaren Platz anpassen */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important; /* Erlaubt Schrumpfen unter natürliche Größe */
    contain: layout !important; /* FIX: Isoliert Layout-Änderungen */
}

/* Chrome/Safari Scrollbar Styling - native aussehen */
/* File Browser List Scrollbar - KOMPLETT ENTFERNT */
.file-browser-list::-webkit-scrollbar {
    display: none; /* Scrollbar komplett verstecken */
    width: 0;
    height: 0;
}

.file-browser-list {
    -ms-overflow-style: none; /* IE und Edge */
    scrollbar-width: none; /* Firefox */
}

/* Verhindere doppelte Scrollbars - nur File-Browser-List scrollt */
.lounge-content-section {
    overflow: visible; /* Kein Scrollen auf Section-Ebene */
    max-height: none; /* Keine Höhenbegrenzung */
}

/* Breadcrumb Navigation Zeile - Sticky am oberen Rand des File-Browser-Containers */
.file-browser-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    gap: 1rem;
    position: -webkit-sticky; /* Safari Support */
    position: sticky;
    top: 0; /* Am oberen Rand des scrollenden Containers */
    z-index: 10; /* Über dem Header */
    /* FIX: Breite muss sich an Container anpassen */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(18, 18, 23, 0.95);
    border-bottom: 1px solid rgba(255, 51, 102, 0.2);
    margin: 0;
    flex-shrink: 0; /* Verhindert Schrumpfen */
    width: 100%;
    box-sizing: border-box;
}

/* WICHTIG: Breadcrumb-Bars standardmäßig verstecken (OHNE !important, damit JavaScript sie anzeigen kann) */
#file-browser-breadcrumb:not([style*="display: flex"]):not([style*="display:flex"]),
#file-browser-breadcrumb-root:not([style*="display: flex"]):not([style*="display:flex"]) {
    display: none;
}

/* WICHTIG: Chart-Filter-Bar standardmäßig verstecken */
#chart-filter-bar:not([style*="display: flex"]):not([style*="display:flex"]) {
    display: none;
}

/* Padding für Content wenn Breadcrumb sichtbar ist - nicht mehr benötigt */
.file-browser-list.has-breadcrumb {
    padding-top: 0; /* Kein Padding mehr, da sticky innerhalb des Containers */
}

.breadcrumb-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.breadcrumb-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin: 0 1rem;
}

.breadcrumb-filters .browser-filter {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    width: auto !important;
    flex-shrink: 0 !important;
    min-width: 120px !important;
}

.breadcrumb-filters .browser-filter:focus {
    background: var(--bg-secondary) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 51, 102, 0.25) !important;
    outline: none !important;
}

.breadcrumb-filters .browser-filter:hover {
    border-color: rgba(255, 51, 102, 0.5) !important;
}

.breadcrumb-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.breadcrumb-selection-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.btn-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.btn-action:active:not(:disabled) {
    transform: translateY(0);
}

/* Download Tracks Button - Grün */
.btn-download-tracks {
    color: #00ff99;
    border-color: rgba(0, 255, 153, 0.3);
}

.btn-download-tracks:not(:disabled) {
    opacity: 1;
}

.btn-download-tracks:hover:not(:disabled) {
    background: rgba(0, 255, 153, 0.1);
    border-color: #00ff99;
    color: #00ff99;
    box-shadow: 0 4px 12px rgba(0, 255, 153, 0.3);
}

/* Add to Playlist Button - Purple */
.btn-add-to-playlist {
    color: var(--secondary-color, #9d4edd) !important;
    border-color: rgba(157, 78, 221, 0.3) !important;
}

.btn-add-to-playlist:not(:disabled) {
    opacity: 1;
}

.btn-add-to-playlist:hover:not(:disabled) {
    background: rgba(157, 78, 221, 0.1) !important;
    border-color: var(--secondary-color, #9d4edd) !important;
    color: var(--secondary-color, #9d4edd) !important;
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.3) !important;
}

/* Download Folders Button - Blau (ZIP Icon) */
.btn-download-folders {
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.3);
}

.btn-download-folders:not(:disabled) {
    opacity: 1;
}

.btn-download-folders:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.breadcrumb-back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.breadcrumb-back-link:hover {
    background: rgba(255, 51, 102, 0.1);
    color: var(--primary-color);
}

.breadcrumb-back-link i {
    font-size: 0.75rem;
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.breadcrumb-path-item {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-path-item:hover {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.1);
}

.breadcrumb-path-separator {
    color: var(--text-tertiary);
    margin: 0 0.25rem;
    flex-shrink: 0;
}

.file-browser-header {
    display: grid !important; /* IMMER sichtbar, auch beim Navigieren */
    /* grid-template-columns wird dynamisch per :has() gesetzt */
    grid-auto-flow: column !important; /* WICHTIG: Elemente werden in Spalten angeordnet */
    gap: 1rem; /* MUSS mit .file-item-row gap übereinstimmen */
    padding: 1rem 1.25rem; /* MUSS mit .file-item-row padding übereinstimmen */
    background: rgba(255, 51, 102, 0.08);
    border-bottom: 1px solid rgba(255, 51, 102, 0.2);
    font-weight: 600;
    font-size: 0.8125rem; /* Etwas größer für bessere Lesbarkeit */
    text-transform: uppercase;
    letter-spacing: 0.75px; /* Etwas mehr Abstand */
    color: var(--text-primary);
    align-items: center !important; /* WICHTIG: Alle Elemente auf gleicher Höhe */
    height: auto !important; /* Automatische Höhe */
    min-height: auto !important;
    max-height: none !important;
    flex-shrink: 0; /* Verhindert Schrumpfen */
    position: -webkit-sticky; /* Safari Support */
    position: sticky !important; /* IMMER sticky */
    top: 0; /* Standard: am oberen Rand */
    z-index: 999 !important; /* FIX: Höher als rechte Sidebar (998) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-top: 0 !important; /* Kein Margin oben - kommt direkt nach Stats */
    margin-bottom: 0; /* Kein Margin unten */
    margin-left: 0 !important; /* Kein Margin links */
    margin-right: 0 !important; /* Kein Margin rechts */
    /* FIX: Breite und Box-Sizing GENAU wie .file-item-row */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    border-radius: 12px 12px 0 0; /* Abgerundete obere Ecken für besseren Übergang */
    visibility: visible !important; /* IMMER sichtbar */
    opacity: 1 !important; /* IMMER sichtbar */
}

/* Browser-Tab: Padding = Rows (1rem 1.25rem), nur rechts 62px für Scrollbar – Alignment mit Spalten */
#file-browser-header {
    gap: 1rem !important;
    padding: 1rem 1.25rem !important; /* wie Rows */
    padding-right: 62px !important;   /* Scrollbar-Kompensation */
}

/* Header für Ordner-Ansicht (Name + Actions) - Standard */
.file-browser-header:has(#header-name:not([style*="display: none"])):not(:has(#header-title-combined:not([style*="display: none"]))) {
    /* FIX: Flexiblere Werte für bessere Anpassung */
    grid-template-columns:
        minmax(30px, 40px)        /* Checkbox - kann schrumpfen */
        minmax(40px, 60px)        /* Icon - kann schrumpfen */
        minmax(120px, 2fr)        /* Name - min 120px */
        minmax(100px, 150px) !important; /* Actions - kann schrumpfen */
}

/* Explizite Positionierung für Ordner-Ansicht */
.file-browser-header:has(#header-name:not([style*="display: none"])):not(:has(#header-title-combined:not([style*="display: none"]))) {
    align-items: center !important; /* WICHTIG: Alle Elemente auf gleicher Höhe */
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
}
.file-browser-header:has(#header-name:not([style*="display: none"])):not(:has(#header-title-combined:not([style*="display: none"]))) .file-col-checkbox {
    grid-column: 1 / 2 !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    font-size: 0.8125rem !important; /* MUSS mit Header font-size übereinstimmen */
    font-weight: 600 !important; /* MUSS mit Header font-weight übereinstimmen */
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}
.file-browser-header:has(#header-name:not([style*="display: none"])):not(:has(#header-title-combined:not([style*="display: none"]))) .file-col-icon {
    grid-column: 2 / 3 !important;
    align-self: center !important;
}
.file-browser-header:has(#header-name:not([style*="display: none"])):not(:has(#header-title-combined:not([style*="display: none"]))) #header-name {
    grid-column: 3 / 4 !important;
    display: flex !important; /* Flexbox für bessere Ausrichtung */
    align-items: center !important; /* Vertikal zentrieren */
    visibility: visible !important;
    position: static !important;
    align-self: center !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    line-height: 1 !important;
    font-size: 0.8125rem !important; /* MUSS mit Header font-size übereinstimmen */
    font-weight: 600 !important; /* MUSS mit Header font-weight übereinstimmen */
    padding: 0 !important;
    margin: 0 !important;
}
.file-browser-header:has(#header-name:not([style*="display: none"])):not(:has(#header-title-combined:not([style*="display: none"]))) #header-actions {
    grid-column: 4 / 5 !important;
    align-self: center !important;
    display: flex !important; /* Flexbox für bessere Ausrichtung */
    align-items: center !important; /* Vertikal zentrieren */
    font-size: 0.8125rem !important; /* MUSS mit Header font-size übereinstimmen */
    font-weight: 600 !important; /* MUSS mit Header font-weight übereinstimmen */
    line-height: 1 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Header für Track-Ansicht (alle Spalten) - neue Struktur basierend auf Screenshot */
/* WICHTIG: Grid hat 8 Spalten wie Rows - Name wird komplett übersprungen */
/* Struktur: Checkbox(40px), Icon(60px), Title-combined(3fr), BPM(80px), KEY(80px), GENRE(150px), Energy(120px), Actions(auto) */
/* WICHTIG: MUSS EXAKT mit .file-item-row:has(.file-col-title-combined) übereinstimmen */
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) {
    /* FIX: Angepasst an flexible Row-Columns */
    grid-template-columns:
        minmax(30px, 40px)        /* Checkbox - kann schrumpfen */
        minmax(40px, 60px)        /* Icon - kann schrumpfen */
        minmax(120px, 3fr)        /* Title - min 120px */
        minmax(50px, 80px)        /* BPM - kann schrumpfen */
        minmax(50px, 80px)        /* KEY - kann schrumpfen */
        minmax(80px, 150px)       /* GENRE - kann schrumpfen */
        minmax(80px, 120px)       /* Energy - kann schrumpfen */
        minmax(80px, auto) !important; /* Actions - min 80px */
    /* 8 Spalten: Checkbox, Icon, Title-combined, BPM, KEY, GENRE, Energy, Actions */
    gap: 1rem !important; /* MUSS mit .file-item-row gap übereinstimmen */
    padding: 1rem 1.25rem !important; /* MUSS mit .file-item-row padding übereinstimmen */
}

/* Name wird komplett übersprungen - nicht im Grid (BLEIBT IM HTML!) */
/* WICHTIG: Name muss komplett aus Grid-Flow entfernt werden */
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) #header-name {
    /* KRITISCH: position: absolute MUSS VOR display: none kommen, um Element aus Grid-Flow zu entfernen! */
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    /* Grid-Eigenschaften NICHT auf 'none' setzen - das ist ungültig! */
}

/* Explizite Positionierung ALLER Header-Spalten wenn Title-combined sichtbar ist */
/* WICHTIG: JavaScript setzt inline-Styles, aber CSS-Regeln als Fallback */
/* WICHTIG: Diese Regeln werden von inline-Styles überschrieben, sind aber als Fallback wichtig */
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) .file-col-checkbox {
    grid-column: 1 / 2 !important;
}
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) .file-col-icon {
    grid-column: 2 / 3 !important;
}
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) #header-title-combined {
    grid-column: 3 / 4 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) #header-bpm {
    grid-column: 4 / 5 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) #header-key {
    grid-column: 5 / 6 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) #header-genre {
    grid-column: 6 / 7 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) #header-energy {
    grid-column: 7 / 8 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.file-browser-header:has(#header-title-combined:not([style*="display: none"])) #header-actions {
    grid-column: 8 / 9 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Versteckte Name-Spalte nimmt keinen Platz ein - komplett aus Grid entfernen */
/* WICHTIG: Diese Regel muss ALLE anderen Regeln überschreiben */
.file-browser-header #header-name[style*="display: none"],
.file-browser-header #header-name[style*="display:none"] {
    /* KRITISCH: position: absolute MUSS VOR display: none kommen! */
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    /* Grid-Eigenschaften NICHT auf 'none' setzen - das ist ungültig! */
    overflow: hidden !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    z-index: -1 !important;
    /* WICHTIG: Stelle sicher dass es wirklich keinen Platz im Grid einnimmt */
    order: 9999 !important; /* Ans Ende verschieben */
}

/* Wenn Name versteckt ist, Grid-Struktur ohne Name-Spalte = 8 Spalten wie Rows */
.file-browser-header:has(#header-name[style*="display: none"]):has(#header-title-combined:not([style*="display: none"])) {
    /* FIX: Verwende flexible minmax() Werte EXAKT wie Rows */
    grid-template-columns:
        minmax(30px, 40px)        /* Checkbox - kann schrumpfen */
        minmax(40px, 60px)        /* Icon - kann schrumpfen */
        minmax(120px, 3fr)        /* Title - min 120px */
        minmax(50px, 80px)        /* BPM - kann schrumpfen */
        minmax(50px, 80px)        /* KEY - kann schrumpfen */
        minmax(80px, 150px)       /* GENRE - kann schrumpfen */
        minmax(80px, 120px)       /* Energy - kann schrumpfen */
        minmax(80px, auto) !important; /* Actions - min 80px */
}

/* Wenn Breadcrumb sichtbar ist, Header darunter positionieren */
.file-browser-list:has(.file-browser-breadcrumb[style*="display: block"]) .file-browser-header,
.file-browser-list:has(.file-browser-breadcrumb:not([style*="display: none"])) .file-browser-header,
.file-browser-list:has(.file-browser-breadcrumb-root[style*="display: flex"]) .file-browser-header,
.file-browser-list:has(.file-browser-breadcrumb-root:not([style*="display: none"])) .file-browser-header {
    top: 48px !important; /* Höhe der Breadcrumb (ca. 48px) */
}

/* WICHTIG: Wenn Breadcrumb versteckt ist (display: none), Header direkt oben (top: 0) - keine Lücke! */
.file-browser-list:has(.file-browser-breadcrumb[style*="display: none"]) .file-browser-header,
.file-browser-list:has(.file-browser-breadcrumb-root[style*="display: none"]) .file-browser-header {
    top: 0 !important; /* Keine Lücke wenn Breadcrumb versteckt */
    margin-top: 0 !important;
}

/* Fallback für Browser ohne :has() Support - wird per JavaScript gesetzt */
.file-browser-list.has-breadcrumb .file-browser-header {
    top: 48px !important; /* Höhe der Breadcrumb */
}

/* Fallback: Wenn Breadcrumb versteckt ist, Header direkt oben */
.file-browser-list:not(.has-breadcrumb) .file-browser-header {
    top: 0 !important; /* Keine Lücke wenn kein Breadcrumb */
    margin-top: 0 !important;
}

/* Header für Crates und Matched Tracks - neue Struktur (ohne Name-Spalte), Padding wie App */
#crates-browser-header,
#matched-tracks-browser-header {
    /* FIX: Verwende flexible minmax() Werte EXAKT wie Rows */
    grid-template-columns:
        minmax(30px, 40px)        /* Checkbox - kann schrumpfen */
        minmax(40px, 60px)        /* Icon - kann schrumpfen */
        minmax(120px, 3fr)        /* Title - min 120px */
        minmax(50px, 80px)        /* BPM - kann schrumpfen */
        minmax(50px, 80px)        /* KEY - kann schrumpfen */
        minmax(80px, 150px)       /* GENRE - kann schrumpfen */
        minmax(80px, 120px)       /* Energy - kann schrumpfen */
        minmax(120px, auto);      /* Actions - min 120px (5 Buttons brauchen mehr Platz) */
    gap: 1rem !important;
    padding: 1rem 1.25rem !important; /* My Crates: Alignment ohne Scrollbar-Kompensation */
}

/* Nur Smart Track Matches: 62px rechts für Scrollbar-Kompensation (My Crates bleibt bei 1rem 1.25rem) */
#matched-tracks-browser-header {
    padding: 1rem 62px 1rem 1.25rem !important;
}

/* Checkbox padding wie Row – Spaltenalignment in allen Tabs (Browser, Charts, My Crates, Smart Tracks) */
#file-browser-header .file-col-checkbox,
#crates-browser-header .file-col-checkbox,
#matched-tracks-browser-header .file-col-checkbox {
    padding-right: 10px !important;
}

#matched-tracks-browser-header .file-col-actions,
#crates-browser-header .file-col-actions {
    padding-right: 30px; /* wie App – Actions-Spalte Alignment */
}

/* Header für Playlist - KEINE Checkbox-Spalte, nur Nummer (neue Struktur) */
#playlist-browser-header.file-browser-header {
    grid-template-columns: 50px 60px minmax(200px, 3fr) 80px 80px 150px 120px minmax(120px, auto) !important; /* Nummer, Icon, Title (kombiniert), BPM, KEY, GENRE (fest), Energy, Actions */
    /* WICHTIG: Title minmax(200px, 3fr) und Actions minmax(120px, auto) für bessere Anzeige */
}

/* Header Grid-Template-Columns wird per JavaScript gesetzt - keine CSS-Regeln mehr */

.file-browser-content {
    display: flex;
    flex-direction: column;
    overflow: visible; /* Kein overflow - Container scrollt */
    flex: 1; /* Nimmt verbleibenden Platz ein */
    padding-top: 0; /* Kein Padding - Header ist sticky */
    position: relative; /* Für z-index Stacking */
    z-index: 1; /* Unter Header und Breadcrumb */
    /* FIX: Breite muss sich an Container anpassen */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.file-item-row {
    display: grid;
    /* WICHTIG: Grid muss GENAU mit Header übereinstimmen = 8 Spalten (ohne Name) */
    /* FIX: Kleinere min-Werte für bessere Anpassung an enge Räume */
    grid-template-columns:
        minmax(30px, 40px)        /* Checkbox - kann schrumpfen */
        minmax(40px, 60px)        /* Icon - kann schrumpfen */
        minmax(120px, 3fr)        /* Title - min 120px */
        minmax(50px, 80px)        /* BPM - kann schrumpfen */
        minmax(50px, 80px)        /* KEY - kann schrumpfen */
        minmax(80px, 150px)       /* GENRE - kann schrumpfen */
        minmax(80px, 120px)       /* Energy - kann schrumpfen */
        minmax(80px, auto);       /* Actions - min 80px */
    gap: 1rem;
    padding: 1rem 1.25rem; /* MUSS GENAU mit .file-browser-header padding übereinstimmen (1rem 1.25rem, nicht 0.875rem) */
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-card);
    position: relative; /* Für z-index */
    z-index: 1; /* Unter Header und Breadcrumb */
    /* FIX: Breite muss sich an Container anpassen */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important; /* Erlaubt Grid-Schrumpfen */
}

/* Nummer-Spalte für Playlist-Ansicht */
.file-col-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    min-width: 50px;
}

/* Playlist Toolbar */
.playlist-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

.playlist-toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.playlist-toolbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.playlist-toolbar-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.playlist-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Playlist Track Row - Drag & Drop */
.playlist-track-row.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.playlist-track-row.drag-over {
    border-top: 2px solid var(--primary-color);
}

/* File-Item mit Audio-Spalten (wenn MP3) - neue Struktur */
/* WICHTIG: Rows haben 8 Spalten - muss GENAU mit Header übereinstimmen */
/* Struktur: Checkbox(40px), Icon(60px), Title-combined(3fr), BPM(80px), KEY(80px), GENRE(150px), Energy(120px), Actions(auto) */
/* WICHTIG: MUSS EXAKT mit .file-browser-header:has(#header-title-combined:not([style*="display: none"])) übereinstimmen */
.file-item-row:has(.file-col-title-combined) {
    /* FIX: Verwende flexible minmax() Werte EXAKT wie Header */
    /* WICHTIG: KEIN !important bei grid-template-columns, damit JavaScript sie überschreiben kann! */
    grid-template-columns:
        minmax(30px, 40px)        /* Checkbox - kann schrumpfen */
        minmax(40px, 60px)        /* Icon - kann schrumpfen */
        minmax(120px, 3fr)        /* Title - min 120px */
        minmax(50px, 80px)        /* BPM - kann schrumpfen */
        minmax(50px, 80px)        /* KEY - kann schrumpfen */
        minmax(80px, 150px)       /* GENRE - kann schrumpfen */
        minmax(80px, 120px)       /* Energy - kann schrumpfen */
        minmax(80px, auto); /* Actions - min 80px - KEIN !important */
    gap: 1rem !important; /* MUSS mit .file-browser-header gap übereinstimmen */
    padding: 1rem 1.25rem !important; /* MUSS GENAU mit .file-browser-header padding übereinstimmen (1rem 1.25rem, nicht 0.875rem) */
    box-sizing: border-box !important;
    min-width: 0 !important; /* WICHTIG: Erlaubt Grid-Container zu schrumpfen */
    width: 100% !important; /* WICHTIG: Nimmt volle verfügbare Breite ein */
}

/* Smart Track Matches Rows – EXAKT wie #matched-tracks-browser-header (höhere Spezifität, kommt nach .file-item-row:has) */
.file-item-row.matched-track-row {
    grid-template-columns:
        minmax(30px, 40px)
        minmax(40px, 60px)
        minmax(120px, 3fr)
        minmax(50px, 80px)
        minmax(50px, 80px)
        minmax(80px, 150px)
        minmax(80px, 120px)
        minmax(120px, auto); /* Actions: 120px wie Header (5 Buttons) */
    gap: 1rem !important;
    padding: 1rem 1.25rem !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
}

/* File-Item ohne Audio-Spalten (wenn Ordner) - Name zeigen */
.file-item-row:has(.file-col-name:not([style*="display: none"])):not(:has(.file-col-title-combined)) {
    /* FIX: Verwende flexible minmax() Werte EXAKT wie Header */
    grid-template-columns: minmax(30px, 40px) minmax(40px, 60px) minmax(120px, 2fr) minmax(100px, 150px) !important; /* Checkbox, Icon, Name, Actions */
}

.file-item-row:hover {
    background: rgba(255, 51, 102, 0.05);
    border-color: rgba(255, 51, 102, 0.3);
}

.file-item-row.selected {
    background: rgba(255, 51, 102, 0.15);
    border-left: 3px solid var(--primary-color);
}

.file-item-row:last-child {
    border-bottom: none;
}

.file-col-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 10px; /* wie App – muss mit Header-Checkbox identisch sein für Spaltenalignment */
}

/* Header Checkbox - "#" Symbol */
.file-browser-header .file-col-checkbox {
    font-size: 0.8125rem !important; /* Konsistent mit Header-Schriftgröße */
    font-weight: 600 !important; /* Konsistent mit Header font-weight */
    color: var(--text-primary) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.75px !important;
}

.file-col-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-col-name,
.file-col-artist,
.file-col-title {
    color: var(--text-primary);
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    max-width: 100%;
    min-width: 0; /* Wichtig für Grid-Layout */
}

/* WICHTIG: Row-Styling NICHT auf Header anwenden */
.file-browser-header .file-col-name,
.file-browser-header #header-name {
    font-size: 0.8125rem !important; /* Header-Schriftgröße, nicht Row-Schriftgröße */
    font-weight: 600 !important;
    line-height: 1 !important;
}

/* WICHTIG: Header-Name muss Header-Styling haben, nicht Row-Styling */
.file-browser-header #header-name {
    font-size: 0.8125rem !important; /* MUSS mit Header font-size übereinstimmen */
    font-weight: 600 !important; /* MUSS mit Header font-weight übereinstimmen */
    line-height: 1 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    align-self: center !important;
    display: flex !important; /* Flexbox für bessere Ausrichtung */
    align-items: center !important; /* Vertikal zentrieren */
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* Title-Spalte kombiniert: Title + Artist wie im Screenshot */
.file-col-title-combined {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0 !important; /* WICHTIG: Erlaubt Schrumpfen */
    overflow: hidden; /* Verhindert Überlauf */
}

.file-col-title-combined .title-text {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.file-col-title-combined .artist-text {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* CSS-Tooltip für abgeschnittene Texte - Einfach und zuverlässig */
.file-col-name[data-full-text]:hover::after,
.file-col-artist[data-full-text]:hover::after,
.file-col-title[data-full-text]:hover::after {
    content: attr(data-full-text);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Zeige Tooltip nur wenn Text abgeschnitten ist */
.file-col-name.text-truncated[data-full-text]:hover::after,
.file-col-artist.text-truncated[data-full-text]:hover::after,
.file-col-title.text-truncated[data-full-text]:hover::after {
    opacity: 1;
    visibility: visible;
}

.file-col-artist {
    color: var(--text-secondary);
    font-weight: 500;
}

.file-col-title {
    color: var(--text-primary);
    font-weight: 600;
}

.file-col-genre {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    flex-wrap: nowrap; /* Kein Wrapping - Badges bleiben in einer Zeile */
    gap: 0.25rem;
    align-items: center;
    justify-content: center; /* Genre-Badges mittig ausrichten */
    min-width: 0 !important; /* WICHTIG: Erlaubt Schrumpfen */
    min-width: 0;
    overflow: hidden; /* Verhindert, dass Badges die Spalte verlassen */
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0 0.25rem;
}

/* Genre Badges - optional für mehrere Genres */
.genre-badge {
    background: rgba(255, 51, 102, 0.15);
    color: var(--primary-color);
    padding: 0.125rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 1; /* Erlaube Schrumpfen wenn nötig */
    flex-grow: 0; /* Kein Wachstum */
    border: 1px solid rgba(255, 51, 102, 0.3);
    transition: all 0.2s ease;
    max-width: 70px; /* Maximale Breite pro Badge */
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* Erlaube Schrumpfen auf 0 */
}

.genre-badge:hover {
    background: rgba(255, 51, 102, 0.25);
    border-color: var(--primary-color);
}

/* Fallback: Genre als Text (wenn kein Badge) */
.file-col-genre:not(:has(.genre-badge)) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-col-bpm {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0 !important; /* WICHTIG: Erlaubt Schrumpfen */
    white-space: nowrap;
}

.file-col-key {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0 !important; /* WICHTIG: Erlaubt Schrumpfen */
    white-space: nowrap;
}

.file-col-size {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    text-align: right;
}

.file-col-actions {
    display: flex;
    align-items: center;
    gap: 0.125rem; /* Minimaler Abstand zwischen Action-Buttons */
    justify-content: flex-end;
    min-width: 120px !important; /* WICHTIG: Mindestbreite für Actions-Spalte */
    max-width: 100%;
}

.file-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 6px;
    background: rgba(255, 51, 102, 0.1);
    position: relative;
}

/* Cover-Bild für Audio-Dateien - gleiche Größe wie Icon */
.file-item-cover {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    flex-shrink: 0;
}

/* Logo für Audio-Dateien */
.file-item-row[data-type="audio"] .file-item-icon {
    background-image: var(--header-logo-image, url('../assets/logo.png'));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.05);
}

.file-item-row[data-type="audio"] .file-item-icon i {
    display: none; /* Verstecke Icon, zeige nur Logo */
}

.file-item-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.file-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05); /* Leichter Hintergrund für bessere Sichtbarkeit */
    border: 1px solid rgba(255, 255, 255, 0.25); /* Hellere Umrandung für bessere Sichtbarkeit */
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.file-action-btn:hover {
    background: rgba(255, 51, 102, 0.15); /* Etwas hellerer Hintergrund beim Hover */
    border-color: var(--primary-color);
    border-width: 1.5px; /* Etwas dickere Umrandung beim Hover */
    color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

/* Download Button - Grün */
.file-action-btn[data-action="download"] {
    color: #00ff99;
}

.file-action-btn[data-action="download"]:hover {
    background: rgba(0, 255, 153, 0.15); /* Etwas hellerer Hintergrund beim Hover */
    border-color: #00ff99;
    border-width: 1.5px; /* Etwas dickere Umrandung beim Hover */
    color: #00ff99;
    box-shadow: 0 0 8px rgba(0, 255, 153, 0.3);
}

/* Favorite Button - Rot wenn aktiv */
.file-action-btn[data-action="favorite"] {
    color: var(--text-secondary);
}

.file-action-btn[data-action="favorite"]:hover {
    background: rgba(255, 51, 102, 0.15); /* Etwas hellerer Hintergrund beim Hover */
    border-color: var(--primary-color);
    border-width: 1.5px; /* Etwas dickere Umrandung beim Hover */
    color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

.file-action-btn[data-action="favorite"] i.fas {
    color: var(--primary-color);
}

/* Play Button - Rot */
.file-action-btn[data-action="play"] {
    color: var(--primary-color);
}

.file-action-btn[data-action="play"]:hover {
    background: rgba(255, 51, 102, 0.15); /* Etwas hellerer Hintergrund beim Hover */
    border-color: var(--primary-color);
    border-width: 1.5px; /* Etwas dickere Umrandung beim Hover */
    color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

.file-action-btn i.fas.fa-heart {
    color: var(--primary-color);
}

/* Responsive - angepasst für neue Struktur */
@media (max-width: 1400px) {
    .file-browser-header,
    .file-item-row {
        grid-template-columns: 40px 60px minmax(180px, 2.5fr) 70px 70px minmax(100px, 1.2fr) 110px minmax(110px, auto);
        gap: 0.875rem;
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 1200px) {
    .file-browser-header,
    .file-item-row {
        grid-template-columns: 40px 50px minmax(150px, 2fr) 70px 70px minmax(90px, 1fr) 100px minmax(100px, auto);
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .file-col-title-combined .title-text {
        font-size: 0.875rem;
    }

    .file-col-title-combined .artist-text {
        font-size: 0.75rem;
    }
}

@media (max-width: 1024px) {
    .file-browser-header,
    .file-item-row {
        grid-template-columns: 35px 50px minmax(120px, 1.8fr) 60px 60px minmax(80px, 0.9fr) 90px minmax(90px, auto);
        gap: 0.625rem;
        padding: 0.75rem 0.875rem;
    }

    /* Energy-Spalte optional verstecken bei Platzmangel */
    .file-col-energy {
        display: none;
    }

    .file-browser-header:has(#header-energy:not([style*="display: none"])) {
        grid-template-columns: 35px 50px minmax(120px, 1.8fr) 60px 60px minmax(80px, 0.9fr) minmax(90px, auto);
    }
}

@media (max-width: 768px) {
    .file-browser-header,
    .file-item-row {
        grid-template-columns: 30px 40px minmax(100px, 1.5fr) 50px 50px minmax(70px, 0.8fr) minmax(80px, auto);
        gap: 0.5rem;
        padding: 0.625rem 0.75rem;
    }

    /* Bei sehr kleinen Bildschirmen: KEY verstecken */
    .file-col-key,
    .file-browser-header .file-col-key {
        display: none;
    }

    .file-col-title-combined .title-text {
        font-size: 0.8125rem;
    }

    .file-col-title-combined .artist-text {
        font-size: 0.6875rem;
    }

    /* Genre-Badges kleiner */
    .genre-badge {
        font-size: 0.6875rem;
        padding: 0.1rem 0.4rem;
    }
}

/* File Item - Grid View */
.file-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
}

.file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.file-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 51, 102, 0.4);
    border-color: var(--primary-color);
    background: rgba(255, 51, 102, 0.05);
}

.file-item:hover::before {
    transform: scaleX(1);
}

.file-item.selected {
    border-color: var(--primary-color);
    background: rgba(255, 51, 102, 0.15);
    box-shadow: 0 4px 16px rgba(255, 51, 102, 0.3);
}

.file-item.selected::before {
    transform: scaleX(1);
}

.file-item-checkbox {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
    z-index: 10;
}

.file-item-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

/* Cover-Bild in Grid-Ansicht - gleiche Größe wie Icon */
.file-item[data-type="audio"] .file-item-cover {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    flex-shrink: 0;
    margin: 0 auto 1rem;
}

/* Logo für Audio-Dateien in Grid-Ansicht */
.file-item[data-type="audio"] .file-item-icon {
    background-image: var(--header-logo-image, url('../assets/logo.png'));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.05);
}

.file-item[data-type="audio"] .file-item-icon i {
    display: none; /* Verstecke Icon, zeige nur Logo */
}

.file-item:hover .file-item-icon {
    transform: scale(1.1);
}

.file-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-item-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

/* File Item - List View */
.file-browser-list .file-item {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 1rem 1.25rem;
    min-height: auto;
    border-radius: 8px;
}

.file-browser-list .file-item::before {
    display: none;
}

.file-browser-list .file-item-icon {
    width: 48px;
    height: 48px;
    margin: 0;
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* Cover-Bild in List-Ansicht - gleiche Größe wie Icon */
.file-browser-list .file-item-cover {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    flex-shrink: 0;
    margin: 0;
    margin-right: 1rem;
}

.file-browser-list .file-item-name {
    flex: 1;
    margin-bottom: 0;
    text-align: left;
    -webkit-line-clamp: 1;
}

.file-browser-list .file-item-size {
    margin-top: 0;
    margin-left: auto;
    min-width: 80px;
    text-align: right;
}

.file-browser-list .file-item-checkbox {
    position: static;
    margin-right: 1rem;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin: 2rem 0;
}

/* Controls - Nach Track Info, genau mittig zwischen Track-Info und Waveform */
.lounge-player-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex: 1; /* Nimmt verfügbaren Platz zwischen Track-Info und Waveform */
    flex-shrink: 0;
    order: 2; /* Nach Track Info */
    margin-left: 0;
    margin-right: 0;
}

.lounge-player-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.lounge-player-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
}

.lounge-player-btn.play {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(255, 51, 102, 0.3);
}

.lounge-player-btn.play:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.5);
}

.lounge-player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    order: 3; /* Nach Controls */
    margin: 0;
    max-width: 600px;
}

.lounge-player-time {
    color: var(--text-secondary);
    font-size: 0.6875rem;
    min-width: 35px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lounge-player-slider {
    flex: 1;
    position: relative;
    cursor: pointer;
    height: 20px; /* Kompakte Höhe für kleine Waveform */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

/* Waveform Container - Kompakt wie im Referenzbild */
#waveform {
    width: 100%;
    height: 20px;
    cursor: pointer;
    overflow: visible;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* WaveSurfer Styles - Kompakt, Weiß mit Roter Progress-Markierung */
#waveform wave {
    width: 100% !important;
    height: 20px !important;
}

#waveform canvas {
    width: 100% !important;
    height: 20px !important;
}

/* Waveform Bars - Weiß */
#waveform wave wave {
    background: white !important;
}

/* Waveform Progress - Rot */
#waveform wave wave[style*="background"] {
    background: var(--primary-color) !important;
}

/* Override WaveSurfer default colors */
#waveform .wavesurfer-waveform {
    background: rgba(255, 255, 255, 0.1) !important;
}

#waveform .wavesurfer-progress {
    background: var(--primary-color) !important;
}

.lounge-player-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 160px;
    justify-content: flex-end;
    flex-shrink: 0;
    order: 4; /* Ganz rechts */
}

.lounge-player-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.lounge-player-action-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
}

.lounge-player-action-btn.active {
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.15);
    border-color: var(--primary-color);
}

/* Like Button - Rot wenn aktiv */
.lounge-player-action-btn#player-like.active i,
.lounge-player-action-btn#player-like:hover i {
    color: var(--primary-color);
}

.lounge-player-action-btn#player-like.active i.fas {
    color: var(--primary-color);
}

.lounge-player-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lounge-volume-slider {
    width: 70px;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.lounge-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lounge-volume-slider::-webkit-slider-thumb:hover {
    background: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

.lounge-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.lounge-volume-slider::-moz-range-thumb:hover {
    background: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
}

/* Scroll to Top Button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 100px; /* Über dem Player (80px + 20px Abstand) */
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(255, 51, 102, 0.4);
}

.scroll-to-top-btn i {
    font-size: 1.25rem;
}

/* Back Button in Toolbar */
.btn-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-back:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .lounge-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .lounge-sidebar.open {
        transform: translateX(0);
    }

    .lounge-main {
        margin-left: 0;
    }

    .lounge-player-bar {
        padding-left: 2rem; /* Kein Sidebar-Offset auf Mobile */
    }

    .scroll-to-top-btn {
        right: 1rem;
        bottom: 90px;
    }
}

/* ============================================
   Right Sidebar - Top Tracks
   ============================================ */

/* Sidebar Toggle Button - Fixed Position, immer sichtbar */
.lounge-sidebar-toggle-btn {
    position: fixed;
    left: 60px; /* Standard-Position bei collapsed Sidebar (60px) */
    top: 80px; /* Unter dem Header */
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, color 0.3s ease;
    z-index: 101; /* Über der Sidebar */
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.lounge-sidebar-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.lounge-sidebar-toggle-btn i {
    transition: transform 0.3s ease;
}

/* Button bleibt an der Sidebar dran wenn diese aufgeht */
body:not(:has(.lounge-sidebar.collapsed)) .lounge-sidebar-toggle-btn {
    left: 280px; /* Positioniert am rechten Rand der Sidebar */
}

/* Fallback für Browser ohne :has() Support */
.lounge-sidebar:not(.collapsed) ~ .lounge-sidebar-toggle-btn {
    left: 280px;
}

/* Right Sidebar Toggle Button */
.lounge-right-sidebar-toggle {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 51, 102, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 997;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.2);
}

/* Button bewegt sich mit Sidebar wenn geöffnet */
body:has(.lounge-right-sidebar.open) .lounge-right-sidebar-toggle {
    right: calc(320px + 2rem);
}

.lounge-right-sidebar-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.4);
}

/* Toggle Button bleibt immer sichtbar - kein hidden mehr */

/* Right Sidebar */
.lounge-right-sidebar {
    position: fixed;
    right: 0;
    top: 80px;
    width: 320px;
    height: calc(100vh - 80px - 90px);
    background: var(--bg-sidebar);
    border-left: 1px solid rgba(255, 51, 102, 0.2);
    z-index: 998;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none; /* Verhindert Interaktion wenn geschlossen */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                right 0.3s ease,
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.lounge-right-sidebar.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto; /* Erlaubt Interaktion wenn geöffnet */
}

/* Right Sidebar wenn Player minimiert ist */
body:has(#lounge-player-bar.minimized) .lounge-right-sidebar {
    height: calc(100vh - 80px);
}

/* Right Sidebar Header */
.lounge-right-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 51, 102, 0.2);
    background: rgba(255, 51, 102, 0.05);
}

.lounge-right-sidebar-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Right Sidebar Content */
.lounge-right-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
}

/* Right Sidebar Content Scrollbar - KOMPLETT ENTFERNT */
.lounge-right-sidebar-content::-webkit-scrollbar {
    display: none; /* Scrollbar komplett verstecken */
    width: 0;
    height: 0;
}

.lounge-right-sidebar-content {
    -ms-overflow-style: none; /* IE und Edge */
    scrollbar-width: none; /* Firefox */
}

/* Right Section */
.lounge-right-section {
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.lounge-right-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.lounge-right-section-header h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.lounge-right-section-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(255, 51, 102, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 51, 102, 0.2);
}

/* Right Tracks List */
.lounge-right-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lounge-right-track-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 51, 102, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 60px;
}

.lounge-right-track-item:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: rgba(255, 51, 102, 0.3);
    transform: translateX(-2px);
}

.lounge-right-track-item.playing {
    background: rgba(255, 51, 102, 0.15);
    border-color: var(--primary-color);
}

.lounge-right-track-number {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-tertiary);
    min-width: 24px;
    text-align: center;
}

.lounge-right-track-item.playing .lounge-right-track-number {
    color: var(--primary-color);
}

.lounge-right-track-artwork {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 51, 102, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-image: var(--header-logo-image, url('../assets/logo.png'));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.lounge-right-track-artwork i {
    display: none;
}

/* Folder Items */
.lounge-right-folder-item .lounge-right-track-artwork {
    background-image: none;
    background: rgba(255, 51, 102, 0.1);
}

.lounge-right-folder-item .lounge-right-track-artwork i {
    display: block;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.lounge-right-folder-item:hover {
    background: rgba(255, 51, 102, 0.15);
    border-color: rgba(255, 51, 102, 0.4);
}

.lounge-right-track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lounge-right-track-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: normal;
    overflow: visible;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.4;
    word-break: break-word;
    max-height: none;
}

.lounge-right-track-item.playing .lounge-right-track-name {
    color: var(--primary-color);
}

.lounge-right-track-meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.2rem;
}

/* Energy Charts Styles */
.lounge-right-section-subtitle {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-top: 0.25rem;
    display: block;
}

.lounge-right-track-energy {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Energy Cover Artwork with Blur Effect */
.energy-cover-artwork {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2) 0%, rgba(255, 51, 102, 0.1) 100%);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.energy-cover-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 0.6;
    z-index: 0;
}

.energy-rank-number {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.energy-number-white {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
}


.energy-chart-item:hover .energy-cover-artwork {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(255, 51, 102, 0.4);
}

.energy-chart-item:hover .energy-cover-blur {
    opacity: 0.8;
}

.energy-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-top: 0.5rem;
}

.energy-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.energy-progress-fill.energy-badge-high {
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
}

.energy-progress-fill.energy-badge-medium {
    background: linear-gradient(90deg, #ffc107 0%, #ffca28 100%);
}

.energy-progress-fill.energy-badge-low {
    background: linear-gradient(90deg, #9e9e9e 0%, #bdbdbd 100%);
}

.lounge-right-track-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.lounge-right-track-action {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 51, 102, 0.3);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.lounge-right-track-action:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lounge-right-track-action.favorite.active {
    background: rgba(255, 51, 102, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lounge-right-track-action.favorite.active i {
    color: var(--primary-color);
}

/* Loading State */
.lounge-right-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-tertiary);
    gap: 1rem;
}

.lounge-right-loading i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.lounge-right-loading span {
    font-size: 0.875rem;
}

/* Empty State */
.lounge-right-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-tertiary);
    text-align: center;
    gap: 0.5rem;
}

.lounge-right-empty i {
    font-size: 2rem;
    color: var(--text-tertiary);
    opacity: 0.5;
}

.lounge-right-empty span {
    font-size: 0.875rem;
}

.lounge-right-sidebar.open ~ .lounge-main {
    margin-right: 400px; /* 320px sidebar + 80px margin */
    transition: margin-right 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lounge-right-sidebar-toggle {
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lounge-right-sidebar {
        width: 100%;
        max-width: 320px;
    }

    .lounge-right-sidebar.open ~ .lounge-main {
        margin-right: 0;
    }

    .lounge-main {
        margin-right: 60px; /* Weniger Platz auf Mobile */
    }
}

/* Club Energy rating system */
.file-col-energy {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    text-align: center;
    min-width: 0 !important; /* WICHTIG: Erlaubt Schrumpfen */
    max-width: 100%;
}

.club-energy-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
    align-items: center;
}

.club-energy-select {
    width: 100%;
}

.club-energy-dropdown {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    appearance: none;
    cursor: pointer;
}

.club-energy-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(19, 239, 132, 0.25);
}

.club-energy-dropdown:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.club-energy-readonly .club-energy-dropdown {
    cursor: not-allowed;
}

.club-energy-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.club-energy-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #13ef84, #00c46c);
    color: #041c0f;
    font-size: 0.55rem;
    font-weight: 700;
    text-align: right;
    padding-right: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-radius: 999px;
    min-width: 24px;
}

.club-energy-active-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
}

.club-energy-badge {
    background: rgba(19, 239, 132, 0.15);
    border: 1px solid rgba(19, 239, 132, 0.3);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    color: #13ef84;
    font-weight: 600;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    cursor: default;
}

.club-energy-empty {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.club-energy-login {
    font-size: 0.6rem;
    text-align: center;
    color: var(--text-tertiary);
}

/* Match header styling for Energy column */
.file-browser-header .file-col-energy,
#crates-browser-header .file-col-energy,
#matched-tracks-browser-header .file-col-energy,
#playlist-browser-header .file-col-energy {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Header-Spalten Ausrichtung - müssen mit Daten-Spalten übereinstimmen */
/* WICHTIG: Keine zusätzlichen Styles die die Ausrichtung verschieben */
.file-browser-header .file-col-bpm,
.file-browser-header .file-col-key,
.file-browser-header .file-col-genre,
#crates-browser-header .file-col-bpm,
#crates-browser-header .file-col-key,
#crates-browser-header .file-col-genre,
#matched-tracks-browser-header .file-col-bpm,
#matched-tracks-browser-header .file-col-key,
#matched-tracks-browser-header .file-col-genre,
#playlist-browser-header .file-col-bpm,
#playlist-browser-header .file-col-key,
#playlist-browser-header .file-col-genre {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 !important; /* Kein Padding das die Ausrichtung verschiebt */
    margin: 0 !important; /* Kein Margin das die Ausrichtung verschiebt */
    box-sizing: border-box;
}


/* ============================================
   Advanced Search Results Styling
   ============================================ */
.advanced-search-result-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.advanced-search-result-item:hover {
    background: rgba(255, 51, 102, 0.05);
    border-color: rgba(255, 51, 102, 0.4);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.15);
}

.result-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.result-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(255, 51, 102, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.result-item-info {
    flex: 1;
    min-width: 0;
}

.result-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item-artist {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.result-meta-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-meta-genre {
    background: rgba(255, 51, 102, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.result-meta-bpm {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.result-meta-key {
    background: rgba(0, 255, 153, 0.15);
    color: #00ff99;
    border: 1px solid rgba(0, 255, 153, 0.3);
}

.result-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.result-action-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.result-action-btn:hover {
    background: rgba(255, 51, 102, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.result-action-btn[data-action="play"]:hover {
    background: rgba(255, 51, 102, 0.2);
}

.result-action-btn[data-action="download"]:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
}
