/* Fuentes kawaii y colores pastel */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;700&display=swap');

body {
    font-family: 'Baloo 2', cursive;
    max-width: 600px;
    margin: 40px auto;
    background: linear-gradient(135deg, #fce4ec, #e1f5fe);
    color: #333;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Encabezado */
h1 {
    text-align: center;
    color: #f06292;
    text-shadow: 2px 2px #fff3e0;
    font-size: 2.2rem;
    margin-bottom: 25px;
}

/* Subtítulos (Canción actual, Cola, Añadir) */
h3 {
    font-size: 1.4rem;
    color: #444;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Sección de canción actual */
.current-song-container {
    background-color: #fff0f5;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(240, 128, 128, 0.2);
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

/* Canción actual con scroll si es necesario */
#currentSong.scroll-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
}

#currentSong.scroll-container span {
    display: inline-block;
    padding-left: 100%;
}

#currentSong.scroll-container.scrolling span {
    animation: scroll-text var(--scroll-duration, 10s) linear infinite;
    font-size: 2rem;
}

/* Lista de canciones */
ul#queue {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}

ul#queue li {
    margin-bottom: 10px;
    padding: 12px;
    font-size: 1rem;
    background-color: #ffe4e1;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    text-align: center;

    /* Scroll inteligente */
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

ul#queue li span {
    display: inline-block;
    padding-left: 100%;
    font-size: 2rem;
}

ul#queue li.scrolling span {
    animation: scroll-text var(--scroll-duration, 10s) linear infinite;
}

/* Formulario */
form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input[type="text"] {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #f8bbd0;
    border-radius: 15px;
    outline: none;
    transition: border 0.3s;
}

input[type="text"]:focus {
    border-color: #f06292;
}

button {
    padding: 12px;
    border: none;
    background-color: #f48fb1;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #f06292;
    transform: scale(1.05);
}

/* Audio player */
audio {
    width: 100%;
    margin-top: 10px;
    border-radius: 15px;
}

/* --- Notificaciones kawaii con confeti --- */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffe0f0, #ffd1e8);
    color: #ff69b4;
    border: 2px solid #ffb6c1;
    border-radius: 15px;
    padding: 12px 20px;
    font-family: 'Baloo 2', cursive;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: visible;
}

.notification::before {
    content: "🎵";
    font-size: 20px;
    animation: sparkle 1s infinite alternate;
}

.notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: translateY(-50px) scale(0.8); opacity: 0; }
    60% { transform: translateY(10px) scale(1.1); opacity: 1; }
    80% { transform: translateY(-5px) scale(0.95); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes sparkle {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.2); }
    100% { transform: rotate(-10deg) scale(1); }
}

.notification .confetti {
    position: absolute;
    top: -10px;
    font-size: 16px;
    opacity: 0.8;
    animation: fall 1.5s linear infinite;
}

.notification .confetti:nth-child(1) { left: 10%; animation-delay: 0s; }
.notification .confetti:nth-child(2) { left: 30%; animation-delay: 0.2s; }
.notification .confetti:nth-child(3) { left: 50%; animation-delay: 0.4s; }
.notification .confetti:nth-child(4) { left: 70%; animation-delay: 0.6s; }
.notification .confetti:nth-child(5) { left: 90%; animation-delay: 0.8s; }

@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(10px) rotate(15deg); opacity: 0.8; }
    100% { transform: translateY(20px) rotate(-15deg); opacity: 0; }
}

/* --- Media queries para móviles --- */
@media (max-width: 768px) {
    body {
        max-width: 100%;
        margin: 0;
        padding: 25px 15px;
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 1.3rem;
    }

    .current-song-container {
        font-size: 1.4rem;
        padding: 20px;
    }

    #currentSong.scroll-container {
        font-size: 2rem;
    }

    ul#queue li {
        font-size: 1.2rem;
        padding: 14px;
    }

    input[type="text"] {
        font-size: 1.1rem;
        padding: 14px;
    }

    button {
        font-size: 1.2rem;
        padding: 14px;
        border-radius: 18px;
    }
}

/* --- Animación scroll global --- */
@keyframes scroll-text {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}
