/* Audio Player Component - ULTRA COMPACT MOBILE PLAYER */

#audio-player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.player-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

/* Song Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 130px;
    flex: 2;
    cursor: pointer;
}

.player-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.player-details {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-weight: 500;
    font-size: 12px;
    margin-bottom: 2px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controls - All buttons visible on desktop */
.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.player-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.player-btn:active {
    transform: scale(0.95);
}

.play-pause {
    background: var(--primary-color);
    width: 38px;
    height: 38px;
}

.play-pause:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.play-pause i {
    font-size: 16px;
}

/* Progress Bar */
.player-progress {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
}

.current-time,
.duration {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 35px;
    text-align: center;
    font-family: monospace;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-bar:hover {
    height: 4px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Action Buttons - Like, Share, Download (desktop) */
.player-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.player-actions .player-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.player-actions .player-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Active like button state */
.player-actions .like-active {
    color: var(--danger-color);
}

.player-actions .like-active i {
    color: var(--danger-color);
}

/* ========== DESKTOP (min-width 769px) ========== */
@media (min-width: 769px) {
    .player-container {
        padding: 10px 24px;
    }
    
    .player-cover {
        width: 48px;
        height: 48px;
    }
    
    .player-title {
        font-size: 14px;
    }
    
    .player-artist {
        font-size: 12px;
    }
    
    .player-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .play-pause {
        width: 44px;
        height: 44px;
    }
    
    .play-pause i {
        font-size: 18px;
    }
    
    .player-actions .player-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* ========== MOBILE (max-width 768px) - ULTRA COMPACT ========== */
@media (max-width: 768px) {
    /* Main container - reduce padding significantly */
    #audio-player-container {
        background: rgba(5, 5, 5, 0.95);
    }
    
    .player-container {
        padding: 4px 10px;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    /* Song info - smaller and inline */
    .player-info {
        min-width: 0;
        flex: 1;
        gap: 6px;
        margin-bottom: 0;
        width: auto;
        order: 1;
    }
    
    .player-cover {
        width: 28px;
        height: 28px;
    }
    
    .player-title {
        font-size: 10px;
        max-width: 80px;
    }
    
    .player-artist {
        font-size: 8px;
    }
    
    /* Hide artist on mobile to save space */
    .player-artist {
        display: none;
    }
    
    /* Hide next, previous, shuffle, repeat buttons on mobile */
    #prev-btn,
    #next-btn,
    #shuffle-btn,
    #repeat-btn {
        display: none !important;
    }
    
    /* Controls - play button only, centered */
    .player-controls {
        order: 2;
        flex-shrink: 0;
        gap: 8px;
        margin: 0;
    }
    
    .play-pause {
        width: 36px;
        height: 36px;
    }
    
    .play-pause i {
        font-size: 14px;
    }
    
    /* Share and Download buttons on sides */
    .player-actions {
        order: 3;
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    
    .player-actions .player-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
        background: rgba(255, 255, 255, 0.08);
    }
    
    /* Hide like button on mobile */
    #like-player-btn {
        display: none;
    }
    
    /* Progress bar - compact and inline */
    .player-progress {
        order: 4;
        width: auto;
        flex: 1;
        min-width: 100px;
        gap: 4px;
        margin-top: 0;
    }
    
    .current-time,
    .duration {
        font-size: 9px;
        min-width: 25px;
    }
    
    .progress-bar {
        height: 2px;
    }
}

/* ========== VERY SMALL MOBILE (max-width 480px) ========== */
@media (max-width: 480px) {
    .player-container {
        padding: 3px 8px;
        gap: 6px;
    }
    
    .player-cover {
        width: 24px;
        height: 24px;
    }
    
    .player-title {
        font-size: 9px;
        max-width: 70px;
    }
    
    .play-pause {
        width: 32px;
        height: 32px;
    }
    
    .play-pause i {
        font-size: 12px;
    }
    
    .player-actions .player-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .player-progress {
        min-width: 80px;
        gap: 3px;
    }
    
    .current-time,
    .duration {
        font-size: 8px;
        min-width: 22px;
    }
    
    .progress-bar {
        height: 2px;
    }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .player-btn {
        min-width: 36px;
        min-height: 36px;
    }
    
    .progress-bar {
        min-height: 4px;
    }
}

/* Animation for playing */
@keyframes playingPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.play-pause.playing {
    animation: playingPulse 1s ease-in-out infinite;
}

/* Light mode support */
.light-theme #audio-player-container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.light-theme .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}