@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;800&display=swap');

/* =========================================================
   BEAT LATIN - CONFIGURACIÓN GLOBAL
   ========================================================= */
:root {
    --apple-red: #D90C0C; 
    --apple-bg: #000000;
    --glass-border: rgba(255, 255, 255, 0.08);
}

body, .dj-container {
    background-color: var(--apple-bg) !important;
    font-family: 'Sora', sans-serif !important;
    color: #fff;
}

/* --- 1. PERFIL (DESKTOP) --- */
.dj-profile-card {
    background: transparent !important;
    padding: 30px 0;
}

.dj-profile-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: center;
}

/* Contenedor del cristal principal */
.dj-col-side {
    width: 200px !important;
    height: 200px !important;
    border-radius: 25px !important; 
    overflow: hidden !important; 
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* EFECTO GLASSMORPHISM */
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0px !important; 
    box-sizing: border-box !important;
    
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.4s ease-in-out;
}

/* La imagen ahora llena todo el contenedor de cristal */
.dj-main-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    background: transparent !important;
    border-radius: 0 !important; 
}

/* El efecto Hover sobre el marco completo */
.dj-col-side:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important; 
    transform: translateY(-3px); 
    box-shadow: 0 20px 35px rgba(185, 8, 8, 0.06), 0 15px 30px rgba(0, 0, 0, 0.7);
}

.dj-title-name {
    font-size: 24px !important;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.dj-description {
    font-size: 12px !important; 
    color: rgba(255, 255, 255, 0.6) !important; 
    line-height: 1.7; 
    margin-bottom: 30px;
    width: 100% !important; 
    max-width: 100% !important; 
    text-align: justify; 
}

/* --- 2. STATS (DESKTOP) --- */
.dj-stats-row {
    display: flex;
    gap: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    align-items: center;
}

.stat-box {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.stat-v {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.stat-l {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    font-weight: 600;
}

/* --- 3. FILTROS --- */
.dj-filters-section {
    display: flex !important;
    gap: 15px !important;
    margin: 30px 0 !important;
    padding: 20px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px;
}

.dj-filter-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    height: 45px !important;
}

.dj-filter-input option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.dj-reset-btn {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 0 18px !important;
    border-radius: 8px !important;
    height: 45px !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.dj-reset-btn:hover {
    border-color: var(--apple-red) !important;
    color: var(--apple-red) !important;
}


/* =========================================================
   --- 4. TABLA CATALOGO COMPLETAMENTE ENCAPSULADA (PC) ---
   Protección absoluta contra sobreescritura del Single
   ========================================================= */

/* Estructura base de la tabla dentro del catálogo */
.dj-container #dj-remix-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    margin-top: 15px;
}

/* Encabezados de la tabla del catálogo */
.dj-container #dj-remix-table th {
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    padding: 15px 10px !important;
    border-bottom: 1px solid var(--glass-border) !important;
    text-align: center;
    font-weight: 600;
}

.dj-container #dj-remix-table th:nth-child(2) { 
    text-align: left !important; 
}

.dj-container #dj-remix-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background 0.2s ease;
}

/* =========================================================
   BLINDAJE DE COLORES: EXTRACTO DE DATOS EN GRIS SUTIL
   Fuerza a Versión, BPM, Género y Fecha a quedarse en gris
   ========================================================= */
.dj-container #dj-remix-table td,
.dj-container #dj-remix-table td .cell-version-highlight {
    padding: 18px 10px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    text-align: center;
    color: rgba(255, 255, 255, 0.5) !important; /* Gris unificado para evitar que el single lo ponga blanco */
    text-decoration: none !important;
}

/* Mantiene el grosor de la versión pero con su color gris blindado */
.dj-container #dj-remix-table td .cell-version-highlight {
    font-weight: 500 !important;
    text-shadow: none !important; /* Apaga cualquier brillo del single */
}

