/* /css/footer-player.css */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    z-index: 9999;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
    display: flex !important; /* Force display */
    align-items: center;
    font-family: 'Segoe UI', Arial, sans-serif;
    border-top: 2px solid #3498db;
    padding: 0 20px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fallback for player elements visibility */
.player-song-info,
.player-controls,
.player-volume-section {
    visibility: visible !important;
    opacity: 1 !important;
}

.fa-play:before {
    content: "\f04b";
}
.fa-pause:before {
    content: "\f04c";
}

/* Ensure buttons are visible */
.player-btn,
.player-volume-btn {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure images are visible */
.player-song-artwork img {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Song info section */
.player-song-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 20px;
}

.player-song-artwork {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    background: #2c3e50; /* Fallback background */
}

.player-song-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-song-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.player-song-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.player-song-artist {
    font-size: 12px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player controls section */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 2;
    gap: 25px;
}

.player-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.player-btn:active {
    transform: scale(0.95);
}

#player-play-btn {
    background: #3498db;
    width: 40px;
    height: 40px;
    font-size: 20px;
}

#player-play-btn:hover {
    background: #2980b9;
}

/* Volume control section */
.player-volume-section {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    gap: 10px;
}

.player-volume-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.player-volume-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-volume-slider-container {
    width: 100px;
    display: flex;
    align-items: center;
}

.player-volume-slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

.player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
}

.player-volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
}

/* Progress bar at top of player */
.player-progress-container {
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
     
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    height: 6px;
}

.player-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #8e44ad);
    width: 0%;
    border-radius: 0 3px 3px 0;
    transition: width 0.1s linear;
    height: 6px;
}

.player-time-display {
    position: absolute;
    top: -25px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 3px;
    display: none;
    white-space: nowrap;
}

.player-progress-container:hover .player-time-display {
    display: block;
}

/* Auto-play Modal */
.autoplay-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.autoplay-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #3498db, #8e44ad);
    color: white;
    padding: 20px;
    text-align: center;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

.permission-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn-allow, .btn-deny {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 160px;
}

.btn-allow {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.btn-deny {
    background: #e0e0e0;
    color: #333;
}

.btn-allow:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-deny:hover {
    background: #d0d0d0;
}

.note {
    font-size: 12px;
    color: #777;
    margin-top: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .music-player {
        padding: 0 10px;
    }
    
    .player-song-artwork {
        width: 45px;
        height: 45px;
        margin-right: 10px;
    }
    
    .player-controls {
        gap: 15px;
    }
    
    .player-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    #player-play-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .player-volume-section {
        display: none; /* मोबाइल पर volume hide करें */
    }
    
    .player-volume-slider-container {
        width: 50px;
    }
    
    .permission-options {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-allow, .btn-deny {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .music-player {
        height: 70px;
    }
    
    .player-song-title {
        font-size: 12px;
    }
    
    .player-song-artist {
        font-size: 10px;
    }
    
    .player-song-artwork {
        width: 45px;
        height: 45px;
    }
    
    .player-controls {
        gap: 10px;
    }
    
    .player-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    #player-play-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}