/* =========================
   BASE & LAYOUT
   ========================= */
body {
    background-color: #0d0f10;
    background-image: url('../images/BG/BG.jpg');
/* Para que la imagen cubra toda la pantalla sin repetirse */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Esto hace que el fondo se quede quieto al hacer scroll */
    background-repeat: no-repeat;
    color: #efefef;
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
}

.container-main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 140px;
}
.top-bar-actions {
    margin-bottom: 20px !important; 
}
.hidden-group {
    display: none !important;
}
.sub-filters {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.sub-filters:not(.hidden-group) {
    display: flex;
}

.album-year{
    color:#999;
    font-size:0.75rem;
    margin-top:2px;
}

.page-header-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto 20px auto;
    border-radius: 15px;
}
.audio-wrapper audio {
    filter: sepia(20%) saturate(70%) grayscale(100%); /* Opcional: per l'estètica de la web */
    margin-top: 10px;
}
.comic-viewer .audio-wrapper .comic-img {
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.search-section .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    z-index: 10;
}
/* Estilo para el nuevo botón de cierre */
.viewer-close-btn, .viewer-close {
    position: absolute !important;
    top: -75px !important;       /* Un poco más arriba para que no tape nada */
    right: 0 !important;
    background: #1a1d1f !important;
    border: 1px solid #33383f !important;
    color: white !important;
    width: 50px !important;      /* Círculo bien grande */
    height: 50px !important;     /* Círculo bien grande */
    border-radius: 50% !important;
    font-size: 40px !important;  /* X Gigante */
    line-height: 0.7 !important; /* Ajuste para centrar la X */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 2000 !important;
    padding-bottom: 8px !important; /* Centrado visual de la X */
}
.filter-container {
    display: flex;
    flex-direction: column; 
    gap: 12px;               
    margin: 10px auto 25px;    
    padding: 0 10px;
}
.main-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}



.viewer-close-btn:hover, .viewer-close:hover {
    background: #ff2d55;
    border-color: #ff2d55;
    transform: scale(1.1);
}

/* =========================
   BUSCADOR Y FILTROS
   ========================= */
.search-section {
    
   
    position: relative;
}

.search-input {
    width: 100%;
    height: 50px;
    background: #1a1d1f;
    border: 1px solid #33383f;
    border-radius: 12px;
    padding: 0 20px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #ff2d55;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 30px auto 40px; /* Separación de la barra de búsqueda y el grid */
    padding: 0 20px;
    margin: 0 !important;

}

.filter-btn {
    background: #1a1d1f;      /* Fondo oscuro sutil */
    border: 1px solid #33383f;  /* Borde gris oscuro */
    color: #9ca3af;           /* Texto grisáceo */
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 20px 20px;
    height: 34px;
}

.filter-btn:hover {
    background: #272b30; /* Corregido el 'bbackground' anterior */
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
   background: #ff2d55;
    border-color: #ff2d55;
    color: white;
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.4);
}

.exit-btn {
    
    min-width: 50px;
    padding: 10px 15px;
}
.exit-btn img {
    filter: brightness(0) invert(1); /* Solo la flecha se pone blanca */
    width: 20px;   /* Tamaño del icono */
    height: 20px;  /* Tamaño del icono */
    display: block;
}

/* =========================
   GRID DE VÍDEOS (COSTURA)
   ========================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.card-item {
    background: rgba(15,15,15,0.75);
    border:none;
    border-radius: 8px;
    overflow: hidden;
}

.card-item:hover {
    transform: translateY(-5px);
    border-color: #444;
}

.card-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Cuadrado para costura queda muy bien */
    object-fit: cover;
    
}

.card-info {
    background: transparent;
    padding: 4px 4px;
    min-height: auto;
    text-align: center;
    padding-top:10px;
    padding-bottom:2px;
}

.card-number {
    display: block;
    font-size: 12px;
    color: #ff2d55;
    font-weight: bold;
    margin-bottom: 4px;
}

.card-name {

    display:block;
    font-size: 12px;
    font-weight: 500;
    line-height:1.2;
    margin:0;
    color:#ddd;
}

/* =========================
   VISOR (MODAL)
   ========================= */
