/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas: 
        "header header"
        "player playlist";
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    grid-area: header;
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 10px;
}

.header p {
    color: #aaa;
}

/* 播放器区域 */
.player-container {
    grid-area: player;
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.media-display {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.cover-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#video-display {
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.hidden {
    display: none;
}

/* 旋转动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rotate-animation {
    animation: spin 10s linear infinite;
}

/* 歌曲信息 */
.song-info {
    text-align: center;
    margin-bottom: 20px;
}

.song-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #ffffff;
}

.song-info p {
    color: #aaa;
    font-size: 1rem;
}

/* 进度条 */
.progress-container {
    margin-bottom: 20px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aaa;
}

.progress-bar {
    height: 6px;
    background-color: #444;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-filled {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-thumb {
    position: absolute;
    top: -3px;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover .progress-thumb {
    opacity: 1;
}

/* 控制按钮 */
.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.control-btn:hover {
    color: #4CAF50;
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4CAF50;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.play-btn:hover {
    background-color: #3e8e41;
}

/* 音量控制 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.volume-control i {
    color: #aaa;
    font-size: 1rem;
}

#volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: #444;
    border-radius: 2px;
    outline: none;
}

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

/* 播放列表 */
.playlist-container {
    grid-area: playlist;
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.playlist-container h2 {
    margin-bottom: 15px;
    color: #4CAF50;
    font-size: 1.5rem;
}

.playlist-search {
    margin-bottom: 15px;
}

#search-input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    background-color: #333;
    color: white;
    outline: none;
}

.playlist-items {
    list-style: none;
}

.playlist-item {
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.playlist-item:hover {
    background-color: #444;
}

.playlist-item.active {
    background-color: #4CAF50;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "player"
            "playlist";
    }
    
    .cover-image {
        width: 200px;
        height: 200px;
    }
}