/**
 * Explore - Vista de géneros estilo Spotify
 */

#exploreGenres {
    display: none;
    padding: 1rem;
}

#exploreGenres.active {
    display: block;
}

/* Header de explorar */
.explore-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.explore-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.explore-close {
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border: none;
}

.explore-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Grid de géneros - flexible con auto-fill */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* Tarjeta de género estilo Spotify */
.genre-card {
    position: relative;
    aspect-ratio: 1.8 / 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    /* Tamaño mínimo para evitar colapso */
    min-width: 280px;
    min-height: 156px;
}

.genre-card:hover {
    transform: scale(1.02);
}

.genre-card:active {
    transform: scale(0.98);
}

/* Título del género */
.genre-card-title {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-width: 60%;
    line-height: 1.2;
}

/* Imagen inclinada */
.genre-card-image {
    position: absolute;
    bottom: -5px;
    right: -15px;
    width: 55%;
    aspect-ratio: 1;
    object-fit: cover;
    transform: rotate(25deg);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Placeholder si no hay imagen */
.genre-card-placeholder {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 2.5rem;
    transform: rotate(15deg);
    opacity: 0.6;
}

/* Colores de fondo para géneros */
.genre-bg-1 { background: #E13300; }
.genre-bg-2 { background: #1DB954; }
.genre-bg-3 { background: #8D67AB; }
.genre-bg-4 { background: #1E3264; }
.genre-bg-5 { background: #E8115B; }
.genre-bg-6 { background: #148A08; }
.genre-bg-7 { background: #BC5900; }
.genre-bg-8 { background: #503750; }
.genre-bg-9 { background: #477D95; }
.genre-bg-10 { background: #0D73EC; }
.genre-bg-11 { background: #8C1932; }
.genre-bg-12 { background: #E91429; }

/* Ocultar carruseles cuando se explora */
.carousels-hidden {
    display: none;
}

/* Mobile (≤600px) - Explore visible solo con clase .active */
@media (max-width: 600px) {
    /* Mostrar exploreGenres SOLO cuando tiene clase active */
    /* explore.js agrega/quita esta clase dinámicamente */
    #exploreGenres.active {
        display: block;
        padding: 0.5rem 0.5rem;
    }

    /* Ocultar header de explorar en móvil */
    .explore-header {
        display: none;
    }

    /* Grid de 2 columnas en móvil */
    .genres-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Tarjetas más pequeñas en móvil (mitad de tamaño) */
    .genre-card {
        min-width: unset;
        min-height: 80px;
        aspect-ratio: 1.6 / 1;
    }

    .genre-card-title {
        font-size: 0.75rem;
        top: 8px;
        left: 8px;
        max-width: 55%;
    }

    .genre-card-image {
        width: 45%;
    }

    .genre-card-placeholder {
        font-size: 1.5rem;
        bottom: 4px;
        right: 4px;
    }
}