.comic-viewer {
    display: none;
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.viewer-content {
    position: relative;
    max-width: 90%;
    max-width: 500px; /* Ajusta esto al ancho de tus imágenes */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comic-video, .comic-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.viewer-caption {
    text-align: center;
    margin-top: 15px;
    font-size: 18px;
    color: white;
}


 

/* Ajustes específicos para pantallas medianas (Tablet) y grandes (PC) */
@media (min-width: 600px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}
@media (max-width: 768px) {

    .container-main {
        padding: 0;
    }

    .page-header-logo {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        margin: 0 0 15px 0;
    }
    
    #bottomMenu{
    position:fixed;
    bottom:0;
    left:0;
    right:0;

    height:58px;

    background:#000;

    display:flex;
    justify-content:space-around;
    align-items:center;

    z-index:99999;

    border-top:1px solid #222;
}

#bottomMenu button{
    background:none;
    border:none;
    padding:0;
    margin:0;
}

#bottomMenu img{
    width:28px;
    height:28px;
    display:block;
    opacity:.45;
    filter:brightness(0) invert(1);
    transition:filter .25s;
}

#bottomMenu .menuButton.active img{

    opacity:1;

    filter:
        brightness(0)
        saturate(100%)
        invert(67%)
        sepia(95%)
        saturate(2980%)
        hue-rotate(167deg)
        brightness(108%)
        contrast(105%);

}


#screenTitle{

    text-align:center;

    color:white;

    font-size:36px;

    font-weight:300;

    margin-top:20px;
    margin-bottom:20px;
}

#bottomMenu button img{
    opacity:0.4;
    transition:all .2s;
}

#bottomMenu button.active img{
    opacity:1;
    filter:none;
}

#progressBar::-webkit-slider-runnable-track{
    height:6px;
    background:transparent;
}

#progressBar::-webkit-slider-thumb{
    -webkit-appearance:none;
    width:14px;
    height:14px;
    border-radius:50%;
    background:white;
    border:2px solid white;
    margin-top:-5px;
    cursor:pointer;
}



#slogan{

    margin-top:18px;
    color:var(--text2);
    font-size:14px;
    text-align:center;
    letter-spacing:1px;

}

#separator{

    margin-top:16px;
    width:75px;
    height:1px;
    background:var(--red);
    border-radius:20px;

}

#continueTitle {
    position: fixed;
    left: 0;
    right: 0;    
    bottom: 130px;     
    text-align: center;
    color:var(--mainTheme);
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 1.8px;
    z-index: 9999; 
}

#homeScreen{

    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    padding-top:45px;

}

.artist-img{

    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    border-radius:50%;

}

.card-image-container.artist{

    border-radius:50%;
    overflow:hidden;

}

