/* Variables de colores */
:root {
    --background-color: #121212;
    --sidebar-color: #181818;
    --highlight-color: #1DB954;
    --hover-color: #282828;
    --text-color: white;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    overflow-x: hidden; /* Evita scroll horizontal */
}

#app {
    display: flex;
    width: 100%;
    height: 100vh;
}

#sidebar {
    width: 600px;
    max-width: 100%; /* Se ajusta a la pantalla */
    background-color: var(--sidebar-color);
    padding: 20px;
    order: -1; /* Lo mueve arriba del main */
    text-align: center; /* Centra el contenido */
    box-sizing: border-box; /* Evita que el padding aumente el tamaño */
}

#sidebar h1 {
    font-size: 30px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--highlight-color);
    filter: drop-shadow(1px 1px 20px rgb(200, 255, 1));
}

aside img {
    display: block;
    margin: 100px auto; /* Centrado horizontal */
    max-width: 100%;
    height: auto;
    filter: drop-shadow(1px 1px 20px white);
}

#main-content {
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 50px;
}

#audio-player {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
}

#controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 15px;
    background: var(--highlight-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: #1ed760;
    transform: scale(1.05);
}

#visualizer {
    margin-top: 20px;
    background-color: black;
    width: 100%; /* Asegura que no se desborde */
    max-width: 90vw; /* Se ajusta a la pantalla */
    height: auto;
}

#playlist-container {
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 767.98px) {
    #app {
        flex-direction: column;
        height: auto;
    }

    #sidebar {
        width: 100%;
        max-width: 100%;
        padding: 15px; /* Reduce el padding */
    }

    #visualizer {
        width: 100%;
        max-width: 90vw; /* Se ajusta a la pantalla */
        height: auto;
    }
}

#playlist {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    width: 100%;
    filter: drop-shadow(1px 1px 20px rgb(128, 117, 117));
}

#playlist li {
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 5px;
    background-color: var(--sidebar-color);
    margin-bottom: 5px;
}

#playlist li:hover {
    background-color: var(--hover-color);
}

.btn-primary {
    filter: drop-shadow(1px 1px 5px rgb(118, 148, 233));
}

.btn-success {
    filter: drop-shadow(1px 1px 5px rgb(118, 233, 148));
}

.btn-warning {
    filter: drop-shadow(1px 1px 5px rgb(233, 148, 118));
}

.btn-danger {
    filter: drop-shadow(1px 1px 5px rgb(233, 118, 148));
}

#playlist li.active {
    background-color: var(--hover-color);
    font-weight: bold;
    color: #1DB954;
}

.dash {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: dashAnim 4s linear infinite, colorChange 1s infinite alternate;
}

@keyframes dashAnim {
    0% { stroke-dashoffset: 300; }
    100% { stroke-dashoffset: 0; }
}

@keyframes colorChange {
    0% { stroke: #FF5733; }
    50% { stroke: #daff33; }
    100% { stroke: #5733FF; }
}

svg a {
    pointer-events: all;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .dash {
        font-size: 6vw !important; /* Aumenta el tamaño en móviles */
        stroke-width: 3 !important; /* Reduce el grosor del trazo */
    }
}
