/* 音乐播放组件 */
#music-player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.music-player {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.player-vinyl {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.player-cover {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #333;
}

.player-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #333;
    z-index: 2;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0.95;
}

/* 唱针样式 */
.player-needle {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    transform-origin: top right;
    transition: transform 0.5s ease-in-out;
    transform: rotate(0deg);
    z-index: 3;
}

.needle-arm {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: #333;
    transform-origin: top right;
    transform: rotate(-45deg);
    border-radius: 1px;
}

.needle-tip {
    position: absolute;
    bottom: 10px;
    left: 5px;
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 播放状态时唱针落下 */
.playing .player-needle {
    transform: rotate(-25deg);
}

/* 唱针与唱片接触点 */
.playing .needle-tip {
    background: #999;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 14px;
    color: #999;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: color 0.3s;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: #16b777;
    background-color: #f0f9f4;
}

.control-btn.play-pause {
    font-size: 24px;
    color: #16b777;
}

.control-btn.play-pause:hover {
    background-color: rgba(22, 183, 119, 0.1);
}

/* 喜欢按钮样式 */
#favorite-btn {
    transition: all 0.3s;
}

#favorite-btn.active {
    color: #ff4757;
}

#favorite-btn.active:hover {
    background-color: rgba(255, 71, 87, 0.1);
}

.player-progress {
    flex: 1;
    margin: 0 20px;
    min-width: 200px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #16b777;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

.progress-time {
    font-size: 12px;
    color: #999;
    min-width: 40px;
    text-align: center;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.volume-bar {
    width: 80px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.volume-fill {
    height: 100%;
    background: #16b777;
    border-radius: 2px;
    width: 70%;
    transition: width 0.1s;
}

/* 菜单按钮样式 */
.player-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

#menu-btn {
    transition: all 0.3s;
}

#menu-btn:hover {
    color: #16b777;
    background-color: #f0f9f4;
}

/* 收藏音乐列表样式 */
.favorite-music-list {
    max-height: 70vh;
    overflow-y: auto;
}

.favorite-music-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.favorite-music-item:hover {
    background-color: #f9f9f9;
}

.favorite-music-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.favorite-music-cover {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.favorite-music-details {
    flex: 1;
    min-width: 0;
}

.favorite-music-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-music-artist {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-music-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.favorite-play-btn,
.favorite-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: color 0.3s;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-play-btn:hover {
    color: #16b777;
    background-color: #f0f9f4;
}

.favorite-remove-btn:hover {
    color: #ff4757;
    background-color: rgba(255, 71, 87, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .music-player {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
        min-height: 80px;
    }
    
    .player-vinyl {
        width: 50px;
        height: 50px;
        order: 1;
        flex-shrink: 0;
    }
    
    .player-cover::before {
        width: 12px;
        height: 12px;
    }
    
    /* 移动端唱针调整 */
    .player-needle {
        width: 30px;
        height: 30px;
        top: -8px;
        right: -8px;
    }
    
    .needle-arm {
        width: 20px;
        height: 1.5px;
    }
    
    .needle-tip {
        width: 6px;
        height: 6px;
        bottom: 8px;
        left: 4px;
    }
    
    .playing .player-needle {
        transform: rotate(-20deg);
    }
    
    .player-info {
        order: 2;
        flex: 1;
        min-width: 120px;
    }
    
    .player-title {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .player-artist {
        font-size: 12px;
    }
    
    .player-controls {
        order: 3;
        gap: 12px;
        flex-basis: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .control-btn {
        font-size: 16px;
        padding: 6px;
    }
    
    .control-btn.play-pause {
        font-size: 20px;
    }
    
    .player-progress {
        order: 4;
        flex-basis: 100%;
        margin: 8px 0 0 0;
        min-width: 0;
    }
    
    .progress-container {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .progress-bar {
        flex: 1;
        height: 3px;
    }
    
    .progress-time {
        font-size: 10px;
        min-width: 30px;
        text-align: center;
    }
    
    .player-volume {
        order: 5;
        flex-basis: 100%;
        justify-content: center;
        margin-top: 8px;
        gap: 8px;
    }
    
    .volume-bar {
        width: 100px;
        height: 3px;
    }
    
    .control-btn#volume-btn {
        padding: 4px;
        font-size: 14px;
    }
    
    .player-menu {
        order: 6;
        flex-basis: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    /* 移动端收藏列表样式 */
    .favorite-music-list {
        max-height: 60vh;
    }
    
    .favorite-music-item {
        padding: 12px 10px;
        gap: 10px;
    }
    
    .favorite-music-info {
        gap: 10px;
    }
    
    .favorite-music-cover {
        width: 45px;
        height: 45px;
        border-radius: 6px;
    }
    
    .favorite-music-details {
        flex: 1;
        min-width: 0;
    }
    
    .favorite-music-name {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .favorite-music-artist {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .favorite-music-actions {
        gap: 6px;
    }
    
    .favorite-play-btn,
    .favorite-remove-btn {
        font-size: 20px;
        padding: 8px;
        min-width: 36px;
        min-height: 36px;
    }
}

/* 播放状态动画 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.playing .player-cover img {
    animation: spin 3s linear infinite;
}