:root {
    --azul-cielo: #87CEEB;
}

/* =========================
   ESTILOS GENERALES DEL SITIO
========================= */
body {
    background: #f4faff;
    background-image: url('https://musicaadventista.org/images/iasd1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* =========================
   FILTROS POR LETRA
========================= */
.letra-btn {
    padding: 4px 8px;
    margin: 2px;
    border: 1px solid var(--azul-cielo);
    text-decoration: none;
    color: #666;
    border-radius: 6px;
    font-size: 12px;
    display: inline-block;
    background: white;
    transition: 0.2s;
}

.letra-active {
    background: var(--azul-cielo);
    color: white !important;
}

/* =========================
   PLAYER
========================= */
.sticky-player {
    position: sticky;
    top: 120px;
    z-index: 10;
}

.circle-art {
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    animation: rotateCD 20s linear infinite paused;
}

.playing-art {
    animation-play-state: running;
}

@keyframes rotateCD {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.song-item {
    transition: 0.2s;
    cursor: pointer;
    border-radius: 8px;
}

.active-song {
    background: #e0f2ff !important;
    color: #0088cc !important;
    font-weight: bold;
    border-left: 4px solid var(--azul-cielo);
}

/* =========================
   ANIMACIÓN DE ONDAS
========================= */
.playing-waves {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
    margin-left: 5px;
}

.playing-waves span {
    background: var(--azul-cielo);
    width: 3px;
    border-radius: 1px;
    animation: wave 1s ease-in-out infinite;
}

.playing-waves span:nth-child(1) { animation-delay: 0s; }
.playing-waves span:nth-child(2) { animation-delay: 0.3s; }
.playing-waves span:nth-child(3) { animation-delay: 0.6s; }

@keyframes wave {
    0%, 100% { height: 4px; }
    50%      { height: 14px; }
}

/* =========================
   SWIPER / GALERÍA SUPERIOR
========================= */
.mySwiper {
    width: 100%;
    padding-bottom: 30px !important;
    min-height: 150px;
}

.mySwiper .swiper-slide {
    width: 140px !important;
}

.slider-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* =========================
   MÁS ÁLBUMES DEL ARTISTA
========================= */
.grid-musica {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tarjeta {
    background: #eee;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    width: 200px;
    display: flex;
    flex-direction: column;
}

.tarjeta:hover {
    background: #ddd;
}

.otros-artistas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

/* =========================
   CARD UNIVERSAL DE ÁLBUM
========================= */
.album-card {
    background: white;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: all .25s ease;
    height: 100%;
}

.album-card:hover {
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.album-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.album-title {
    font-size: 10px;
    font-weight: 700;
    color: #555;
    margin-top: 6px;
    line-height: 1.2;
}

.album-cat {
    font-size: 8px;
    font-weight: 800;
    color: #38bdf8;
    text-transform: uppercase;
}

/* =========================
   PAGINACIÓN
========================= */
.paginacion-container {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 8px;
    margin: 25px auto;
    padding: 0 10px;
}

.btn-pag {
    min-width: 35px;
    height: 35px;
    background: #fff;
    color: #3E8DA8;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    transition: 0.2s;
}

.btn-active {
    background: #3E8DA8 !important;
    color: #fff !important;
    border-color: #3E8DA8 !important;
}

.page-separator {
    display: flex;
    align-items: center;
    color: #999;
}

/* =========================
   BIO DEL ÁLBUM
========================= */
.album-bio-container {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #eef2f7;
    max-height: 150px;
    overflow-y: auto;
    text-align: left;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.bio-text {
    font-size: 11px !important;
    color: #555;
    line-height: 1.6;
    font-family: system-ui, -apple-system, sans-serif !important;
    text-align: justify;
    padding-right: 5px;
}

.bio-text strong {
    color: #3E8DA8;
    font-weight: 700;
    margin-right: 3px;
}

.album-bio-container::-webkit-scrollbar {
    width: 3px;
}

.album-bio-container::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 10px;
}

/* =========================
   DURACIÓN DE CANCIONES
========================= */
.track-duration {
    min-width: 35px;
    text-align: right;
    margin-left: 10px;
    background: #f8fafc;
    padding: 2px 4px;
    border-radius: 4px;
}

/* =========================
   FAVORITOS
========================= */
#lista-favoritos {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
}

.btn-fav {
    white-space: nowrap;
    min-width: fit-content;
    transition: all 0.3s ease;
}

.btn-fav.bg-red-50:hover {
    background-color: #fee2e2 !important;
}

/* =========================
   SWIPER INSTITUCIONES
========================= */
.swiper-instituciones {
    width: 100%;
    padding: 20px 0;
}

.swiper-instituciones .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-instituciones .swiper-slide img {
    max-width: 100%;
    height: auto;
    transition: 0.3s;
}

.swiper-instituciones .swiper-slide img:hover {
    filter: grayscale(0%);
}

/* =========================
   VOLUMEN Y CONTROLES
========================= */
#volume-control {
    min-width: 60px;
}

@media (min-width: 768px) {
    #volume-control {
        min-width: 0;
        max-width: none;
    }
}

#volume-control::-webkit-slider-thumb,
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.flex-grow {
    flex: 1 !important;
}

/* =========================
   MÓVIL
========================= */
@media (max-width: 768px) {
    body {
        padding-bottom: 180px !important;
        background-attachment: scroll;
    }

    .sticky-player {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        position: static !important;
    }

    .player-header-section {
        background: white !important;
        padding: 20px !important;
        border-radius: 24px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
        margin: 10px !important;
        display: block !important;
    }

    .controls-sticky-wrapper {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: white !important;
        opacity: 1 !important;
        padding: 15px 20px 30px 20px !important;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.2) !important;
        border-radius: 30px 30px 0 0 !important;
        z-index: 9999 !important;
        border-top: 2px solid var(--azul-cielo) !important;
    }

    .controls-sticky-wrapper .flex.items-center {
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    #playlistContent {
        display: none !important;
    }

    #playlistContent.active {
        display: block !important;
        position: fixed !important;
        bottom: 180px !important;
        left: 5% !important;
        width: 90% !important;
        background: white !important;
        z-index: 10000 !important;
        border-radius: 20px !important;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3) !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        padding: 10px !important;
    }

    .otros-artistas-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .otros-artistas-grid .album-titulo {
        font-size: 9px !important;
        line-height: 1;
        margin-top: 5px;
    }

    .otros-artistas-grid .badge-cat {
        font-size: 7px !important;
        padding: 1px 3px !important;
    }
}