/* frontend/src/style.css - CSS BASE E ROUTER */

/* 
 * ⚠️ IMPORTANTE - GESTIONE SFONDO BIANCO ⚠️
 * 
 * Per evitare che uno sfondo bianco interferisca con il glassmorphism:
 * - html e body DEVONO avere background-color: #0a0a0a (scuro), NON transparent o white
 * - I meta tag theme-color e msapplication-TileColor DEVONO essere #0a0a0a, NON #ffffff
 * - I contenitori principali (main, #app-container, .app-layout) sono trasparenti per glassmorphism
 * 
 * Se questi valori vengono modificati, il browser mostrerà uno sfondo bianco di default
 * che crea un effetto fastidioso sulla trasparenza del tema glassmorphism.
 * 
 * Vedi anche: index.html (meta tags e inline styles), mobile.css, desktop.css
 */

/* ===== CSS IMPORTS - TUTTI ALL'INIZIO ===== */
/* AuthPage.css rimosso - login ora è un dropdown nella topbar (solo desktop) */
/* Sidebar CSS rimosso - non più utilizzata */
@import url('./components/AdminUsers/AdminUsers.css');
@import url('./components/AdminStats/AdminStats.css');
@import url('./components/Admin/AdminLogs/AdminLogs.css');
@import url('./components/Modal/Modal.css');
@import url('./components/MetadataEditor/MetadataEditor.css');
@import url('./components/MetadataEditor/EditMetadataPage.css');
@import url('./components/ThemeToggle/ThemeToggle.css');
@import url('./components/StatsDashboard/StatsDashboard.css');
/* ResetPassword.css rimosso - ora è un modale */
@import url('./components/Home/HomeDashboard.css');
@import url('./components/Player/PlayerDesktop.css');
@import url('./components/ExploreDashboard/ExploreDashboard.css');
@import url('./components/ExploreGenres/ExploreGenres.css');
@import url('./components/ExploreArtists/ExploreArtists.css');
@import url('./components/ExploreSongs/ExploreSongs.css');
@import url('./components/ExploreYears/ExploreYears.css');
@import url('./components/SearchResults/SearchResults.css');
@import url('./components/AlbumGrid/AlbumGrid.css');
@import url('./components/AlbumDetail/AlbumDetail.css');
@import url('./components/ArtistDetail/ArtistDetail.css');
@import url('./components/PlaylistDetail/PlaylistDetail.css');
@import url('./components/GenreGrid/GenreGrid.css');
@import url('./components/BackButton/BackButton.css');
@import url('./components/QueueView/QueueView.css');
@import url('./components/AutoPlaylistManager/AutoPlaylistManager.css');
@import url('./components/PlaylistManager/PlaylistManager.css');
@import url('./components/CreatePlaylistManager/CreatePlaylistPage.css');
@import url('./components/AutoPlaylistManager/CreateAutoPlaylistPage.css');
@import url('./components/AutoPlaylistManager/EditAutoPlaylistPage.css');
@import url('./components/AICoverGenerator/AICoverGenerator.css');
@import url('./utils/centralizedContextMenu.css');
@import url('./components/Footer/Footer.css');
@import url('./components/TopBar/TopBar.css');
@import url('./components/SearchAutocomplete/SearchAutocomplete.css');
@import url('./components/FollowButton/FollowButton.css');
@import url('./components/FollowRequests/FollowRequests.css');
@import url('./components/UserProfile/UserProfile.css');
@import url('./components/ExploreUsers/ExploreUsers.css');
@import url('./components/Comments/Comments.css');
@import url('./components/ActivityFeed/ActivityFeed.css');
@import url('./components/ActivityFeedPage/ActivityFeedPage.css');
@import url('./components/ReactionsMenu/ReactionsMenu.css');

