/* Estilo Global */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Contenedor Principal */
#app {
    width: 100%;
    max-width: 1000px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Título */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1DB954; /* Verde Spotify */
}

/* Contenido */
#content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

/* Lista de Reproducción */
#playlist-container {
    flex: 1;
    max-width: 40%;
    background-color: #181818;
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    max-height: 400px; /* Añade un límite de altura para la lista */
}

#playlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

#playlist li {
    padding: 15px 10px;
    border-bottom: 1px solid #282828;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s;
}

#playlist li:hover {
    background-color: #282828;
}

#playlist li.active {
    background-color: #1DB954;
    color: #fff;
    font-weight: bold;
}

/* Letras de la Canción */
#lyrics-container {
    flex: 2;
    max-width: 55%;
    background-color: #181818;
    padding: 20px;
    border-radius: 8px;
    color: #b3b3b3;
    overflow-y: auto;
    max-height: 400px; /* Añade un límite de altura para las letras */
}

#lyrics {
    white-space: pre-wrap; /* Mantener los saltos de línea en las letras */
}

/* Barra de Reproducción */
#player {
    position: fixed;
    bottom: 20px; /* Subimos la barra de reproducción */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background: #181818;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    gap: 10px;
    border-radius: 8px;
}

button {
    background: none;
    border: none;
    color: #1DB954;
    cursor: pointer;
    transition: color 0.3s;
}

button img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* Hace los iconos visibles en el fondo oscuro */
}

button:hover img {
    filter: brightness(0) invert(1.5);
}

input[type="range"] {
    flex: 1;
    margin: 0 10px;
    appearance: none;
    background: #282828;
    border-radius: 5px;
    height: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1DB954;
    cursor: pointer;
}

#time {
    font-size: 12px;
    color: #b3b3b3;
}

/* Contenedor de Volumen */
#volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

#volume-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* Ícono visible sobre fondo oscuro */
}

#volume {
    width: 80px;
}

/* Responsivo */
@media (max-width: 600px) {
    #player {
        flex-direction: column;
        bottom: 15px; /* Ajustamos para móviles */
        padding: 10px;
    }

    input[type="range"] {
        width: 100%;
        margin: 10px 0;
    }

    button img {
        width: 28px; /* Ajustamos el tamaño de los iconos en pantallas pequeñas */
    }

    #time {
        margin-top: 5px;
    }

    #content {
        flex-direction: column;
    }

    #playlist-container,
    #lyrics-container {
        max-width: 100%;
    }
}