/* Alineación de la celda del Título */
.dj-container #dj-remix-table td:nth-child(2) {
    text-align: left !important;
}

/* =========================================================
   COLUMNA TITLE: BLANCO TOTAL FIJO (DESTRUYE EL BLOQUEO VIEJO)
   ========================================================= */
.dj-container #dj-remix-table td:nth-child(2) a.remix-title-link {
    display: block !important;
    text-align: left !important;
    font-weight: 500 !important;
    color: #ffffff !important; /* Rompe el #aaaaaa !important viejo y fuerza el blanco */
    text-decoration: none !important;
    white-space: normal !important;
    word-break: break-word !important;
    transition: color 0.25s ease-in-out !important;
    will-change: color;
}

/* COMPORTAMIENTO INTERACTIVO HOVER: PASA A ROJO ESTÁTICO */
.dj-container #dj-remix-table tr:hover td:nth-child(2) a.remix-title-link {
    color: var(--apple-red) !important; /* Pasa a rojo corporativo en hover */
    transform: none !important;
}

/* Blindamos las demás celdas grises para que no hagan cosas raras en el hover */
.dj-container .remix-row:hover td {
    transform: none !important;
}


/* =========================================================
   ANCHOS AISLADOS EXCLUSIVOS PARA EL CATÁLOGO DEL DJ 
   ========================================================= */
@media (min-width: 1024px) {
    .dj-container #dj-remix-table th:nth-child(1), 
    .dj-container #dj-remix-table td:nth-child(1) { width: 70px !important; }  /* PLAY */
    
    .dj-container #dj-remix-table th:nth-child(2), 
    .dj-container #dj-remix-table td:nth-child(2) { width: 35% !important; }   /* TITLE */
    
    .dj-container #dj-remix-table th:nth-child(3), 
    .dj-container #dj-remix-table td:nth-child(3) { width: 14% !important; }   /* VERSION */
    
    .dj-container #dj-remix-table th:nth-child(4), 
    .dj-container #dj-remix-table td:nth-child(4) { width: 95px !important; }  /* BPM */
    
    .dj-container #dj-remix-table th:nth-child(5), 
    .dj-container #dj-remix-table td:nth-child(5) { width: 12% !important; }   /* GENRE */
    
    .dj-container #dj-remix-table th:nth-child(6), 
    .dj-container #dj-remix-table td:nth-child(6) { width: 11% !important; }   /* ADDED DATE */
    
    .dj-container #dj-remix-table th:nth-child(7), 
    .dj-container #dj-remix-table td:nth-child(7) { width: 110px !important; } /* PURCHASE */
}

