/* Study Music Player Styles - Three State System */
.music-player {
    position: fixed;
    bottom: 75px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 998;
    overflow: hidden;
}

/* State 1: Icon only */
.music-player.icon-only {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: pulse-music 3s infinite;
}

.music-player.icon-only .music-controls {
    display: none;
}

.music-player.icon-only .music-toggle {
    width: 100%;
    height: 100%;
    background: none;
    border-radius: 50%;
    margin: 0;
}

.music-player.icon-only .music-toggle i {
    font-size: 20px;
    color: white;
}

/* State 2: Expanded with controls */
.music-player.expanded {
    width: 280px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.music-player.expanded .music-toggle {
    display: none;
}

.music-player.expanded .music-close {
    display: flex;
}

.music-player.icon-only .music-close {
    display: none;
}

@keyframes pulse-music {
    0%, 100% { transform: scale(1); box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5); }
}

.music-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-toggle i {
    color: white;
    transition: all 0.3s ease;
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Close button for expanded state */
.music-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.music-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.music-btn {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
}

.music-btn:hover {
    background: white;
    transform: scale(1.1);
}

.music-btn i {
    font-size: 14px;
}

.music-select {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 15px;
    padding: 8px 12px;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.music-select:hover {
    background: white;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Music player notification */
.music-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 16px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.music-notification.show {
    opacity: 1;
    animation: musicPulse 2s ease-out;
}

@keyframes musicPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .music-player {
        bottom: 65px;
        right: 15px;
    }
    
    .music-player.icon-only {
        width: 40px;
        height: 40px;
    }
    
    .music-player.icon-only .music-toggle i {
        font-size: 18px;
    }
    
    .music-player.expanded {
        width: 240px;
        padding: 12px;
    }
    
    .music-controls {
        flex-direction: column;
    }
    
    .volume-slider {
        width: 120px;
    }
}