*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    font-family:'Montserrat',sans-serif;

    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    overflow:auto;

    background:#050505;

    transition:
    background 1s ease;

    position:relative;
}

.dynamic-bg{

    position:fixed;

    inset:0;

    background-size:cover;
    background-position:center;

    filter:blur(90px);

    transform:scale(1.4);

    opacity:.38;

    z-index:0;

    transition:
        background-image 2s ease,
        background 2s ease,
        opacity 1.5s ease;

    animation:
        ambientMove 26s infinite alternate ease-in-out;
}


.cinematic-overlay{

    position:fixed;

    inset:0;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.04),
            rgba(0,0,0,.82)
        );

    z-index:1;

    pointer-events:none;
}

@keyframes ambientMove{

    from{

        transform:
        scale(1.2)
        translate(-20px,-20px);

    }

    to{

        transform:
        scale(1.35)
        translate(20px,20px);

    }

}

.player{

    width:100%;
    max-width:none;

    padding:40px 40px 24px;

    border-radius:38px;

    display:flex;
    flex-direction:column;

    align-items:center;

    gap:28px;

    overflow:hidden;

    backdrop-filter:blur(30px);

    background:rgba(15,15,15,.55);

    border:1px solid rgba(255,255,255,.08);

    box-shadow:0 25px 80px rgba(0,0,0,.45);

    position:relative;

    z-index:2;

    isolation:isolate;
}

.main-content{

    width:100%;

    display:grid;

    grid-template-columns:
    minmax(240px, 1fr)
    minmax(360px, 1.2fr);

    align-items:center;

    gap:50px;

}

.left-side{

    display:flex;

    justify-content:center;

    align-items:center;

}

.center-side{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    min-width:0;

}

#cover{

    width:290px;

    height:290px;

    object-fit:cover;

    border-radius:32px;

    box-shadow:
    0 20px 60px rgba(0,0,0,.5);

    transition:
    transform .4s ease;

    position:relative;

    z-index:2;
}

.cover-animate{

    transform:scale(1.03);
    opacity:.85;
}

.meta h2{

    font-size:42px;

    font-weight:800;

    color:#ff4d4d;

    margin-bottom:10px;

    line-height:1.1;
}

.meta p{

    color:#d0d0d0;

    font-size:24px;

    margin-bottom:20px;
}

audio{

    width:100%;

    max-width:420px;

    margin-top:10px;

    border-radius:30px;
}

.visualizer{

    margin-top:24px;

    display:flex;

    justify-content:center;

    align-items:flex-end;

    gap:6px;

    height:70px;
}

.visualizer span{

    width:8px;

    height:15px;

    background:
    linear-gradient(
        to top,
        #b30000,
        #ff4d4d
    );

    border-radius:30px;

    transition:
    height .08s linear,
    opacity .08s linear;

    box-shadow:
    0 0 18px rgba(255,77,77,.45);
}

.buttons{

    margin-top:18px;

    display:flex;

    justify-content:center;

    gap:18px;
}

.vote{

    width:64px;
    height:64px;

    border:none;

    border-radius:50%;

    font-size:24px;

    cursor:pointer;

    transition:.3s;

    color:white;
}

.like{

    background:white;

    color:#ff2d2d;

    box-shadow:
    0 0 22px rgba(255,255,255,.18);
}

.dislike{

    background:
    linear-gradient(
        135deg,
        #444,
        #666
    );
}

.vote:hover{

    transform:scale(1.12);
}

.vote:active{

    transform:scale(.95);
}

#thanks{

    margin-top:14px;

    color:#ff5c7a;

    font-size:14px;

    line-height:1.6;

    min-height:40px;
}

.station{

    margin-top:18px;

    color:#9e9e9e;

    font-size:12px;

    letter-spacing:3px;

    text-transform:uppercase;
}

.fade-in{

    animation:fade .7s ease;
}

@keyframes fade{

    from{
        opacity:0;
        transform:translateY(10px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media(max-width:980px){

    body{
        padding:0;
        overflow:auto;
    }


    .player{

        width:100%;

        padding:28px;

        border-radius:30px;

    }


    .main-content{

        grid-template-columns:1fr;

        gap:28px;

    }


    #cover{

        width:240px;

        height:240px;

    }


    .meta h2{

        font-size:28px;

    }


    .meta p{

        font-size:18px;

    }


    #historyList{

        grid-template-columns:
        repeat(2, minmax(0, 1fr));

    }

}

@media(max-width:560px){

    body{
        padding:0;
    }


    .player{

        padding:20px;

        border-radius:24px;

    }


    #cover{

        width:210px;

        height:210px;

    }


    .meta h2{

        font-size:25px;

    }


    .meta p{

        font-size:16px;

    }


    #historyList{

        grid-template-columns:1fr;

    }


    #historyList li{

        min-height:68px;

    }

}