@media (orientation: landscape) and (max-height: 500px) {

    #artistHeroContainer {
        max-height: 180px;
        overflow: hidden;
    }

    #artistHeroImage {
        width: 100%;
        height: 180px;
        object-fit: cover;
        object-position: center;
    }

    .container-main {
        padding-top: 8px;
        padding-bottom: 120px;
    }

    .filter-container {
        margin-top: 4px;
    }
 }

}
.podcast-transparent-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
    padding: 6px;
    box-sizing: border-box;
}
.podcast-icon-card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.podcast-icon-card .card-image-container,
.podcast-icon-card .card-image-container.artist {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.podcast-icon-card .card-info {
    background: transparent !important;
}
.music-icon-card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.music-icon-card .card-image-container,
.music-icon-card .card-image-container.artist {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.music-icon-card .card-info {
    background: transparent !important;
}

#listeningHistoryList {
    width: 100%;
    padding: 0 18px 150px;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
#homeSettingsMenu .settingsOption span {
    display: none;
}

.historyItem {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.historyCover {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: block;
    object-fit: cover;
    border-radius: 5px;
    background: transparent;
}

.historyInfo {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.historyTitle {
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    line-height: 19px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.historySubtitle {
    margin-top: 2px;
    color: #a0a0a0;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.historyType {
    color: var(--mainTheme);
}

.historySeparator {
    margin: 0 3px;
}
.historyItem {
    cursor: pointer;
}
#listeningHistoryList {
    transition:
        transform .35s cubic-bezier(.2,.8,.2,1);
}

#homeScreen.reload-open #listeningHistoryList {
    transform: translateY(82px);
}
.globalResultMeta {
    margin-top: 3px;
    color: #999;
    font-size: 10px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.globalResultType {
    display: block;
    margin-top: 3px;
    color: var(--mainTheme);
    font-size: 9px;
    line-height: 1;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.globalSearchEmpty {
    width: 100%;
    padding: 80px 20px;
    color: #888;
    text-align: center;
    font-size: 15px;
}

.globalSearchEmpty strong {
    color: #fff;
    font-weight: 500;
}

/* =====================================================
   BAITAI — ALBUM SCREEN
===================================================== */

.spotifyAlbumPage {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    padding:
        calc(env(safe-area-inset-top, 0px) + 24px)
        18px
        calc(
            var(--bottomMenuHeight, 62px) +
            var(--miniPlayerHeight, 56px) +
            var(--nativeBottomInset, 0px) +
            26px
        );
    color: #fff;
}

.spotifyAlbumHero,
.spotifyAlbumInformation,
.spotifyAlbumTrackListCompact {
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.spotifyAlbumHero {
    margin-bottom: 14px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}

.spotifyAlbumCover {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.spotifyAlbumTitle {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(22px, 6.2vw, 29px);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -.04em;
    color: #fff;
}

.spotifyAlbumArtistActionsRow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 7px;
}

.spotifyAlbumArtist {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.spotifyAlbumArtist span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spotifyAlbumArtistAvatar {
    width: 30px;
    height: 43px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-sizing: border-box;
    flex-shrink: 0;
}

.spotifyAlbumActionsCompact {
    width: auto;
    min-height: 48px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.spotifyAlbumShuffle,
.spotifyAlbumPlay {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.spotifyAlbumShuffle {
    width: 36px;
    height: 36px;
    color: #fff;
}

.spotifyAlbumShuffle svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.spotifyAlbumPlay {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    color: var(--mainTheme);
    overflow: hidden;
}

#spotifyAlbumPlayIcon,
#spotifyAlbumPlayIcon .svgIcon,
#spotifyAlbumPlayIcon svg {
    display: block;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    margin: 0;
    padding: 0;
    color: currentColor;
    fill: currentColor;
    line-height: 0;
    pointer-events: none;
}

.spotifyAlbumMetadata {
    margin-top: 1px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    color: rgba(255, 255, 255, .58);
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    line-height: 15px;
}

.spotifyAlbumMetaDot {
    color: rgba(255, 255, 255, .46);
}

.spotifyAlbumTrackListCompact {
    margin-top: 7px;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.spotifyAlbumTrackCompact {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
}

.spotifyAlbumTrackText {
    min-width: 0;
}

.spotifyAlbumTrackTitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, .96);
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 17px;
}

.spotifyAlbumTrackArtist {
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, .48);
    font-family: "Montserrat", sans-serif;
    font-size: 10px;
    font-weight: 430;
    line-height: 13px;
}

.spotifyAlbumTrackDuration {
    width: 42px;
    padding: 0;
    justify-self: end;
    text-align: right;
    color: rgba(255, 255, 255, .46);
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    white-space: nowrap;
}

.spotifyAlbumTrack.playing .spotifyAlbumTrackTitle {
    color: var(--mainTheme);
}

.spotifyAlbumPlay:active,
.spotifyAlbumShuffle:active,
.spotifyAlbumTrackCompact:active {
    transform: scale(.96);
}

@media (max-height: 760px) {
    .spotifyAlbumPage {
        padding-top: calc(env(safe-area-inset-top, 0px) + 18px);
    }

    .spotifyAlbumHero {
        max-width: 300px;
        margin-bottom: 12px;
    }
}

@media (max-width: 370px) {
    .spotifyAlbumPage {
        padding-left: 14px;
        padding-right: 14px;
    }

    .spotifyAlbumArtistActionsRow {
        gap: 7px;
    }
}

/* =====================================================
   ARTIST PAGE — STICKY HEADER + ALBUM LIST
===================================================== */

#artistStickyHeader {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background: linear-gradient(
        to bottom,
        var(--themeBackground) 0%,
        var(--themeBackground) 92%,
        transparent 100%
    );
}

#artistStickyHeader #artistHeroContainer {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
}

#artistStickyHeader #artistHeroImage {
    display: block;
    width: 100%;
    max-height: 310px;
    object-fit: cover;
    object-position: center;
}

#artistStickyHeader #artistActions {
    position: static;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 3px 18px 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.artistAlbumsSection {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 14px 150px;
    color: #fff;
}

.artistAlbumsHeading {
    margin: 0 0 8px;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 750;
    line-height: 1.1;
    text-align: left;
}

.artistAlbumList {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.artistAlbumRow {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #fff;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.artistAlbumRowCover {
    display: block;
    width: 78px;
    height: 78px;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 7px 18px rgba(0, 0, 0, .26);
}

.artistAlbumRowInformation {
    min-width: 0;
}

.artistAlbumRowTitle {
    overflow: hidden;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 19px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artistAlbumRowYear {
    margin-top: 3px;
    overflow: hidden;
    color: rgba(255, 255, 255, .56);
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 420;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artistAlbumRow:active {
    transform: scale(.985);
}

@media (max-width: 370px) {
    .artistAlbumsSection {
        padding-right: 12px;
        padding-left: 12px;
    }

    .artistAlbumRow {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 11px;
    }

    .artistAlbumRowCover {
        width: 72px;
        height: 72px;
    }
}

/* =====================================================
   YOUR LIBRARY — RECENT + PERSONAL LISTS
===================================================== */

.libraryRecentScreen,
.personalListsScreen {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;

    margin: 0 auto;

    padding:
        8px
        22px
        calc(
            var(--miniPlayerHeight, 54px) +
            var(--bottomMenuHeight, 50px) +
            var(--nativeBottomInset, 46px) +
            32px
        );
}

.libraryRecentScreen
#listeningHistoryList {
    width: 100%;
    padding: 0;
    gap: 8px;
}

.libraryRecentScreen
.historyItem {
    box-sizing: border-box;
    width: 100%;

    display: grid;
    grid-template-columns:
        72px
        minmax(0, 1fr);

    align-items: center;
    gap: 13px;

    padding: 4px 0;
}

.libraryRecentScreen
.historyCover {
    width: 72px;
    height: 72px;
    flex: none;
    border-radius: 4px;
}

.libraryRecentScreen
.historyTitle {
    font-size: 15px;
    font-weight: 450;
    line-height: 19px;
}

.libraryRecentScreen
.historySubtitle {
    font-size: 11px;
    line-height: 15px;
}

#personalListsContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.personalListRow {
    box-sizing: border-box;
    width: 100%;

    padding: 5px 0;

    border: 0;
    background: transparent;
    color: #fff;

    display: grid;
    grid-template-columns:
        64px
        minmax(0, 1fr);

    align-items: center;
    gap: 13px;

    text-align: left;
    cursor: pointer;
}

.personalListArtwork {
    width: 64px;
    height: 64px;

    border-radius: 5px;
    background: #242424;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--mainTheme);
}

.personalListArtwork .svgIcon,
.personalListArtwork svg {
    width: 30px;
    height: 30px;
    margin: 0;
    color: currentColor;
    fill: currentColor;
}

.personalListInformation {
    min-width: 0;
}

.personalListName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 450;
    line-height: 19px;
}

.personalListMeta {
    margin-top: 3px;

    color: rgba(255,255,255,.55);
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    line-height: 15px;
}

.personalListsEmpty,
.personalListsLoading {
    min-height: 240px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: rgba(255,255,255,.55);
    text-align: center;
}

.personalListsEmpty strong {
    color: #fff;
    font-size: 17px;
    font-weight: 550;
}

.personalListsEmpty span {
    margin-top: 7px;
    font-size: 12px;
}

.personalListsOfflineNotice {
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255,183,77,.28);
    border-radius: 10px;
    background: rgba(255,183,77,.08);
    color: #e9c27d;
    font-size: 11px;
    line-height: 15px;
}