/* COLUMNA VERSIÓN: Resaltada siempre en Blanco Total Fijo */
.cell-version-highlight {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* --- 5. COMPORTAMIENTO NOW PLAYING (SOBRIO SIN TEXTOS ROJOS) --- */
.remix-row.now-playing { 
    background: rgba(217, 12, 12, 0.08) !important; 
}
.remix-row.now-playing .remix-title-link,
.remix-row.now-playing td {
    color: rgba(255, 255, 255, 0.5) !important; /* Bloqueado en gris plano tal como pediste */
}

/* --- 6. CARATULAS Y OVERLAY REPRODUCCIÓN (FIX TOTAL) --- */
.dj-preview-container {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px; 
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 2px; 
    box-sizing: border-box !important;
    cursor: pointer;
}

.dj-album-art {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain; 
    display: block;
    filter: brightness(1) drop-shadow(0 2px 4px rgba(0,0,0,0.3)); 
}

.dj-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

/* Base limpia para los iconos (Quitado el none !important que rompía el JS) */
.dj-play-overlay i {
    color: #ffffff !important;
    font-size: 20px !important;
    display: none; 
}

/* --- LOGICA ULTRA-ESPECIFICA DE SINCRONIZACION VISUAL --- */

/* 1. Comportamiento en Hover: Mostramos el overlay */
.remix-row:hover .dj-play-overlay {
    opacity: 1 !important;
}
/* Al pasar el mouse por una fila apagada, precargamos el icono Play */
.remix-row:not(.now-playing):hover .dj-play-overlay .play-icon {
    display: block !important;
}

/* 2. Si la pista está reproduciendo activamente (now-playing) */
.remix-row.now-playing .dj-play-overlay {
    opacity: 1 !important;
}
.remix-row.now-playing:not(.is-paused) .dj-play-overlay .pause-icon {
    display: block !important; /* Fuerza el pintado del Pause */
}
.remix-row.now-playing:not(.is-paused) .dj-play-overlay .play-icon {
    display: none !important;
}

/* 3. Si la pista activa se pausa (is-paused) */
.remix-row.now-playing.is-paused .dj-play-overlay .play-icon {
    display: block !important; /* Muestra el Play para reanudar */
}
.remix-row.now-playing.is-paused .dj-play-overlay .pause-icon {
    display: none !important;
}

/* =========================================================
   --- 7. ADAPTACIÓN LIMPIA PARA MÓVILES (MAX-WIDTH: 1023PX) ---
   ========================================================= */
@media (max-width: 1023px) {
    .dj-profile-grid {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        gap: 25px;
    }

    .dj-col-side {
        width: 160px !important;
        height: 160px !important;
        border-radius: 25px !important; 
        padding: 0px !important; 
        overflow: hidden !important;
    }

    .dj-main-img { 
        width: 100% !important; 
        height: 100% !important; 
        object-fit: cover !important;
        border-radius: 0 !important;
    }
    
    .dj-stats-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px;
        padding: 25px 15px !important;
        width: 100%;
    }

    .stat-box { 
        flex-direction: column !important; 
        align-items: center; 
    }

    .dj-filters-section { 
        flex-direction: column; 
    }
    
    .dj-filter-input, 
    .dj-reset-btn { 
        width: 100% !important; 
    }

    /* TABLA MÓVIL AISLADA: SÓLO PLAY | TITLE | PURCHASE */
    .dj-container #dj-remix-table tr { 
        display: table-row !important; 
    }

    .dj-container #dj-remix-table th:nth-child(3), .dj-container #dj-remix-table td:nth-child(3),
    .dj-container #dj-remix-table th:nth-child(4), .dj-container #dj-remix-table td:nth-child(4),
    .dj-container #dj-remix-table th:nth-child(5), .dj-container #dj-remix-table td:nth-child(5),
    .dj-container #dj-remix-table th:nth-child(6), .dj-container #dj-remix-table td:nth-child(6) {
        display: none !important;
    }

    .dj-container #dj-remix-table th:nth-child(1), 
    .dj-container #dj-remix-table td:nth-child(1) { 
        width: 75px !important; 
        display: table-cell !important; 
        text-align: center !important;
        vertical-align: middle !important;
    }
    
    .dj-container #dj-remix-table th:nth-child(2), 
    .dj-container #dj-remix-table td:nth-child(2) { 
        width: auto !important; 
        display: table-cell !important;
        text-align: left !important;
        font-size: 13px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: normal !important;
        line-height: 1.3 !important;
    }

    .dj-container #dj-remix-table th:nth-child(7), 
    .dj-container #dj-remix-table td:nth-child(7) { 
        width: 100px !important; 
        display: table-cell !important;
        text-align: center !important; 
        vertical-align: middle !important;
    }

    .dj-container #dj-remix-table td:last-child .edd-add-to-cart { 
        font-size: 11px !important; 
        padding: 6px 10px !important; 
        min-width: 65px !important; 
        height: auto !important; 
        border-radius: 50px !important; 
    }

    .dj-description {
        font-size: 12px !important;
        text-align: center !important; 
        padding: 0 25px !important; 
        margin-bottom: 25px !important;
        line-height: 1.6 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}