/* =========================================
   VISTA DE DETALLES (ÁLBUM / CANCIÓN)
========================================== */

.album-view {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Botón volver en la parte superior de la vista */
.xylo-volver-top {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.seccion-bloque {
    margin-top: 40px;
    margin-bottom: 40px;
}

.titulo-seccion-chico {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: bold;
}

/* --- CABECERA DEL ÁLBUM --- */
.album-header {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.album-cover-large {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

.album-info-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.album-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.album-title {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    color: white;
}

.album-artist {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #ddd;
}

.artist-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.album-meta {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

/* Rating Global Arriba a la Derecha */
.album-global-rating {
    text-align: right;
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    border-radius: 8px;
}

.rating-stars-top {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.score {
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
}

/* Botones de acción */
.album-actions-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

.pill-deezer {
    background: transparent;
    border: 1px solid var(--color-acento-purpura, #8a2be2);
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.pill-deezer:not(.btn-streaming-plataforma):hover {
    background: var(--color-acento-purpura, #8a2be2);
}

/* Botón de plataforma (Spotify, Deezer, etc.): borde y texto del color de marca vía JS */
.btn-streaming-plataforma.pill-deezer {
    background-color: transparent;
    border-style: solid;
    border-width: 1px;
}

.btn-streaming-plataforma.pill-deezer:hover {
    filter: none;
}

/* Corazón favorito álbum — activo */
#btn-like-album.activo {
    color: var(--color-acento-purpura, #6138a8);
    background: rgba(var(--color-acento-purpura-rgb, 97, 56, 168), 0.14);
    border-color: rgba(var(--color-acento-purpura-rgb, 97, 56, 168), 0.45);
}

#btn-like-album.activo:hover {
    background: rgba(var(--color-acento-purpura-rgb, 97, 56, 168), 0.22);
    border-color: rgba(var(--color-acento-purpura-rgb, 97, 56, 168), 0.55);
}

#btn-like-album.activo svg {
    fill: none;
    color: var(--color-acento-purpura, #6138a8);
}

/* --- SECCIONES DE RESEÑA --- */
.rating-info-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 100px;
    margin-left: 15px;
}

.fecha-resena {
    font-size: 0.75rem;
    color: #888;
    margin: 5px 0 10px 0;
}

.btn-outline-small {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
}

/* --- ESTADO VACÍO: SIN RESEÑA --- */
.tarjeta-sin-resena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: #222230;
    padding: 20px 25px;
    border-radius: 12px;
    min-height: 80px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    flex-wrap: wrap;
}

.tarjeta-sin-resena .sin-resena-estrellas {
    font-size: 1.8rem;
    color: #1a1a2e;
    letter-spacing: 2px;
    flex-shrink: 0;
}

.tarjeta-sin-resena .sin-resena-mensaje {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex: 1;
    min-width: 160px;
}

.tarjeta-sin-resena .btn-calificar-ahora {
    background-color: var(--color-acento-purpura, #8a2be2);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tarjeta-sin-resena .btn-calificar-ahora:hover {
    opacity: 0.85;
}

/* --- ESTADO: SOLO CALIFICACIÓN (SIN TEXTO) --- */
.tarjeta-solo-calificacion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: #222230;
    padding: 16px 18px;
    border-radius: 12px;
    min-height: 72px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    flex-wrap: wrap;
}

.solo-calif-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.solo-calif-estrellas {
    display: flex;
    align-items: center;
    gap: 2px;
    letter-spacing: 1px;
}

.solo-calif-estrellas .puntuacion-numero {
    margin-left: 8px;
}

.solo-calif-fecha {
    font-size: 0.75rem;
    color: #888;
}

.modal-resena-completa-body {
    padding: 8px 4px 16px;
}

.modal-resena-completa-body .estrellas-uni {
    margin-bottom: 8px;
}

.modal-resena-completa-body .modal-resena-texto {
    margin: 12px 0 0;
    line-height: 1.6;
    color: #ddd;
    white-space: pre-wrap;
}

.btn-agregar-resena {
    background-color: rgba(138, 43, 226, 0.15);
    color: #d8a0ff;
    border: 1px solid rgba(138, 43, 226, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-agregar-resena:hover {
    background-color: var(--color-acento-purpura, #8a2be2);
    color: white;
    border-color: var(--color-acento-purpura, #8a2be2);
}

.btn-agregar-resena .icono-mas {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: currentColor;
    font-weight: 900;
    line-height: 1;
}

/* --- TRACKLIST MEJORADO --- */
.tracklist-section {
    display: flex;
    flex-direction: column;
}

.track-header-row {
    display: grid;
    grid-template-columns: 30px 1fr 100px 50px;
    color: #888;
    font-size: 0.8rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.track-item {
    display: grid;
    grid-template-columns: 30px 1fr 100px 50px;
    align-items: center;
    padding: 12px 0;
    color: white;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.track-item:hover { background-color: rgba(255,255,255,0.02); border-radius: 8px; }
.track-num, .track-time { color: #888; font-size: 0.9rem; }

/* --- LISTAS Y RECOMENDACIONES --- */
.lista-vertical-resenas {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.grid-recomendaciones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.album-recomendado {
    background: #1a1a1a;
    padding: 12px;
    border-radius: 10px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.album-recomendado:hover { transform: translateY(-5px); }

.album-recomendado img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 10px;
}

.album-recomendado h4 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-recomendado p {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- RESPONSIVO --- */
@media (max-width: 600px) {
    .album-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .album-title-row { flex-direction: column; align-items: center; gap: 1rem; }
    .album-global-rating { text-align: center; }
    .album-actions-row { justify-content: center; flex-wrap: wrap; }
    .track-header-row { display: none; }
    .track-item { grid-template-columns: 30px 1fr 100px 30px; }
    .track-time { display: none; }
}

@media (max-width: 900px) {
    .album-view {
        padding: 0 14px;
    }

    .album-header {
        gap: 16px;
    }

    .album-cover-large {
        width: min(220px, 72vw);
        height: min(220px, 72vw);
    }

    .album-info-container {
        min-height: 0;
    }

    .album-title {
        font-size: clamp(1.5rem, 5vw, 1.9rem);
        line-height: 1.2;
    }

    .rating-info-right {
        min-width: 0;
        margin-left: 0;
    }
}

/* --- Enlaces cabecera / modales reseña (página álbum) --- */
.album-artista-enlace {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.album-artista-enlace:hover {
    opacity: 0.92;
}

/* --- Títulos de sección (texto en h3; chevron es botón aparte) --- */
.titulo-seccion-chico .icono-seccion-leading {
    width: 16px;
    height: 16px;
    fill: currentColor;
    margin-right: 8px;
    flex-shrink: 0;
}

.titulo-seccion-chico .btn-chevron-seccion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 4px 6px;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 8px;
    line-height: 0;
}

.titulo-seccion-chico .btn-chevron-seccion:hover {
    background: rgba(255, 255, 255, 0.08);
}

.titulo-seccion-chico .btn-chevron-seccion:focus-visible {
    outline: 2px solid var(--color-acento-purpura, #8a2be2);
    outline-offset: 2px;
}

.titulo-seccion-chico .chevron-seccion-svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.modal-body-vacio-min {
    padding: 1.25rem 1rem 1.75rem;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}