/* Footer Pages CSS */
@import url('./components/pages/ContactPage.css');
@import url('./components/pages/PrivacyPage.css');
@import url('./components/pages/TermsPage.css');
@import url('./components/pages/CookiesPage.css');
@import url('./components/pages/LegalPage.css');
@import url('./components/pages/BugReportPage.css');
@import url('./components/pages/FeatureRequestPage.css');
@import url('./components/pages/FaqPage.css');
@import url('./components/pages/HelpPage.css');
@import url('./components/pages/AboutPage.css');
@import url('./components/pages/FavoritesPage.css');
/* Mobile CSS imports removed - loaded dynamically based on device type */

/* ===== VARIABILI CSS GLOBALI ===== */
:root {
    /* Tema Scuro (Default) - Più contrastato */
    --main-bg-color: #0a0a0a; 
    --secondary-bg-color: #111111; 
    --highlight-bg-color: #1a1a1a; 
    --main-text-color: #ffffff; 
    --secondary-text-color: #cccccc;
    --tertiary-text-color: #888888;
    --border-color: #333333;
    --hover-bg-color: #222222;
    --active-bg-color: #444444;
    
    /* Design tokens unificati - Più contrastati */
    --glass-bg-weak: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-panel: rgba(255, 255, 255, 0.12);
    /* Bordo più sottile per evitare aura bianca eccessiva */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 10px;
    --panel-blur: 15px;
    --elev-soft: 0 6px 16px rgba(0,0,0,0.3);
    --elev-strong: 0 10px 24px rgba(0,0,0,0.45);
    --elev-section: 0 8px 24px rgba(0,0,0,0.3);
    --radius-card: 14px;
    --radius-cover: 4px;
    --play-size: 42px;
    --play-icon: 22px;
    --scale-rest: 0.92;
    --scale-hover: 1.06;
    --scale-active: 0.96;
    --accent-color: #ff6b6b;
    
    /* Layout */
    --sidebar-width: 100px;
    
    /* Transizioni */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Tema Chiaro - Più contrastato */
[data-theme="light"] {
    --main-bg-color: #f5f5f5;
    --secondary-bg-color: #ffffff;
    --highlight-bg-color: #e8e8e8;
    --main-text-color: #1a1a1a;
    --secondary-text-color: #4a4a4a;
    --tertiary-text-color: #7a7a7a;
    --border-color: #d0d0d0;
    --hover-bg-color: #f1f3f4;
    --active-bg-color: #e3e6ea;
    
    /* Glass effects per tema chiaro - Più contrastati */
    --glass-bg-weak: rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(0, 0, 0, 0.10);
    --glass-panel: rgba(0, 0, 0, 0.08);
    --glass-border: rgba(0, 0, 0, 0.15);
    
    /* Ombre per tema chiaro */
    --elev-soft: 0 2px 8px rgba(0,0,0,0.1);
    --elev-strong: 0 4px 16px rgba(0,0,0,0.15);
    --elev-section: 0 2px 12px rgba(0,0,0,0.08);
}

/* ===== LAYOUT BASE DELL'APP ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ⚠️⚠️⚠️ CRITICO - NON MODIFICARE ⚠️⚠️⚠️ */
/* ===== SFONDO SCURO DI FALLBACK - EVITA BIANCO DEL BROWSER ===== */
/* 
 * IMPORTANTE: html e body DEVONO avere background-color: #0a0a0a (scuro)
 * NON impostare a transparent o white! Se html/body sono trasparenti o bianchi,
 * il browser mostrerà uno sfondo bianco di default che interferisce con il glassmorphism.
 * Il colore #0a0a0a corrisponde al fallback del background-art.
 * 
 * Questa è una correzione critica per risolvere il problema dello sfondo bianco
 * che si riflette sulla trasparenza del tema glassmorphism.
 */
html {
    height: 100%;
    width: 100%;
    background-color: #0a0a0a !important;
    background: #0a0a0a !important;
    background-image: none !important;
}

body {
    height: 100%;
    width: 100%;
    background-color: #0a0a0a !important;
    background: #0a0a0a !important;
    background-image: none !important;
    color: var(--main-text-color); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    line-height: 1.6;
    overflow-x: hidden !important;
    overflow-y: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* Forza anche main e altri contenitori a essere trasparenti */
main,
#app-container,
.app-layout,
#root,
.root {
    background-color: transparent !important;
    background: transparent !important;
    background-image: none !important;
}

/* Elimina completamente lo scrolling laterale */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== SCROLLBAR PERSONALIZZATA ===== */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
    -webkit-appearance: none;
    /* RIMOSSO SFONDO BIANCO - scrollbar stesso trasparente */
    background: transparent !important;
}

/* Assicura che lo scrollbar sia sempre interattivo */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.background-art::-webkit-scrollbar {
    width: 16px;
    height: 16px;
    -webkit-appearance: none;
    /* RIMOSSO SFONDO BIANCO - scrollbar stesso trasparente */
    background: transparent !important;
}

::-webkit-scrollbar-track {
    /* RIMOSSO SFONDO BIANCO - scrollbar track trasparente */
    background: transparent !important;
    border-radius: 10px;
    margin: 4px;
    /* Assicura che il track sia sempre cliccabile */
    pointer-events: auto !important;
}

/* Scrollbar track per background-art */
.background-art::-webkit-scrollbar-track {
    /* RIMOSSO SFONDO BIANCO - scrollbar track trasparente */
    background: transparent !important;
    border-radius: 10px;
    margin: 4px;
    pointer-events: auto !important;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.2) 100%);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    /* backdrop-filter: blur(10px); Rimossa per migliorare l'interattività */
    transition: all var(--transition-fast);
    -webkit-user-select: none;
    user-select: none;
    -webkit-appearance: none;
    min-height: 30px; /* Altezza minima per facilitare il click */
    /* Assicura che lo scrollbar thumb sia sempre cliccabile */
    pointer-events: auto !important;
}

