.player {
    background: black;
    width: 600px;
    max-height: 700px;
    border: 0.5px solid white;
    margin-right: 1rem;
}

.playlist {
    background: black;
    border: 0.5px solid white;
    padding: 20px;
    width: 400px;
    max-height: 800px;
}

.cover {
    width: 100%;
    max-height: 500px;
}

.info {
    padding: 20px;
    color: white;
}

.info h3 {
    margin: 10px 0 0;
    font-size: 20px;
}

.info p {
    margin-top: 2px;
    margin-bottom: 10px;
    font-size: 14px;
    color: white;
}

.volume-bar-container {
    width: 100px;
    height: 3px;
    background: rgb(99, 99, 99);
    position: relative;
    cursor: pointer;
    margin-left: 10px;
    border-radius: 2px;
}

.volume-bar {
    height: 100%;
    width: 50%; /* o lo que sea dinámico */
    background: white;
    transition: width 0.1s ease-in-out;
    border-radius: 2px;
    position: relative; /* clave para que ::after se posicione bien */
}

.volume-bar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
}
.progress {
    width: 100%;
    height: 3px;
    background: rgb(99, 99, 99);
    position: relative;
    cursor: pointer;
    border-radius: 2px;
}

#progress-bar2 {
    width: 100%;
    height: 3px;
    background: rgb(99, 99, 99);
    position: relative;
    cursor: pointer;
    border-radius: 2px;
}

.progress-bar {
    height: 100%;
    width: 0%; /* o lo que sea dinámico */
    background-color: white !important;
    transition: width 0.1s ease-in-out;
    border-radius: 2px;
    position: relative; /* clave para que ::after se posicione bien */
}

.progress-bar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background-color: white !important;
    border-radius: 50%;
}

.time {
    display: flex;
    justify-content: end;
    font-size: 12px;
    color: white;
    margin-top: 3px;
    margin-bottom: 5px;
}

.slash {
    margin: 0 5px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.controls .play {
    background: #ffffff;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    color: black;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    padding-right: 3px;
    margin-top: 10px;
}

.fa-pause {
    padding-right: 4px !important;
}

.fa-pause::before {
    height: 30px !important;
}

.controls .play:hover {
    background: white;
}

.playlist .cover-small {
    width: 100%;
    margin-bottom: 10px;
    height: 280px;
}

.actions {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    font-size: 18px;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: black;
}

.track .info {
    flex-grow: 1;
}

.track .info p {
    margin: 0;
}

.track .info span {
    font-size: 12px;
    color: white;
}

.icons {
    display: flex;
    gap: 10px;
    font-size: 16px;
    line-height: 1 !important;
}

.restart {
    cursor: pointer;
    margin-left: 10px;
    filter: invert(70%) sepia(0%) saturate(772%) hue-rotate(339deg)
        brightness(100%) contrast(90%);
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease-in-out;
}

.restart:hover {
    filter: invert(100%) sepia(0%) saturate(772%) hue-rotate(339deg)
        brightness(175%) contrast(105%);
}

.spotify {
    cursor: pointer;
    margin-left: 10px;
    filter: invert(100%) sepia(0%) saturate(772%) hue-rotate(339deg)
        brightness(175%) contrast(105%);
    width: 35px;
    height: 35px;
    transition: transform 0.3s ease-in-out;
}

.spotify:hover {
    filter: invert(100%) sepia(100%) saturate(1000%) hue-rotate(92deg)
        brightness(95%) contrast(90%);
}

.speaker {
    cursor: pointer;
    margin-left: 10px;
    color: #cfcfcf;
    transition: transform 0.3s ease-in-out;
}

.speaker:hover {
    color: white;
}

.mini-play {
    width: 30px;
    height: 30px;
    padding-top: 10px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    color: white;
}

/* Estilos para el grupo de control de volumen secundario */
.mini-volume-control-group {
    display: flex; /* Para alinear el icono y la barra horizontalmente */
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}

/* Estado inicial de la barra de volumen secundaria (oculta) */
.volume-bar-secondary {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.3s ease-in-out, opacity 0.3s ease-in-out;
    height: 3px;
    background: rgb(99, 99, 99);
    border-radius: 2px;
    margin-left: 5px;
    display: flex;
    align-items: center;
}

/* Efecto de hover: cuando se pasa el mouse sobre el grupo, muestra la barra */
.mini-volume-control-group:hover .volume-bar-secondary {
    width: 100px; /* Ancho deseado cuando está visible */
    opacity: 1; /* Completamente visible */
}

/* Asegurarse de que el contenido de la barra se muestre correctamente */
.volume-bar-secondary .volume-bar {
    height: 100%;
    width: 50%; /* O el valor inicial que quieras, esto es el llenado de la barra */
    background: white;
    border-radius: 2px;
    position: relative;
}

.volume-bar-secondary .volume-bar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
}

/* Opcional: Para el icono del parlante en la playlist */
.mini-speaker {
    cursor: pointer;
    color: #cfcfcf; /* O white, según prefieras por defecto */
    padding-bottom: 1px;
    gap: 5px;
    transition: transform 0.3s ease-in-out;
}

.mini-speaker:hover {
    color: white; /* Un ligero cambio al pasar el mouse sobre el parlante directamente */
}

/* Si quieres que el parlante esté blanco cuando la barra está visible */
.mini-volume-control-group:hover .mini-speaker {
    color: white;
}

.mini-spotify {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    color: white;
}

.mini-spotify:hover {
    /* verde spotify */
    color: #1db954;
}

@media screen and (max-width: 768px) {
    .player {
        width: 100%;
        max-width: 400px;
        margin-bottom: 20px;
        margin-right: 0;
    }

    .playlist {
        width: 100%;
        max-width: 400px;
    }

    .playlist .cover-small {
        height: auto;
    }
}

@media screen and (min-width: 768px) and (max-width: 1200px) {
    .player {
        width: 100%;
        max-width: 500px;
        margin-bottom: 20px;
        margin-right: 0;
    }

    .playlist {
        width: 100%;
        max-width: 500px;
        height: 800px;
    }

    .playlist .cover-small {
        height: auto;
    }
}

.track-active {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(49, 49, 49);
}