.personalListsRetry {
    min-height: 44px;
    margin-top: 18px;
    padding: 0 18px;
    border: 1px solid var(--mainTheme);
    border-radius: 22px;
    background: transparent;
    color: var(--mainTheme);
    font: inherit;
    font-weight: 650;
}

/* ---------- CREATE LIST MODAL ---------- */

.createListModal {
    position: fixed;
    inset: 0;

    z-index: 200500;

    background: rgba(0,0,0,.72);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 22px;

    transition:
        opacity .2s ease,
        visibility .2s ease;
}

.createListModal.closed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.createListModal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.createListDialog {
    position: relative;

    box-sizing: border-box;
    width: min(100%, 330px);

    padding: 25px 22px 20px;

    border: 1px solid #303030;
    border-radius: 18px;

    background: #171717;
    color: #fff;

    box-shadow:
        0 24px 70px
        rgba(0,0,0,.55);

    transform: scale(.96);
    transition: transform .2s ease;
}

.createListModal.open
.createListDialog {
    transform: scale(1);
}

.createListDialog h2 {
    margin: 0 38px 22px 0;

    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 600;
}

.createListDialog label {
    display: block;

    margin-bottom: 7px;

    color: rgba(255,255,255,.62);
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
}

#createListName {
    box-sizing: border-box;
    width: 100%;
    height: 46px;

    padding: 0 14px;

    border: 1px solid #343434;
    border-radius: 10px;
    outline: none;

    background: #0e0e0e;
    color: #fff;
    caret-color: var(--mainTheme);

    font-family: "Montserrat", sans-serif;
    font-size: 15px;
}