/* Scrollbar thumb per background-art */
.background-art::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.2) 100%);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
    -webkit-user-select: none;
    user-select: none;
    -webkit-appearance: none;
    min-height: 30px;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Assicura che lo scrollbar thumb sia interattivo */
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.background-art::-webkit-scrollbar-thumb {
    cursor: pointer !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.background-art::-webkit-scrollbar-thumb:hover {
    cursor: pointer !important;
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.5) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.4) 100%);
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
.background-art::-webkit-scrollbar-thumb:active {
    cursor: grabbing !important;
}

::-webkit-scrollbar-corner {
    /* RIMOSSO SFONDO BIANCO - scrollbar corner trasparente */
    background: transparent !important;
}

/* Firefox */
* {
    scrollbar-width: thin;
    /* RIMOSSO SFONDO BIANCO - scrollbar track trasparente per Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Tema chiaro - Scrollbar personalizzata */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--glass-bg-weak);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.1) 50%, 
        rgba(0, 0, 0, 0.15) 100%);
    border: 1px solid var(--glass-border);
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(0, 0, 0, 0.15) 50%, 
        rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: grab;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.2) 50%, 
        rgba(0, 0, 0, 0.25) 100%);
    cursor: grabbing;
}

[data-theme="light"] * {
    /* RIMOSSO SFONDO BIANCO - scrollbar track trasparente per Firefox */
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* ===== SCROLLBAR PER CONTENITORI SPECIFICI ===== */
.home-section,
.explore-section,
.search-results,
.playlist-detail,
.album-detail,
.artist-detail {
    /* Scrollbar più sottile per i contenitori interni */
    scrollbar-width: thin;
}

.home-section::-webkit-scrollbar,
.explore-section::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.playlist-detail::-webkit-scrollbar,
.album-detail::-webkit-scrollbar,
.artist-detail::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.home-section::-webkit-scrollbar-thumb,
.explore-section::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.playlist-detail::-webkit-scrollbar-thumb,
.album-detail::-webkit-scrollbar-thumb,
.artist-detail::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.15) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tema chiaro per contenitori specifici */
[data-theme="light"] .home-section::-webkit-scrollbar-thumb,
[data-theme="light"] .explore-section::-webkit-scrollbar-thumb,
[data-theme="light"] .search-results::-webkit-scrollbar-thumb,
[data-theme="light"] .playlist-detail::-webkit-scrollbar-thumb,
[data-theme="light"] .album-detail::-webkit-scrollbar-thumb,
[data-theme="light"] .artist-detail::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.15) 0%, 
        rgba(0, 0, 0, 0.05) 50%, 
        rgba(0, 0, 0, 0.1) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#app-container {
    flex: 1 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 1;
    /* Rimuove eventuali box-shadow o outline che potrebbero creare bagliore bianco */
    box-shadow: none;
    outline: none;
}

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    /* Sfondo trasparente per effetto glassmorphism - permette di vedere background-art */
    background: transparent;
    position: relative;
    z-index: 1;
    /* Rimuove eventuali box-shadow o outline che potrebbero creare bagliore bianco */
    box-shadow: none;
    outline: none;
}

