/* Modern Music Player Styles - Media Manager Design */
.music-player-window {
    width: 900px;
    min-width: 700px;
    max-width: 1100px;
    height: 650px;
    min-height: 550px;
    max-height: 85vh;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.music-player-content {
    height: calc(100% - 60px);
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Main Layout: Horizontal Split */
.player-layout {
    display: flex;
    height: 100%;
    gap: 0;
}

/* Left Side: Player Controls */
.player-left {
    flex: 0 0 400px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    border-right: 2px solid rgba(0, 209, 255, 0.2);
    overflow-y: auto;
}

/* Current Song Section */
.current-song-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 209, 255, 0.1);
}

.song-artwork {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 16px;
    background: linear-gradient(45deg, #00d1ff, #ff4d8d, #00ff88);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 209, 255, 0.3);
}

.artwork-placeholder {
    font-size: 64px;
    color: white;
    z-index: 2;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.music-visualizer {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    height: 25px;
    align-items: end;
    z-index: 1;
}

.music-visualizer .bar {
    width: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    animation: musicBar 1.5s ease-in-out infinite;
}

.music-visualizer .bar:nth-child(1) { animation-delay: 0.1s; }
.music-visualizer .bar:nth-child(2) { animation-delay: 0.2s; }
.music-visualizer .bar:nth-child(3) { animation-delay: 0.3s; }
.music-visualizer .bar:nth-child(4) { animation-delay: 0.4s; }
.music-visualizer .bar:nth-child(5) { animation-delay: 0.5s; }

@keyframes musicBar {
    0%, 100% { height: 8px; }
    50% { height: 20px; }
}

.song-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-title {
    font-size: 22px;
    font-weight: 600;
    color: #00d1ff;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 209, 255, 0.3);
}

.song-artist {
    font-size: 16px;
    color: #8b949e;
    margin: 0;
}

.song-duration {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #58a6ff;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

/* Progress Section */
.progress-section {
    padding: 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00d1ff;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 209, 255, 0.6);
    transition: all 0.2s ease;
}

.progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 25px rgba(0, 209, 255, 0.9);
}

.progress-bar::-webkit-slider-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #00d1ff 0%, rgba(255, 255, 255, 0.1) 0%);
}

/* Player Controls */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

.control-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 209, 255, 0.3);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    color: #00d1ff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(0, 209, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 209, 255, 0.4);
}

.play-pause-btn {
    width: 70px;
    height: 70px;
    font-size: 28px;
    background: linear-gradient(45deg, #00d1ff, #ff4d8d);
    border: none;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 209, 255, 0.4);
}

.play-pause-btn:hover {
    background: linear-gradient(45deg, #ff4d8d, #00d1ff);
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 209, 255, 0.6);
}

.control-btn.active {
    background: rgba(0, 209, 255, 0.3);
    color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(0, 209, 255, 0.1);
}

.volume-icon {
    font-size: 20px;
    color: #00d1ff;
}

.volume-slider {
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00d1ff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 209, 255, 0.5);
}

.volume-percentage {
    font-size: 12px;
    color: #8b949e;
    min-width: 35px;
    font-family: 'Courier New', monospace;
}

/* Right Side: Playlist Section */
.playlist-section {
    flex: 1;
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid rgba(0, 209, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.playlist-header h3 {
    color: #00d1ff;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 209, 255, 0.3);
}

.playlist-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.refresh-btn {
    background: rgba(0, 209, 255, 0.1);
    border: 1px solid rgba(0, 209, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: #00d1ff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(0, 209, 255, 0.2);
    transform: rotate(180deg);
    box-shadow: 0 0 15px rgba(0, 209, 255, 0.4);
}

.playlist-count {
    color: #8b949e;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Playlist Items */
.playlist-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    min-height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.playlist-item:hover {
    background: rgba(0, 209, 255, 0.08);
    border-left-color: #00d1ff;
    box-shadow: inset 0 0 20px rgba(0, 209, 255, 0.1);
}

.playlist-item.active {
    background: rgba(0, 209, 255, 0.15);
    border-left-color: #00d1ff;
    box-shadow: inset 0 0 30px rgba(0, 209, 255, 0.2);
}

.track-number {
    color: #8b949e;
    font-size: 14px;
    width: 25px;
    text-align: center;
    font-weight: 600;
}

.playlist-item.active .track-number {
    color: #00d1ff;
}

.track-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-title {
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.playlist-item.active .track-title {
    color: #00d1ff;
    font-weight: 600;
}

.track-artist {
    color: #8b949e;
    font-size: 13px;
}

.track-duration {
    color: #8b949e;
    font-size: 13px;
    min-width: 45px;
    font-family: 'Courier New', monospace;
}

.track-controls {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.playlist-item:hover .track-controls {
    opacity: 1;
}

.track-play-btn {
    background: rgba(0, 209, 255, 0.1);
    border: 1px solid rgba(0, 209, 255, 0.3);
    color: #00d1ff;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.track-play-btn:hover {
    background: rgba(0, 209, 255, 0.2);
    transform: scale(1.05);
}

/* Custom Scrollbars */
.playlist-items::-webkit-scrollbar,
.player-left::-webkit-scrollbar {
    width: 8px;
}

.playlist-items::-webkit-scrollbar-track,
.player-left::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.playlist-items::-webkit-scrollbar-thumb,
.player-left::-webkit-scrollbar-thumb {
    background: rgba(0, 209, 255, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.playlist-items::-webkit-scrollbar-thumb:hover,
.player-left::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 209, 255, 0.6);
}

/* Firefox scrollbar */
.playlist-items,
.player-left {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 209, 255, 0.4) rgba(255, 255, 255, 0.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .music-player-window {
        width: 95vw;
        height: 90vh;
        min-width: 600px;
        max-height: 90vh;
    }
    
    .player-left {
        flex: 0 0 350px;
        padding: 20px;
        gap: 20px;
    }
    
    .song-artwork {
        width: 140px;
        height: 140px;
    }
    
    .artwork-placeholder {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .music-player-window {
        width: 98vw;
        height: 95vh;
        min-width: 320px;
    }
    
    .player-layout {
        flex-direction: column;
    }
    
    .player-left {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 2px solid rgba(0, 209, 255, 0.2);
        padding: 15px;
    }
    
    .current-song-section {
        flex-direction: row;
        text-align: left;
        gap: 15px;
    }
    
    .song-artwork {
        width: 80px;
        height: 80px;
    }
    
    .artwork-placeholder {
        font-size: 32px;
    }
    
    .song-title {
        font-size: 18px;
    }
    
    .player-controls {
        gap: 15px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .play-pause-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .volume-control {
        flex-direction: row;
        justify-content: center;
    }
    
    .volume-slider {
        width: 100px;
    }
    
    .playlist-items {
        max-height: none;
    }
    
    .playlist-item {
        padding: 10px 15px;
        min-height: 50px;
    }
}

/* Animation for playing state */
.music-player-window.playing .music-visualizer .bar {
    animation-play-state: running;
}

.music-player-window.paused .music-visualizer .bar {
    animation-play-state: paused;
    height: 8px;
}

/* Loading animation for refresh button */
.refresh-btn.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}