
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6c91bf;
    --background-color: #f5f7fc;
    --card-color: #ffffff;
    --text-color: #333;
    --text-secondary: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

header h1 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    overflow: hidden;
    width: 300px;
}

#search-input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.3s;
}

#search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.player-container {
    display: flex;
    padding: 30px;
    gap: 30px;
    border-bottom: 1px solid #eee;
}

.album-art {
    flex: 0 0 250px;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.song-info {
    margin-bottom: 25px;
}

.song-info h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.song-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.progress-container {
    margin-bottom: 25px;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--primary-color);
    transition: width 0.3s;
}

.time-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-buttons button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.3);
}

.control-buttons button:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

#play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    width: 150px;
}

.volume-control i {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

#volume-slider {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.playlist-container {
    padding: 20px 30px;
}

.playlist-container h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

#playlist {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

#playlist::-webkit-scrollbar {
    width: 8px;
}

#playlist::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#playlist::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#playlist li {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
}

#playlist li:last-child {
    border-bottom: none;
}

#playlist li:hover {
    background: #f8fafd;
}

#playlist li.active {
    background: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

#playlist li .play-icon {
    margin-right: 15px;
    color: var(--text-secondary);
    width: 20px;
    text-align: center;
}

#playlist li.active .play-icon {
    color: var(--primary-color);
}

#playlist li .song-info {
    flex: 1;
}

#playlist li .song-title {
    font-weight: 500;
    margin-bottom: 3px;
}

#playlist li .song-artist {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

#playlist li .song-duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-container {
        flex-direction: column;
    }
    
    .album-art {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .search-box {
        width: 100%;
    }
}

            
