/* --- 1. PALETAS DE COLORES DINÁMICAS (LA MAGIA) --- */

/* Variables base (Por si algún día se nos olvida poner el data-album) */
:root {
    --color-primario: #d4af37;
    --color-hover: #f0c95c;
    --bg-oscuro: #0f0f0f;
    --bg-tarjeta: #1a1a1a;
    --bg-tarjeta-hover: #252525;
    --resplandor: rgba(212, 175, 55, 0.15);
}

/* Paleta para Secretos de Amor y Muerte (Tonos Dorados y Místicos) */
body[data-album="secretos"] {
    --color-primario: #d4af37;
    --color-hover: #f0c95c;
    --bg-oscuro: #0f0f0f;
    --bg-tarjeta: #1a1a1a;
    --bg-tarjeta-hover: #252525;
    --resplandor: rgba(212, 175, 55, 0.15);
}

/* Paleta para Sendas de Leyenda (Tonos Fríos, Azules y Noche) */
body[data-album="sendas"] {
    --color-primario: #8ab4f8; 
    --color-hover: #aecbfb;
    --bg-oscuro: #070b12; 
    --bg-tarjeta: #111827;
    --bg-tarjeta-hover: #1f2937;
    --resplandor: rgba(138, 180, 248, 0.15);
}

/* Paleta para En Tierra de Hadas (Tonos Bosque Encantado y Verdes) */
body[data-album="hadas"] {
    --color-primario: #4ade80; 
    --color-hover: #86efac;
    --bg-oscuro: #05140a; 
    --bg-tarjeta: #0f291e;
    --bg-tarjeta-hover: #163d2c;
    --resplandor: rgba(74, 222, 128, 0.15);
}

/* --- 2. ESTILOS GENERALES --- */
body {
    background-color: var(--bg-oscuro);
    color: #f0f0f0;
    font-family: 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    transition: background-color 0.5s ease; /* Transición suave al cambiar de disco */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header h1 {
    color: var(--color-primario);
    text-align: center;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-back {
    color: var(--color-primario);
    text-decoration: none;
    font-weight: bold;
    transition: text-shadow 0.3s ease;
}

.btn-back:hover {
    text-shadow: 0 0 10px var(--color-primario);
}

/* --- 3. REPRODUCTOR DE VIDEO ÉPICO --- */
.video-display {
    background: #000;
    width: 100%; 
    aspect-ratio: 16 / 9;
    margin: 40px auto; 
    border-radius: 12px;
    border: 2px solid var(--color-primario);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--resplandor); 
}

#video-player {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content p {
    color: var(--color-primario);
    font-style: italic;
    font-size: 1.2rem;
    animation: pulse 2s infinite; 
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 15px var(--color-primario); }
}

/* --- 4. LISTA DE CANCIONES --- */
#tracklist {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 10px;
}

#tracklist li {
    background: var(--bg-tarjeta);
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

#tracklist li:hover {
    background: var(--bg-tarjeta-hover);
    border-left: 4px solid var(--color-primario);
    transform: translateX(10px);
    color: var(--color-primario);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4); 
}

.play-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* --- 5. BOTÓN FLOTANTE --- */
#btn-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-primario);
    color: black;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, background 0.3s ease;
}

#btn-top:hover {
    transform: translateY(-5px);
    background: var(--color-hover);
}

/* Ajuste del iframe inyectado por JS */
iframe {
    width: 100%;
    height: 100%;
    border: none;
}