.history{

    width:100%;

    padding-top:8px;

    border-top:
    1px solid rgba(255,255,255,.06);

}


.history h3{

    color:#ffffff;

    font-size:12px;

    letter-spacing:2px;

    opacity:.65;

    margin-bottom:16px;

    text-align:center;

}


#historyList{

    width:100%;

    list-style:none;

    display:grid;

    grid-template-columns:
    repeat(5, minmax(0, 1fr));

    gap:12px;

}


#historyList li{

    min-width:0;

    min-height:72px;

    display:flex;

    align-items:center;

    gap:10px;

    padding:9px;

    border-radius:14px;

    background:
    rgba(255,255,255,.055);

    border:
    1px solid rgba(255,255,255,.05);

    color:#e0e0e0;

    backdrop-filter:blur(8px);

    transition:
    transform .25s ease,
    background .25s ease;

    overflow:hidden;

}


#historyList li:hover{

    transform:translateY(-2px);

    background:
    rgba(255,255,255,.09);

}


/* Mini car谩tula */

.history-cover{

    width:54px;

    height:54px;

    min-width:54px;

    object-fit:cover;

    border-radius:10px;

    box-shadow:
    0 5px 18px rgba(0,0,0,.35);

}


/* Texto de cada canci贸n */

.history-info{

    min-width:0;

    display:flex;

    flex-direction:column;

    justify-content:center;

}


.history-artist{

    color:#ffffff;

    font-size:11px;

    font-weight:600;

    line-height:1.25;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}


.history-song{

    color:#bdbdbd;

    font-size:10px;

    line-height:1.35;

    display:-webkit-box;

    -webkit-box-orient:vertical;

    -webkit-line-clamp:3;

    overflow:hidden;

}

/* =====================================================
   AJUSTE DEFINITIVO - MINI CARÁTULAS DEL HISTORIAL
===================================================== */

#historyList li .history-cover {

    width:54px !important;
    height:54px !important;

    min-width:54px !important;
    min-height:54px !important;

    max-width:54px !important;
    max-height:54px !important;

    object-fit:contain !important;

    border-radius:10px;

    flex:0 0 54px;

}


/* Evita que las tarjetas crezcan innecesariamente */

#historyList li {

    min-width:0 !important;

}


/* Tablet */

@media(max-width:980px){

    #historyList li .history-cover {

        width:48px !important;
        height:48px !important;

        min-width:48px !important;
        min-height:48px !important;

        max-width:48px !important;
        max-height:48px !important;

        flex:0 0 48px;

    }

}


/* Teléfono */

@media(max-width:560px){

    #historyList li .history-cover {

        width:46px !important;
        height:46px !important;

        min-width:46px !important;
        min-height:46px !important;

        max-width:46px !important;
        max-height:46px !important;

        flex:0 0 46px;

    }

}

/* =====================================================
   RESPONSIVE FINAL DEL HISTORIAL
===================================================== */

@media(max-width:980px){

    #historyList{
        grid-template-columns:
        repeat(2, minmax(0, 1fr));
    }

}


@media(max-width:560px){

    #historyList{
        grid-template-columns:1fr;
    }

}

/* =====================================================
   HISTORIAL MÓVIL - LISTA VERTICAL
===================================================== */

@media(max-width:560px){

    #historyList{
        display:grid;
        grid-template-columns:1fr;
        gap:8px;
    }

    #historyList li{
        min-height:0 !important;

        display:flex;
        align-items:center;
        justify-content:flex-start;

        gap:12px;

        padding:8px 10px;

        border-radius:12px;

        overflow:hidden;
    }

    #historyList li .history-cover{

        width:54px !important;
        height:54px !important;

        min-width:54px !important;
        min-height:54px !important;

        max-width:54px !important;
        max-height:54px !important;

        object-fit:contain !important;

        border-radius:8px;

        flex:0 0 54px;
    }

    .history-info{
        display:flex;
        min-width:0;

        flex-direction:column;
        justify-content:center;
        text-align:left;
    }

    .history-artist{
        font-size:12px;
        font-weight:600;

        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .history-song{
        font-size:11px;
        line-height:1.3;

        display:-webkit-box;
        -webkit-box-orient:vertical;
        -webkit-line-clamp:2;

        overflow:hidden;
    }
}