/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* Container principal con variables CSS específicas */
.remixes-container {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    max-width: 100%;
    margin: 0 auto;
}

/* Secciones de remixes */
.remix-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    font-weight: 500;
    color: #F72616;
    margin-bottom: 30px;
    text-align: center;
}

/* Filtros */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    align-items: center;
}

.search-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #F72616;
    box-shadow: 0 0 0 2px rgba(247, 38, 22, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.reset-search-btn {
    padding: 12px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reset-search-btn:hover {
    border-color: #F72616;
    color: #F72616;
}

.filter-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.genre-filter,
.dj-filter {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.genre-filter:focus,
.dj-filter:focus {
    outline: none;
    border-color: #F72616;
    box-shadow: 0 0 0 2px rgba(247, 38, 22, 0.2);
}

.genre-filter option,
.dj-filter option {
    background: #161A1E;
    color: #ffffff;
}

.genre-filter option:hover,
.dj-filter option:hover {
    background: #F72616 !important;
    color: #000000;
}

/* Tablas */
.remixes-table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
    position: relative;
}

.remixes-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    table-layout: fixed;
}

.remixes-table thead th {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px 12px;
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.remixes-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.remixes-table tbody tr:hover {
    background: #161A1E;
}

.remixes-table tbody td {
    padding: 16px 8px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    font-size: 13px;
}

/* Columnas específicas con distribución mejorada para incluir PLAY */
.col-image {
    width: 80px;
    text-align: center;
}

.col-title {
    width: 30%;
    text-align: left;
    font-weight: 500;
    padding-left: 16px;
    font-size: 13px;
}

.col-play {
    width: 80px;
    text-align: center;
    font-weight: 500;
    color: #ffffff;
    font-size: 12px;
}

.col-bpm {
    width: 60px;
    text-align: center;
    font-weight: 500;
    color: #ffffff;
    font-size: 13px;
}

.col-genre {
    width: 15%;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
}

.col-release {
    width: 15%;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
}

.col-buy {
    width: 120px;
    text-align: center;
}

/* Estilos para el contador de reproducciones */
.play-count-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 50px;
    margin: 0 auto;
}

.play-count-display.count-updated {
    /* Eliminado el fondo y la animación */
}

.play-count-icon {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    flex-shrink: 0;
}

.play-count-number {
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

/* Imagen con botón de play */
.image-container {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.image-container:hover .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button.playing {
    opacity: 1;
    background: #F72616;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.play-button i {
    color: #000000;
    font-size: 14px;
    margin-left: 2px;
}

.play-button.playing i,
.play-button.requires-interaction i {
    color: #000000;
    margin-left: 0;
}

/* Botón de compra */
.remix-purchase-btn {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.remix-purchase-btn:hover {
    border-color: #F72616 !important;
    color: #F72616 !important;
}

/* Elementos de EDD: Permitir visibilidad dinámica (comentado el ocultamiento forzado para evitar conflictos con JS) */
/*
.edd_go_to_checkout,
.edd-cart-ajax-alert {
    display: none !important;
}
*/

/* Estilos específicos para elementos de EDD en la tabla y sticky player (visibles tras AJAX) */
.remixes-table .edd_go_to_checkout,
.remixes-table .edd-cart-ajax-alert {
    display: none; /* Inicialmente ocultos, pero JS los mostrará */
    transition: opacity 0.3s ease;
}

.remixes-table .edd_go_to_checkout {
    background: #F72616;
    color: #000000;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 5px;
    display: inline-block;
}

.remixes-table .edd-cart-ajax-alert {
    color: #F72616;
    font-size: 12px;
    margin-top: 5px;
}

/* Estilos para sticky player (fijos y visibles) */
.buy-button-container .edd_go_to_checkout {
    display: none; /* Inicial */
    background: #F72616 !important;
    color: #000000 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    margin: 5px 0 !important;
    transition: all 0.3s ease !important;
}

.buy-button-container .edd-cart-ajax-alert {
    display: none; /* Inicial */
    color: #F72616 !important;
    font-size: 12px !important;
    margin: 5px 0 !important;
    transition: all 0.3s ease !important;
}

/* Sin resultados */
.no-results {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Paginación */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
}

.pagination-btn {
    padding: 10px 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    border-color: #F72616;
    color: #F72616;
}

.pagination-btn.current {
    background: #F72616;
    color: #000000;
    border-color: #F72616;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mensaje requerido para reproducir */
.play-required-message {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #F72616;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    animation: fadeInDown 0.3s ease;
    z-index: 1002;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Reproductor Sticky */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #010305;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.player-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: #F72616;
    width: 0%;
    transition: width 0.1s ease;
}

.player-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 20px;
    position: relative;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.player-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.player-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.prev-btn,
.next-btn,
.play-pause-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-btn {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: #F72616;
    color: #000000;
}

.prev-btn,
.next-btn {
    font-size: 18px;
    width: 36px;
    height: 36px;
}

.prev-btn:hover,
.next-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.track-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.track-details {
    min-width: 0;
    flex: 1;
}

.track-title {
    font-weight: 500;
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

.track-artist {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.8;
}

.track-duration {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 15px;
    white-space: nowrap;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.volume-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.volume-input {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #F72616;
    border-radius: 50%;
    cursor: pointer;
}

.volume-input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #F72616;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.buy-button-container {
    min-width: 80px;
}

/* Video overlay */
.video-overlay {
    position: fixed !important;
    bottom: 80px !important;
    right: 20px !important;
    width: 300px !important;
    height: 169px !important;
    background: #000 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    z-index: 1001 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    display: none !important;
}

.video-overlay.active {
    display: block !important;
}

.video-overlay.fullscreen {
    width: 40vw !important; /* 40% del ancho del viewport */
    height: calc(40vw * 9 / 16) !important; /* Mantener proporción 16:9 */
    max-width: 640px !important; /* Límite máximo para pantallas grandes */
    max-height: 360px !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important; /* Centrar en la pantalla */
    border-radius: 8px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7) !important;
    z-index: 1002 !important;
}

.video-overlay.fullscreen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Mostrar video completo */
}

.video-overlay video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.video-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: none !important;
    color: white !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1003 !important;
}

.video-overlay.fullscreen .video-close {
    top: 12px !important;
    right: 12px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .video-overlay {
        width: 280px !important;
        height: 158px !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        bottom: auto !important;
        right: auto !important;
        display: none !important;
    }

    .video-overlay.active {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .video-overlay {
        width: 240px !important;
        height: 135px !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        bottom: auto !important;
        right: auto !important;
        display: none !important;
    }

    .video-overlay.active {
        display: block !important;
    }
}

/* Desactivar modo pantalla completa nativa */
video:-webkit-full-screen,
video:fullscreen {
    display: none !important;
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #F72616;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .remixes-container {
        padding: 15px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .player-content {
        padding: 10px 15px;
        gap: 15px;
    }

    .remixes-table-container {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .remixes-container {
        padding: 10px 0;
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 10px;
    }

    .search-container {
        min-width: auto;
    }

    .filter-container {
        justify-content: center;
    }

    .remixes-table-container {
        margin: 0;
        border-radius: 8px;
        width: 100%;
    }

    /* Tabla móvil - ajustar para incluir columna PLAY */
    .remixes-table .col-bpm,
    .remixes-table .col-genre,
    .remixes-table .col-release {
        display: none;
    }

    .remixes-table .col-image {
        width: 70px;
    }

    .remixes-table .col-title {
        width: auto;
        padding-left: 8px;
        text-align: left;
    }

    .remixes-table .col-play {
        width: 60px;
    }

    .remixes-table .col-buy {
        width: 100px; /* Aumentado para móviles */
    }

    .remixes-table {
        font-size: 13px;
    }

    .remixes-table thead th,
    .remixes-table tbody td {
        padding: 12px 6px;
    }

    .play-count-display {
        min-width: 40px;
        padding: 2px 6px;
        gap: 4px;
    }

    .play-count-icon {
        font-size: 9px;
    }

    .play-count-number {
        font-size: 10px;
    }

    /* Reproductor móvil */
    .player-content {
        flex-direction: row;
        gap: 10px;
        padding: 15px 10px;
    }

    .player-left {
        flex: 2;
        min-width: 0;
    }

    .player-center {
        position: static;
        transform: none;
        flex: 0 0 auto;
        gap: 10px;
    }

    .player-right {
        display: none;
    }

    .prev-btn,
    .next-btn {
        display: none;
    }

    /* Video overlay completamente oculto en móviles */
    .video-overlay {
        display: none !important;
    }

    .track-title {
        font-size: 12px;
        max-width: 70vw;
    }

    .track-artist {
        font-size: 11px;
    }

    .pagination-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Asegurar visibilidad en móviles para EDD */
    .col-buy .edd_go_to_checkout {
        font-size: 11px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .remixes-container {
        padding: 10px 2px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .filter-container {
        flex-direction: column;
        gap: 10px;
    }

    .genre-filter,
    .dj-filter {
        min-width: auto;
    }

    .remixes-table {
        font-size: 12px;
    }

    .col-image {
        width: 60px;
    }

    .image-container {
        width: 50px;
        height: 50px;
    }

    .col-play {
        width: 50px;
    }

    .play-count-display {
        min-width: 35px;
        padding: 2px 4px;
        gap: 3px;
    }

    .play-count-icon {
        font-size: 8px;
    }

    .play-count-number {
        font-size: 9px;
        min-width: 15px;
    }

    .remixes-table .col-buy {
        width: 90px; /* Ajuste adicional para pantallas muy pequeñas */
    }

    .pagination-wrapper {
        flex-wrap: wrap;
        gap: 5px;
    }

    .track-info {
        max-width: 200px;
    }

    .track-thumbnail {
        width: 40px;
        height: 40px;
    }

    .track-title {
        font-size: 11px;
        max-width: 60vw;
    }
}

/* Tabs Navigation */
.remixes-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 55px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 13px 80px;
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
    color: #ffffff;
    background: #161A1E;
    border-bottom-color: #F72616;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .tab-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Animaciones de carga */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.remix-row {
    animation: fadeIn 0.3s ease-out;
}

.remixes-table tbody {
    transition: opacity 0.2s ease;
}

.remixes-table tbody.loading {
    opacity: 0.5;
}

.remixes-table tbody:not(.loading) {
    opacity: 1;
}

/* Estilos para el nombre del DJ en el reproductor sticky */
#sticky-player .track-artist {
    text-decoration: none !important; /* Eliminar subrayado */
    color: #fff; /* Color del texto, ajusta si es necesario */
    cursor: pointer;
    font-size: 12px; /* Tamaño consistente con el diseño */
}

#sticky-player .track-artist:hover {
    text-decoration: none !important; /* Asegurar que no aparezca subrayado al pasar el ratón */
    color: #ddd; /* Color más claro al hacer hover, opcional */
}

/* Animación de actualización del contador */
@keyframes countUpdate {
    0% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.05);
    }
    50% {
        transform: scale(1.1);
        background: rgba(247, 38, 22, 0.3);
    }
    100% {
        transform: scale(1);
        background: rgba(247, 38, 22, 0.1);
    }
}

.count-updated {
    animation: countUpdate 0.6s ease-out;
}