#createListName:focus {
    border-color: var(--mainTheme);
}

.createListClose {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 34px;
    height: 34px;

    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.7);

    display: flex;
    align-items: center;
    justify-content: center;
}

.createListClose .svgIcon,
.createListClose svg {
    width: 26px;
    height: 26px;
    margin: 0;
    color: currentColor;
    fill: currentColor;
}

.createListError {
    min-height: 18px;
    margin-top: 7px;

    color: #ff6d6d;
    font-size: 11px;
    line-height: 16px;
}

.createListActions {
    margin-top: 10px;

    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.createListActions button {
    min-width: 92px;
    height: 38px;

    padding: 0 15px;

    border-radius: 999px;

    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.createListSecondary {
    border: 1px solid #3a3a3a;
    background: transparent;
    color: #fff;
}

.createListPrimary {
    border: 0;
    background: var(--mainTheme);
    color: #071014;
}

.createListPrimary:disabled {
    opacity: .55;
}

/* =====================================================
   PERSONAL LIST DETAIL — SAME STYLE AS LIBRARY RECENT
===================================================== */

.personalListDetailScreen {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;

    margin: 0 auto;

    padding:
        8px
        22px
        calc(
            var(--miniPlayerHeight, 54px) +
            var(--bottomMenuHeight, 50px) +
            var(--nativeBottomInset, 46px) +
            34px
        );
}

.personalListDetailTitle {
    margin: 0 0 10px;

    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
}

.personalListTrackList {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.personalListTrackItem {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;

    padding: 4px 0;

    border: 0;
    background: transparent;
    color: #fff;

    display: grid;
    grid-template-columns:
        72px
        minmax(0, 1fr)
        42px;

    align-items: center;
    gap: 13px;

    text-align: left;
    cursor: pointer;
}

.personalListTrackCover {
    width: 72px;
    height: 72px;

    border-radius: 4px;
    object-fit: cover;
}

.personalListTrackInfo {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.personalListTrackTitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 19px;
}

.personalListTrackSubtitle {
    margin-top: 3px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: rgba(255,255,255,.55);
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    line-height: 15px;
}

.personalListTrackItem:active {
    transform: scale(.985);
}

.personalListTrackRemove,
.personalListDeleteButton {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255,255,255,.58);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.personalListTrackRemove:active,
.personalListDeleteButton:active {
    color: #ff6b72;
    background: rgba(255,107,114,.12);
    transform: scale(.94);
}

.personalListDeleteIcon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.personalListFixedTitle {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.personalListFavoriteTitleIcon {
    width: 25px;
    height: 25px;
    color: var(--mainTheme);
}

.personalListFavoriteTitleIcon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.personalListConfirmModal {
    position: fixed;
    inset: 0;
    z-index: 210000;
    padding: max(22px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
    background: rgba(0,0,0,.74);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.personalListConfirmModal.closed { display: none; }

.personalListConfirmDialog {
    box-sizing: border-box;
    width: min(100%, 390px);
    padding: 24px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    background: #171717;
    color: #fff;
    box-shadow: 0 24px 70px rgba(0,0,0,.5);
}

.personalListConfirmDialog h2 { margin: 0 0 10px; font-size: 20px; }
.personalListConfirmDialog p { margin: 0; color: rgba(255,255,255,.7); line-height: 1.5; }
.personalListConfirmActions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 10px; }
.personalListConfirmActions button { min-height: 44px; padding: 0 17px; border-radius: 22px; border: 1px solid rgba(255,255,255,.18); color: #fff; background: transparent; font-weight: 650; }
#personalListConfirmAccept { border-color: #df5159; background: #df5159; }

@media (max-width: 370px) {
    .personalListDetailScreen {
        padding-left: 18px;
        padding-right: 18px;
    }

    .personalListTrackItem {
        grid-template-columns:
            66px
            minmax(0, 1fr);
    }

    .personalListTrackCover {
        width: 66px;
        height: 66px;
    }
}

/* =====================================================
   PERSONAL LIST COVER — FIRST TRACK
===================================================== */

.personalListArtwork {
    overflow: hidden;
}

.personalListArtworkImage {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.personalListArtworkFallback {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   FINAL POSITION FIX — LIST CONTROLS + ALBUM DOTS
===================================================== */

/* ---------- PERSONAL LIST HEADER ---------- */

.personalListDetailTopRow {
    width: 100%;
    margin-bottom: 10px;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 12px;
}

.personalListDetailTopRow .personalListDetailTitle {
    min-width: 0;
    margin: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personalListPlaybackActions {
    justify-self: end;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.personalListShuffleButton,
.personalListPlayButton {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    touch-action: manipulation;
}

.personalListShuffleButton {
    width: 36px;
    height: 36px;
    color: rgba(255,255,255,.9);
}

.personalListShuffleButton .svgIcon,
.personalListShuffleButton svg {
    width: 23px;
    height: 23px;
    margin: 0;
    color: currentColor;
    fill: currentColor;
}

.personalListShuffleButton.active {
    color: var(--mainTheme);
}

.personalListPlayButton {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;

    border-radius: 50%;
    color: var(--mainTheme);
    overflow: hidden;
}

#personalListPlayIcon,
#personalListPlayIcon .svgIcon,
#personalListPlayIcon svg {
    display: block;

    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;

    margin: 0;
    padding: 0;

    color: currentColor;
    fill: currentColor;
    line-height: 0;
    pointer-events: none;
}

.personalListShuffleButton:active,
.personalListPlayButton:active {
    transform: scale(.94);
}

/* ---------- ALBUM TRACK ROW ---------- */

.spotifyAlbumTrackCompact {
    grid-template-columns:
        minmax(0, 1fr)
        auto
        36px
        32px;

    gap: 8px;
}

.spotifyAlbumTrackFavorite {
    width: 36px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotifyAlbumTrackFavorite svg {
    width: 21px;
    height: 21px;
    fill: transparent;
    stroke: currentColor;
}

.spotifyAlbumTrackFavorite:not(.active),
.spotifyAlbumTrackFavorite:not(.active) svg,
.spotifyAlbumTrackFavorite:not(.active) svg * {
    color: #fff !important;
    fill: #fff !important;
}

.spotifyAlbumTrackFavorite.active,
.spotifyAlbumTrackFavorite.active svg,
.spotifyAlbumTrackFavorite.active svg * {
    color: #e85d68 !important;
    fill: #e85d68 !important;
}
.personalListRowFavorites .personalListArtwork { color: var(--mainTheme); background: color-mix(in srgb, var(--mainTheme) 20%, #242424); }

.spotifyAlbumTrackDuration {
    width: auto;
    min-width: 36px;
    justify-self: end;
}

.spotifyAlbumTrackDots {
    width: 32px;
    height: 40px;
    justify-self: end;

    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.56);

    display: flex;
    align-items: center;
    justify-content: flex-end;

    cursor: pointer;
    touch-action: manipulation;
}

.spotifyAlbumTrackDots .svgIcon,
.spotifyAlbumTrackDots svg {
    display: block;

    width: 22px;
    height: 22px;

    margin: 0;

    color: currentColor;
    fill: currentColor;
}

.spotifyAlbumTrackDots:active {
    color: var(--mainTheme);
    transform: scale(.9);
}

/* =====================================================
   PERSONAL LISTS — LONG PRESS DRAG REORDER
===================================================== */

#personalListsContainer {
    position: relative;
}

.personalListRow {
    position: relative;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;

    transition:
        transform .18s ease,
        opacity .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.personalListsReordering
.personalListRow:not(.personalListDragging) {
    transition:
        transform .18s ease;
}

.personalListRow.personalListDragging {
    z-index: 30;

    opacity: .96;
    transform: scale(1.025);

    border-radius: 8px;
    background:
        rgba(
            255,
            255,
            255,
            .075
        );

    box-shadow:
        0 14px 34px
        rgba(
            0,
            0,
            0,
            .42
        );

    touch-action: none;
}

body.personalListDragActive {
    overscroll-behavior: none;
}

body.personalListDragActive
#personalListsContainer {
    touch-action: none;
}
.spotifyAlbumArtist {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.spotifyAlbumArtistText {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.spotifyAlbumArtistName {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
}

.spotifyAlbumMetadataInline {
    display: flex;
    align-items: center;
    gap: 4px;

    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
}

/* =====================================================
   PERSONAL LIST PLAY — OPTICAL ALIGNMENT, FINAL
===================================================== */

/*
 * Movem el contenidor complet. El selector anterior sobre
 * l'SVG podia quedar anul·lat per les regles internes de la icona.
 */
#personalListPlayIcon {
    position: relative;
    top: -4px;
}

#personalListPlayIcon.isPlaying {
    top: 0;
}

/*
 * Neutralitzem transforms antics sobre l'SVG perquè no se sumin.
 */
#personalListPlayIcon .svgIcon,
#personalListPlayIcon svg {
    transform: none !important;
}

/* =====================================================
   LIBRARY ARTISTS — SAME ROW SYSTEM AS ALBUMS
===================================================== */

.libraryArtistsSection {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding:
        8px
        22px
        calc(
            var(--miniPlayerHeight, 54px) +
            var(--bottomMenuHeight, 50px) +
            var(--nativeBottomInset, 46px) +
            32px
        );
    color: #fff;
}

.libraryArtistList {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.libraryArtistRow {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #fff;

    display: grid;
    grid-template-columns:
        78px
        minmax(0, 1fr);

    align-items: center;
    gap: 12px;

    font: inherit;
    text-align: left;
    cursor: pointer;
}

.libraryArtistRowImage {
    display: block;
    width: 78px;
    height: 78px;
    border-radius: 5px;
    object-fit: cover;

    box-shadow:
        0
        7px
        18px
        rgba(
            0,
            0,
            0,
            .26
        );
}

.libraryArtistRowInformation {
    min-width: 0;
}

.libraryArtistRowName {
    overflow: hidden;
    color: #fff;

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 15px;
    font-weight: 400;
    line-height: 19px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.libraryArtistRow:active {
    transform: scale(.985);
}

@media (max-width: 370px) {
    .libraryArtistsSection {
        padding-left: 18px;
        padding-right: 18px;
    }

    .libraryArtistRow {
        grid-template-columns:
            72px
            minmax(0, 1fr);

        gap: 11px;
    }

    .libraryArtistRowImage {
        width: 72px;
        height: 72px;
    }
}

/* =====================================================
   ARTIST BIOGRAPHY — AUTOMATIC LOCAL CACHE
===================================================== */

.artistBiographySection {
    box-sizing: border-box;
    width: calc(100% - 28px);
    max-width: 492px;

    margin:
        -132px
        auto
        150px;

    padding:
        14px
        15px
        12px;

    border:
        1px
        solid
        rgba(
            255,
            255,
            255,
            .055
        );

    border-radius: 4px;

    background:
        rgba(
            255,
            255,
            255,
            .115
        );

    color:
        rgba(
            255,
            255,
            255,
            .82
        );

    box-shadow:
        0
        10px
        28px
        rgba(
            0,
            0,
            0,
            .18
        );
}

.artistBiographySection[hidden] {
    display: none;
}

.artistBiographyText {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient:
        vertical;
    -webkit-line-clamp: 7;
        color:rgba( 255, 255, 255, .78  );

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 18px;
    font-weight: 420;
    line-height: 1.42;

    white-space: pre-line;
}

.artistBiographyText.expanded {
    display: block;
    overflow: visible;

    -webkit-line-clamp:
        unset;
}

.artistBiographyFooter {
    margin-top: 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.artistBiographyToggle,
.artistBiographySource {
    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;

    color:
        var(
            --mainTheme
        );

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 10px;
    font-weight: 600;
    line-height: 14px;

    text-decoration: none;
    cursor: pointer;
}

.artistBiographySource {
    margin-left: auto;

    color:
        rgba(
            255,
            255,
            255,
            .48
        );
}

.artistBiographyToggle[hidden],
.artistBiographySource[hidden] {
    display: none;
}

@media (max-width: 370px) {
    .artistBiographySection {
        width: calc(100% - 24px);
        padding:
            13px
            13px
            11px;
    }

    .artistBiographyText {
        font-size: 17px;
    }
}


/* =====================================================
   ARTIST HERO — REMOVE FINAL TOP STRIP
===================================================== */

#artistStickyHeader {
    margin-top: -8px !important;
}

/* =====================================================
   PERSONAL LIST — BIGGER SHUFFLE + CLICKABLE TITLE
===================================================== */

.personalListPlaybackActions {
    gap: 2px !important;
}

.personalListShuffleButton {
    width: 42px !important;
    height: 42px !important;
}

.personalListShuffleButton .svgIcon,
.personalListShuffleButton svg {
    width: 29px !important;
    height: 29px !important;
}

.personalListRenameButton {
    display: block;
    width: 100%;
    min-width: 0;

    margin: 0 !important;
    padding: 0 !important;

    border: 0;
    background: transparent;

    color: #fff;
    font: inherit;
    text-align: left;

    cursor: pointer;
    touch-action: manipulation;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personalListRenameButton:active {
    opacity: .7;
}

/* =====================================================
   PERSONAL LIST — FINAL HEADER CONTROLS + INLINE RENAME
===================================================== */

.personalListDetailTopRow {
    grid-template-columns:
        minmax(0, 1fr)
        auto !important;
    gap: 8px !important;
}

.personalListPlaybackActions {
    gap: 0 !important;
}

.personalListShuffleButton {
    width: 38px !important;
    height: 38px !important;
    margin-right: -3px !important;
}

.personalListShuffleButton .svgIcon,
.personalListShuffleButton svg {
    width: 28px !important;
    height: 28px !important;
}

.personalListPlayButton {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex: 0 0 40px !important;
}

#personalListPlayIcon,
#personalListPlayIcon .svgIcon,
#personalListPlayIcon svg {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

#personalListPlayIcon {
    top: -2px !important;
}

#personalListPlayIcon.isPlaying {
    top: 0 !important;
}

.personalListTitleRow {
    min-width: 0;
    display: flex;
    align-items: center;
}

.personalListRenameButton {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;
    color: #fff;

    display: flex;
    align-items: center;
    gap: 9px;

    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
}

.personalListRenameIcon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    line-height: 0;
}

.personalListRenameIcon .svgIcon,
.personalListRenameIcon svg {
    display: block;
    width: 25px;
    height: 25px;
    margin: 0;
    color: currentColor;
    fill: currentColor;
}

.personalListRenameText {
    min-width: 0;
    margin: 0 !important;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personalListRenameInput {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 40px;

    margin: 0;
    padding: 4px 9px;

    border:
        1px
        solid
        var(
            --mainTheme
        );

    border-radius: 7px;
    outline: none;

    background:
        rgba(
            255,
            255,
            255,
            .08
        );

    color: #fff;
    caret-color:
        var(
            --mainTheme
        );

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
}

.personalListRenameInput.invalid {
    border-color: #ff6868;
}

.personalListRenameInput:disabled {
    opacity: .58;
}

/* =====================================================
   PODCASTS — SAME ROW SYSTEM AS MUSIC
===================================================== */
.podcastLibrarySection {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 8px 22px calc(var(--miniPlayerHeight,54px) + var(--bottomMenuHeight,50px) + var(--nativeBottomInset,46px) + 32px);
    color: #fff;
}
.podcastLibraryList { width:100%; display:flex; flex-direction:column; gap:4px; }
.podcastLibraryRow {
    box-sizing:border-box; width:100%; min-width:0; margin:0; padding:6px 0; border:0;
    background:transparent; color:#fff; display:grid;
    grid-template-columns:78px minmax(0,1fr) auto; align-items:center; gap:12px;
    font:inherit; text-align:left; cursor:pointer;
}
.podcastLibraryRowImage {
    display:block; width:78px; height:78px; border-radius:5px; object-fit:cover;
    background:transparent; box-shadow:0 7px 18px rgba(0,0,0,.26);
}
.podcastLibraryRowInformation { min-width:0; }
.podcastLibraryRowTitle {
    overflow:hidden; color:#fff; font-family:"Montserrat",sans-serif; font-size:15px;
    font-weight:450; line-height:19px; text-overflow:ellipsis; white-space:nowrap;
}
.podcastLibraryRowSubtitle {
    margin-top:3px; overflow:hidden; color:rgba(255,255,255,.56);
    font-family:"Montserrat",sans-serif; font-size:11px; font-weight:420;
    line-height:15px; text-overflow:ellipsis; white-space:nowrap;
}
.podcastLibraryRowDuration {
    min-width:38px; justify-self:end; color:rgba(255,255,255,.48);
    font-family:"Montserrat",sans-serif; font-size:11px; line-height:15px;
    text-align:right; white-space:nowrap;
}
.podcastLibraryRow:active { transform:scale(.985); }
@media (max-width:370px) {
    .podcastLibrarySection { padding-left:18px; padding-right:18px; }
    .podcastLibraryRow { grid-template-columns:72px minmax(0,1fr) auto; gap:11px; }
    .podcastLibraryRowImage { width:72px; height:72px; }
}
