/* 悬浮音乐播放器样式 */
#fmp-floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 折叠状态的音乐图标 */
.fmp-music-icon {
    position: relative;
    cursor: pointer;
}

.fmp-icon-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.fmp-icon-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.fmp-music-note {
    font-size: 24px;
    font-weight: bold;
    animation: fmp-pulse 2s infinite;
}

.fmp-mini-controls {
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fmp-mini-btn {
    background: none;
    border: none;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 展开状态的完整播放器 */
.fmp-player-content {
    width: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: fmp-slideIn 0.3s ease-out;
}

/* 当播放器折叠时隐藏完整内容 */
#fmp-floating-player.collapsed .fmp-player-content {
    display: none !important;
}

/* 当播放器展开时隐藏图标 */
#fmp-floating-player.expanded .fmp-music-icon {
    display: none;
}

.fmp-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fmp-title {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.fmp-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fmp-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fmp-current-song {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fmp-song-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fmp-song-artist {
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fmp-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.fmp-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.fmp-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

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

.fmp-play-pause {
    width: 50px;
    height: 50px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.3);
}

.fmp-progress {
    padding: 0 16px 16px;
}

.fmp-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 8px;
    overflow: hidden;
}

.fmp-progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.fmp-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    opacity: 0.8;
}

.fmp-playlist {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
}

.fmp-playlist-header {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fmp-playlist-items {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.fmp-playlist-items::-webkit-scrollbar {
    width: 4px;
}

.fmp-playlist-items::-webkit-scrollbar-track {
    background: transparent;
}

.fmp-playlist-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.fmp-playlist-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.fmp-playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fmp-playlist-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.fmp-playlist-item-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fmp-playlist-item-artist {
    font-size: 11px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fmp-loading {
    text-align: center;
    padding: 20px;
    opacity: 0.7;
    font-size: 12px;
}

/* 播放状态指示器 */
.fmp-playlist-item.playing .fmp-playlist-item-title::before {
    content: "♪ ";
    color: #4ade80;
    animation: fmp-pulse 1.5s infinite;
}

/* 当有音乐播放时，图标显示播放状态 */
#fmp-floating-player.playing .fmp-music-note {
    color: #4ade80;
    animation: fmp-bounce 1s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #fmp-floating-player {
        bottom: 15px;
        right: 15px;
    }
    
    .fmp-icon-circle {
        width: 55px;
        height: 55px;
    }
    
    .fmp-music-note {
        font-size: 22px;
    }
    
    .fmp-player-content {
        width: 280px;
    }
    
    .fmp-current-song {
        padding: 12px;
    }
    
    .fmp-song-title {
        font-size: 14px;
    }
    
    .fmp-controls {
        gap: 8px;
        padding: 12px;
    }
    
    .fmp-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .fmp-play-pause {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .fmp-playlist {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    #fmp-floating-player {
        bottom: 10px;
        right: 10px;
    }
    
    .fmp-icon-circle {
        width: 50px;
        height: 50px;
    }
    
    .fmp-music-note {
        font-size: 20px;
    }
    
    .fmp-player-content {
        width: 260px;
    }
    
    .fmp-playlist-items {
        max-height: 150px;
    }
}

/* 平板端适配 */
@media (min-width: 768px) and (max-width: 1024px) {
    .fmp-player-content {
        width: 300px;
    }
}

/* 动画效果 */
@keyframes fmp-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

@keyframes fmp-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

@keyframes fmp-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .fmp-icon-circle {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .fmp-player-content {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
}