/* ===== BACKGROUND MANAGER CON LOGO MUSICFLY ===== */
.background-art { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    /* FALLBACK: sfondo scuro per evitare bianco se l'immagine non carica */
    background-color: #0a0a0a !important;
    /* Luminosità aumentata per effetto glassmorphism più visibile */
    filter: blur(20px) brightness(0.44); 
    transition: background-image 0.5s ease-in-out, opacity 0.3s ease-in-out; 
    opacity: 1; 
    z-index: 0; 
    background-repeat: no-repeat;
    /* Evita che il layer di background intercetti i click (es. scrollbar) */
    pointer-events: none;
}

/* Logo MusicFly in glassmorphism */
.background-art::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, 
        rgba(255, 107, 107, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 107, 107, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%, 
        rgba(255, 107, 107, 0.1) 100%);
    border-radius: 50%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 0 50px rgba(255, 107, 107, 0.2),
        inset 0 0 50px rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    /* Assicura che non abbia sfondo bianco */
    background-color: transparent !important;
}

.background-art::after {
    content: '♪';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: 300;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    animation: pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px) rotate(0deg); }
    50% { transform: translate(-50%, -50%) translateY(-20px) rotate(180deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== RIDUZIONE BAGLIORE BIANCO SUI BORDI GLASSMORPHISM ===== */
/* Il bagliore bianco è causato dal backdrop-filter che crea un "halo" intorno agli elementi */
/* Soluzione: aggiungere isolation e ridurre l'effetto del backdrop-filter */
.home-section,
.song-card,
.artist-card,
.mobile-song-card,
.mobile-section,
.mobile-home-header,
.player-wrapper,
[class*="glass"] {
    /* Crea un nuovo stacking context per isolare il backdrop-filter */
    isolation: isolate;
    /* Rimuove inset shadow bianchi che creano bagliore sui bordi */
    box-shadow: var(--elev-section, 0 8px 24px rgba(0,0,0,0.3)) !important;
    /* Riduce l'effetto di bagliore del backdrop-filter */
    will-change: transform;
    /* Maschera per ridurre il bagliore sui bordi */
    mask-image: none;
    -webkit-mask-image: none;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== STILI MOBILE ===== */
@media (max-width: 768px) {
    /* Nascondi la topbar su mobile */
    #topbar-container,
    .topbar {
        display: none !important;
    }
    
    /* Rimuovi il margine superiore per il contenuto mobile */
    main {
        margin-top: 0 !important;
        padding-top: 1rem !important;
    }
}

/* ===== STILI DESKTOP ===== */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    /* Rimuovi completamente bottom bar su desktop - sostituita dal footer */
    .bottom-bar,
    .mobile-bottom-bar,
    #mobile-bottom-bar,
    [id*="bottom-bar"],
    [class*="bottom-bar"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Footer sempre visibile su desktop */
    .app-footer,
    #footer-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Layout main content desktop */
    main { 
        position: relative; 
        z-index: 1; 
        min-height: auto;
        overflow-y: auto; 
        overflow-x: hidden; /* Elimina scrolling laterale */
        margin-left: 0;
        margin-top: 50px; /* Spazio per la topbar */
        padding: 1.5rem 1.5rem 2rem 1.5rem;
        box-sizing: border-box;
        width: 100%;
        background-color: transparent;
        /* Assicura che lo scrollbar sia sempre interattivo */
        scrollbar-gutter: stable;
    }
    
    /* HOME DASHBOARD DESKTOP STYLES - definiti in desktop.css */

    .song-card:hover, .artist-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--elev-strong);
        background: var(--glass-bg);
    }

    .artwork-wrapper {
        position: relative;
    }

    .artwork-wrapper .play-card-btn {
        position: absolute;
        right: 50%;
        bottom: 50%;
        transform: translate(50%, 50%) scale(var(--scale-rest));
        opacity: 0;
        pointer-events: none;
    }

    .song-card img, .artist-card img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        display: block;
    }

    .song-info {
        padding: 0.75rem;
    }

    .song-title {
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-artist {
        color: var(--secondary-text-color);
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-added-date {
        color: var(--accent-color);
        font-size: 0.75rem;
        margin-top: 0.3rem;
        opacity: 0.9;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .play-card-btn {
        position: absolute;
        right: 0.6rem;
        bottom: 0.6rem;
        width: var(--play-size);
        height: var(--play-size);
        border-radius: 50%;
        border: 1px solid var(--glass-border);
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: var(--elev-soft);
        transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .play-card-btn .material-symbols-outlined {
        font-size: var(--play-icon);
    }

    .song-card:hover .play-card-btn {
        opacity: 1;
        pointer-events: auto;
        transform: translate(50%, 50%) scale(var(--scale-hover));
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: var(--elev-strong);
    }

    .play-card-btn:active {
        transform: translate(50%, 50%) scale(var(--scale-active));
    }

    .artist-name {
        padding: 0.75rem;
        text-align: center;
        font-weight: 700;
    }

    /* Link artista e titolo coerenti */
    .artist-link,
    .title-link,
    .song-title.link-album,
    .song-title.link-song {
        position: relative;
        color: #fff;
        cursor: pointer;
        text-decoration: none;
    }

    .artist-link::after,
    .title-link::after,
    .song-title.link-album::after,
    .song-title.link-song::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -2px;
        width: 0;
        height: 2px;
        background: var(--accent-color);
        transition: width 0.2s ease;
    }

    .artist-link:hover::after,
    .title-link:hover::after,
    .song-title.link-album:hover::after,
    .song-title.link-song:hover::after {
        width: 100%;
    }

    /* Artisti cliccabili */
    .artist-card.clickable {
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .artist-card.clickable:hover {
        transform: translateY(-6px);
        box-shadow: var(--elev-strong);
        background: var(--glass-bg);
    }

    .artist-card.clickable .artist-name {
        color: var(--main-text-color);
        transition: color 0.2s ease;
    }

    .artist-card.clickable:hover .artist-name {
        color: var(--accent-color);
    }

    /* Album grid corrections */
    .album-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
        padding-top: 1rem;
        width: 100%;
        max-width: calc(100vw - var(--sidebar-width) - 3rem);
        box-sizing: border-box;
    }
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* Nascondi sidebar su mobile e desktop */
    .sidebar {
        display: none !important;
    }
    
    /* Layout main content mobile */
    main {
        margin-left: 0;
        margin-top: 45px; /* Spazio per la topbar mobile */
        width: 100vw;
        padding: 1rem;
        padding-bottom: 120px;
    }
    
    /* Nascondi logo su mobile */
    .background-art::before,
    .background-art::after {
        display: none;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states per accessibilità - RIMUOVI CERCHI ROSSI */
button,
button:focus,
button:focus-visible,
button:active,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Focus visibile solo per elementi di input per accessibilità */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===== SKELETON LOADER STYLES (OTTIMIZZAZIONE CARICAMENTO) ===== */
.loading-skeleton {
    padding: 2rem;
    animation: fadeIn 0.3s ease-in;
}

.skeleton-section {
    margin-bottom: 3rem;
}

.skeleton-title {
    width: 200px;
    height: 32px;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.skeleton-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    aspect-ratio: 1;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}