* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.music-player {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    color: white;
    width: 350px;
    position: relative;
    overflow: hidden;
}

.player-card {
    width: 300px;
}

.song-image img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin: 1rem 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
    transition: all 0.3s ease;
}

.playing .song-image img {
    animation-play-state: running;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.song-details {
    margin: 1.5rem 0;
}

.song-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.artist {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

.progress-bar {
    background: rgba(255,255,255,0.1);
    height: 6px;
    border-radius: 10px;
    margin: 1rem 0;
    cursor: pointer;
    position: relative;
}

.progress-bar:hover {
    height: 8px;
    transition: height 0.1s ease-in-out;
}

.progress-bar:hover .progress {
    background: linear-gradient(90deg, #f72585 0%, #7209b7 50%, #4cc9f0 100%);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    bottom: -8px;
    cursor: pointer;
}

.progress {
    background: linear-gradient(90deg, #f72585 0%, #4cc9f0 100%);
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.1s linear;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

#play {
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

button.active {
    color: #4cc9f0;
    text-shadow: 0 0 10px rgba(76,201,240,0.5);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.volume-control input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: -100vw 0 0 100vw rgba(76,201,240,0.7);
    cursor: pointer;
}

button i {
    font-size: 1rem;
}

/* 加载动画 */
.song-image.loading img {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.extra-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.extra-controls button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.extra-controls button:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

.extra-controls button.active {
    color: #ff4081;
    text-shadow: 0 0 10px rgba(255,64,129,0.5);
}

#like.active {
    color: #ff4081;
}

#collect.active {
    color: #ffd700;
}

/* 添加喜欢按钮动画 */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#like.active i {
    animation: heartBeat 0.3s ease-in-out;
}

/* 添加头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#playlist-btn {
    font-size: 1.2rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#playlist-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

/* 播放列表面板样式 */
.playlist-panel {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255,255,255,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
}

.playlist-panel.active {
    right: 0;
}

.playlist-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.playlist-filters {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: rgba(255,255,255,0.2);
    border-color: transparent;
}

.playlist-container {
    height: calc(100% - 80px);
    overflow-y: auto;
    padding: 1rem;
}

/* 歌曲项样式 */
.song-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.song-item:hover {
    background: rgba(255,255,255,0.1);
}

.song-item.active {
    background: rgba(255,255,255,0.2);
}

.song-item-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 1rem;
}

.song-item-info {
    flex: 1;
}

.song-item-title {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.song-item-artist {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

.song-item-icons {
    display: flex;
    gap: 0.5rem;
}

/* 滚动条样式 */
.playlist-container::-webkit-scrollbar {
    width: 6px;
}

.playlist-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.playlist-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
} 