/* Estilos para el nuevo reproductor móvil */

/* Fuente Ubuntu para el reproductor móvil */
.mobile-player-new * {
    font-family: 'Ubuntu', system-ui, -apple-system, sans-serif !important;
}

/* Contenedor principal - solo visible en móvil */
.mobile-player-new {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

@media (min-width: 1024px) {
    .mobile-player-new {
        display: none !important;
    }
}

/* Mini Player */
.mini-player-new {
    background: linear-gradient(to right, rgba(31, 7, 71, 0.95), rgba(88, 28, 135, 0.95), rgba(31, 7, 71, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(168, 85, 247, 0.3);
    position: relative;
    transition: opacity 0.3s ease;
}

/* Barra de progreso superior */
.progress-bar-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    /* Hacer el área de click más grande en móvil */
    padding-bottom: 8px;
}

.progress-fill {
    height: 4px;
    background: linear-gradient(to right, #a855f7, #ec4899);
    width: 0%;
    transition: width 0.3s ease;
    pointer-events: none; /* Para que el click pase al padre */
}

/* Contenido del mini player */
.mini-player-content {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
}

/* Cover del mini player */
.mini-cover {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-cover {
    color: white;
    opacity: 0.8;
}

/* Info del mini player - clickeable */
.mini-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mini-info:active {
    background: rgba(255, 255, 255, 0.1);
}

.mini-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botones del mini player */
.mini-play-btn,
.mini-next-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mini-play-btn:active,
.mini-next-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.mini-next-btn {
    background: transparent;
    width: 36px;
    height: 36px;
}

/* Reproductor Expandido */
.full-player-new {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(88, 28, 135, 0.98) 0%,
        rgba(31, 7, 71, 0.98) 30%,
        rgba(0, 0, 0, 0.98) 100%);
    z-index: 9999;
    display: none;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.full-player-new.expanded {
    transform: translateY(0);
}

.full-player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    padding-top: env(safe-area-inset-top, 20px);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Header del reproductor expandido */
.full-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 20px;
}

.collapse-btn,
.more-btn {
    background: transparent;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.collapse-btn:active,
.more-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.full-header-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Cover grande */
.full-cover-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    max-height: 400px;
}

.full-cover {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-cover-large {
    color: white;
    opacity: 0.5;
}

/* Info de la canción expandida */
.full-track-info {
    text-align: center;
    padding: 20px 0;
}

.full-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.full-artist {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Barra de progreso expandida */
.full-progress-container {
    padding: 20px 0;
}

.full-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    /* Hacer el área de click más grande */
    padding: 10px 0;
    margin: -10px 0;
}

.full-progress-bar:active .full-progress-fill {
    transform: scaleY(1.3);
}

.full-progress-fill {
    height: 6px;
    background: linear-gradient(to right, #a855f7, #ec4899);
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.3s ease, transform 0.2s ease;
}

.progress-thumb {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.full-progress-bar:active .progress-thumb {
    transform: translateY(-50%) scale(1.2);
}

.time-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Controles principales */
.full-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 30px 0;
}

.control-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    transform: scale(0.95);
    color: white;
}

.control-btn.active {
    color: #a855f7;
}

.play-btn-large {
    background: white;
    border: none;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
    -webkit-tap-highlight-color: transparent;
}

.play-btn-large:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

/* Animaciones */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .mini-info:hover {
        background: transparent;
    }
    
    button:hover {
        background: inherit;
    }
}

/* Ajustes para pantallas pequeñas */
@media (max-height: 600px) {
    .full-cover-container {
        max-height: 250px;
    }
    
    .full-controls {
        padding: 20px 0;
    }
    
    .full-header {
        padding: 15px 0;
        margin-bottom: 10px;
    }
}