/* css/reproductor.css */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #181818;
    border-top: 1px solid #282828;
    padding: 0 16px;
    height: 90px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player.hidden {
    display: none;
}

/* Sección izquierda - Información de la canción */
.player-left {
    width: 30%;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.album-art {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    background: #282828;
    flex-shrink: 0;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    min-width: 0;
    flex: 1;
}

.track-title {
    font-weight: 400;
    color: white;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    color: #b3b3b3;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.like-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.like-btn:hover {
    opacity: 1;
    color: #1DB954;
}

/* Sección central - Controles de reproducción */
.player-center {
    width: 40%;
    max-width: 722px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: white;
}

.control-btn.active {
    color: #1DB954;
}

.control-btn[data-action="shuffle"],
.control-btn[data-action="repeat"] {
    font-size: 16px;
}

.control-btn[data-action="previous"],
.control-btn[data-action="next"] {
    font-size: 16px;
}

.control-btn[data-action="play-pause"] {
    background: white;
    color: black;
    width: 32px;
    height: 32px;
}

.control-btn[data-action="play-pause"]:hover {
    background: #f0f0f0;
    transform: scale(1.06);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.time {
    color: #a7a7a7;
    font-size: 11px;
    min-width: 40px;
    font-feature-settings: "tnum";
}

.time:first-child {
    text-align: right;
}

.time:last-child {
    text-align: left;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #5e5e5e;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.progress {
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Sección derecha - Controles adicionales */
.player-right {
    width: 30%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 136px;
}

.volume-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.volume-btn:hover {
    color: white;
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: #5e5e5e;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    transition: height 0.2s ease;
}

.volume-slider:hover {
    height: 6px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.volume-slider:hover::-webkit-slider-thumb {
    opacity: 1;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.volume-slider:hover::-moz-range-thumb {
    opacity: 1;
}

/* Estados activos */
.control-btn[data-action="shuffle"].active,
.control-btn[data-action="repeat"].active {
    color: #1DB954;
}

/* === VERSIÓN MÓVIL: 3 COLUMNAS EN UNA SOLA FILA === */
/* === VERSIÓN MÓVIL: 3 COLUMNAS EN UNA SOLA FILA === */
@media (max-width: 768px) {
    .player {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        white-space: nowrap;
        padding: 0 12px;
        height: 70px;
        gap: 12px;
    }

    .player-left,
    .player-center,
    .player-right {
        white-space: normal;
    }

    /* Ocultar elementos desktop */
    .track-info,
    .like-btn,
    .control-buttons, /* 🔥 OCULTAR TODOS LOS BOTONES DE CONTROL DESKTOP */
    .progress-container,
    .volume-control {
        display: none !important;
    }

    /* Mostrar información móvil */
    .mobile-track-info {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        flex: 1;
        line-height: 1.2;
    }

    /* Mostrar botón play móvil */
    .mobile-play-btn {
        display: flex !important;
    }

    /* COLUMNA 1: Portada */
    .player-left {
        width: 20%;
        min-width: auto;
        justify-content: flex-start;
    }

    .now-playing {
        gap: 12px;
        width: 100%;
        flex-direction: row;
        align-items: center;
    }

    .album-art {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    /* COLUMNA 2: Título + Artista */
    .player-center {
        width: 60%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
    }

    .mobile-track-title {
        font-weight: 500;
        color: white;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-track-artist {
        color: #b3b3b3;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 2px;
    }

    /* COLUMNA 3: Botón play móvil */
    .player-right {
        width: 20%;
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
    }

    .mobile-play-btn {
        background: #1DB954;
        border: none;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        color: white;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .mobile-play-btn:hover {
        background: #1ed760;
        transform: scale(1.05);
    }
}

/* Versión desktop - Asegurar que el botón móvil esté oculto */
@media (min-width: 769px) {
    .mobile-track-info,
    .mobile-play-btn {
        display: none !important;
    }
    
    .control-buttons {
        display: flex !important;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .player {
        padding: 0 8px;
        height: 60px;
        gap: 8px;
    }

    .album-art {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .player-center {
        gap: 12px;
    }

    .mobile-track-title {
        font-size: 13px;
    }

    .mobile-track-artist {
        font-size: 11px;
    }

    .mobile-play-btn {
        width: 40px;
        height: 40px;
    }
}

/* Muy poco espacio */
@media (max-width: 360px) {
    .mobile-track-info {
        max-width: 140px;
    }

    .mobile-track-title {
        font-size: 12px;
    }

    .mobile-track-artist {
        font-size: 10px;
    }

    .mobile-play-btn {
        width: 36px;
        height: 36px;
    }
}

/* Animaciones */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.control-btn[data-action="play-pause"]:active,
.mobile-play-btn:active {
    animation: pulse 0.2s ease;
}
/* Añadir al archivo css/reproductor.css */

/* Reproductor expandido para móviles */
.player-expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #181818 0%, #282828 100%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.player-expanded.hidden {
    display: none;
}

.expanded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.close-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.expanded-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.expanded-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 30px;
}

.expanded-album-art {
    width: 280px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #282828;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.expanded-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expanded-track-info {
    text-align: center;
    max-width: 100%;
}

.expanded-track-title {
    font-weight: 700;
    color: white;
    font-size: 24px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.expanded-track-artist {
    color: #b3b3b3;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.expanded-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.expanded-time {
    color: #a7a7a7;
    font-size: 14px;
    min-width: 45px;
    font-feature-settings: "tnum";
}

.expanded-time:first-child {
    text-align: right;
}

.expanded-time:last-child {
    text-align: left;
}

.expanded-progress-bar {
    flex: 1;
    height: 6px;
    background: #5e5e5e;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.expanded-progress-bar:hover {
    height: 8px;
}

.expanded-progress {
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.expanded-progress-handle {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.expanded-progress-bar:hover .expanded-progress-handle {
    opacity: 1;
}

.expanded-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.expanded-control-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expanded-control-btn:hover {
    color: white;
}

.expanded-control-btn.active {
    color: #1DB954;
}

.expanded-play-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.expanded-play-btn:hover {
    background: #f0f0f0;
    transform: scale(1.06);
}

.expanded-volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 200px;
}

.expanded-volume-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.expanded-volume-btn:hover {
    color: white;
}

.expanded-volume-slider {
    width: 100%;
    height: 6px;
    background: #5e5e5e;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    transition: height 0.2s ease;
}

.expanded-volume-slider:hover {
    height: 8px;
}

.expanded-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.expanded-volume-slider:hover::-webkit-slider-thumb {
    opacity: 1;
}

.expanded-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.expanded-volume-slider:hover::-moz-range-thumb {
    opacity: 1;
}

.expanded-like-container {
    margin-top: 20px;
}

.expanded-like-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 12px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.expanded-like-btn:hover {
    opacity: 1;
    color: #1DB954;
}

/* Botón para expandir reproductor en móvil */
.expand-player-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #1DB954;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.expand-player-btn:hover {
    background: #1ed760;
    transform: scale(1.05);
}

/* Animaciones */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.player-expanded:not(.hidden) {
    animation: slideUp 0.3s ease-out;
}

.player-expanded.hidden {
    animation: slideDown 0.3s ease-out;
}

/* Ajustes responsivos para el reproductor expandido */
@media (max-width: 480px) {
    .player-expanded {
        padding: 16px;
    }
    
    .expanded-album-art {
        width: 240px;
        height: 240px;
    }
    
    .expanded-track-title {
        font-size: 20px;
    }
    
    .expanded-track-artist {
        font-size: 16px;
    }
    
    .expanded-controls {
        gap: 20px;
    }
    
    .expanded-play-btn {
        width: 56px;
        height: 56px;
    }
}

/* Mostrar botón expandir solo en móvil */
@media (max-width: 768px) {
    .expand-player-btn {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .expand-player-btn {
        display: none !important;
    }
}

/* Loader para botones de reproducción */
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loader para versión expandida */
.expanded-play-btn .loader {
    width: 24px;
    height: 24px;
    border-width: 3px;
}