/* Contenedor principal */
.latino-chart-container {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    background: #1A1A1A;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Tabla */
.latino-chart-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

/* Cabecera */
.latino-chart-table thead {
    background: linear-gradient(90deg, #FF6B00 0%, #FF0080 100%);
}

.latino-chart-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filas */
.latino-chart-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.latino-chart-table td {
    padding: 14px 20px;
    vertical-align: middle;
}

/* CELDAS DE PUESTO */
.latino-chart-table td:first-child {
    width: 50px;
    text-align: center;
    font-size: 16px;
}

/* Top 3 */
.latino-chart-table tr:nth-child(1) td:first-child {
    font-size: 60px;
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.latino-chart-table tr:nth-child(2) td:first-child {
    font-size: 40px;
    color: #C0C0C0;
    text-shadow: 0 0 4px rgba(192, 192, 192, 0.3);
}

.latino-chart-table tr:nth-child(3) td:first-child {
    font-size: 30px;
    color: #CD7F32;
    text-shadow: 0 0 3px rgba(205, 127, 50, 0.3);
}

/* PORTADAS - ESCRITORIO (150x150px) */
.album-cover-cell {
    width: 180px; /* Más espacio para bordes */
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden; /* Crucial para bordes redondeados */
}

.album-cover {
    width: 150px;
    height: 150px;
    border-radius: 5px !important;
    -webkit-border-radius: 5px !important;
    -moz-border-radius: 5px !important;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border: none;
    margin: 0 auto; /* Centrado con espacio */
}

.album-cover-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 5px !important;
    -webkit-border-radius: 5px !important;
    -moz-border-radius: 5px !important;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    overflow: hidden;
    margin: 0 auto;
}

/* Contenido de texto */
.latino-chart-table td:nth-child(3) {
    font-weight: 600;
    font-size: 16px;
    position: relative;
}

.latino-chart-table td:nth-child(4) {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

/* Enlaces */
.latino-chart-table a {
    color: white;
    text-decoration: none;
}

/* Pie de página */
.latino-chart-footer {
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* --------------------------------------------- */
/* VERSIÓN MÓVIL (600px o menos) - CON ESPACIO Y BORDES */
/* --------------------------------------------- */
@media (max-width: 600px) {
    /* Cabecera */
    .latino-chart-table thead {
        display: table-header-group;
    }
    
    .latino-chart-table th {
        padding: 12px 8px !important;
        font-size: 14px;
    }
    
    /* Texto "Canción / Artista" */
    .latino-chart-table th:nth-child(3)::after {
        content: " / Artista";
        font-weight: normal;
        opacity: 0.8;
    }
    
    /* Ocultar columna artista */
    .latino-chart-table th:nth-child(4),
    .latino-chart-table td:nth-child(4) {
        display: none;
    }
    
    /* Columnas con espacio */
    .latino-chart-table td:first-child {
        width: 15% !important;
        padding: 0 8px !important;
    }
    
    /* PORTADAS MÓVIL (80x80px) */
    .album-cover-cell {
        width: 25% !important;
        padding: 10px !important; /* Espacio aumentado */
        overflow: hidden;
    }
    
    .album-cover,
    .album-cover-placeholder {
        width: 100%;
        max-width: 80px;
        height: auto;
        aspect-ratio: 1/1;
        border-radius: 5px !important;
        -webkit-border-radius: 5px !important;
        -moz-border-radius: 5px !important;
        display: block;
        margin: 0 auto;
    }
    
    /* Celda canción/artista */
    .latino-chart-table td:nth-child(3) {
        width: 60% !important;
        padding: 10px 12px 32px 12px !important; /* Más espacio */
    }
    
    /* Artista debajo */
    .latino-chart-table td:nth-child(3)::after {
        content: attr(data-artista);
        display: block;
        position: absolute;
        bottom: 12px; /* Más espacio */
        left: 12px;
        right: 12px;
        font-size: 13px;
        color: rgba(255,255,255,0.7);
        font-weight: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Top 3 móvil */
    .latino-chart-table tr:nth-child(1) td:first-child {
        font-size: 24px !important;
    }
    .latino-chart-table tr:nth-child(2) td:first-child {
        font-size: 22px !important;
    }
    .latino-chart-table tr:nth-child(3) td:first-child {
        font-size: 20px !important;
    }
    
    /* Pie móvil */
    .latino-chart-footer {
        padding: 15px 12px;
        font-size: 13px;
    }
}







/* Efecto de oleaje INTENSO para el thead - Manteniendo colores originales */
.latino-chart-table thead {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.latino-chart-table thead::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        #FF3CAC 0%, 
        #FF8E5B 25%, 
        #FFD600 50%, 
        #00BFFF 75%, 
        #784BA0 100%);
    background-size: 400% 400%;
    animation: waveAnimation 20s linear infinite;
    z-index: 0;
    opacity: 1; /* ¡Sin transparencia para colores vibrantes! */
}

.latino-chart-table thead th {
    position: relative;
    z-index: 1;
    background: transparent !important;
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Sombra más fuerte */
}

@keyframes waveAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}