/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏样式 */
.top-nav {
    background-color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    color: #666;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: #1db954;
}

.nav-item.active {
    color: #1db954;
    background-color: rgba(29, 185, 84, 0.1);
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

#searchInput {
    border: none;
    background: none;
    outline: none;
    padding: 0.5rem;
    width: 300px;
    font-size: 1rem;
}

#searchBtn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    min-width: 40px;
}

#searchBtn:hover {
    color: #1db954;
}

#searchBtn.loading {
    pointer-events: none;
    opacity: 0.7;
}

#searchBtn.loading i {
    display: none;
}

#searchBtn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #666;
    border-top-color: transparent;
    border-radius: 50%;
    animation: search-loading 0.8s linear infinite;
}

@keyframes search-loading {
    to {
        transform: rotate(360deg);
    }
}

.user-profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 主要内容区样式 */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 2rem;
    padding: 2rem;
    flex: 1;
}

/* 播放列表区域样式 */
.playlist-section {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.playlist-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.playlist {
    list-style: none;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

/* 播放器区域样式 */
.player-section {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#albumCover {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.track-info {
    flex: 1;
}

.track-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.track-info p {
    color: #666;
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.control-btn:hover {
    color: #1db954;
}

.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1db954;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.play-btn:hover {
    background-color: #1ed760;
    color: white;
    transform: scale(1.05);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #eee;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

#progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #1db954;
    border-radius: 2px;
    width: 0%;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background-color: #eee;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

#volumeBar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #1db954;
    border-radius: 2px;
    width: 100%;
}

/* 歌词区域样式 */
.lyrics-section {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lyrics-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.lyrics-content {
    height: calc(100vh - 250px);
    overflow-y: auto;
    padding: 1rem;
    text-align: center;
}

.lyrics-content::-webkit-scrollbar {
    width: 6px;
}

.lyrics-content::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.no-lyrics {
    color: #999;
    text-align: center;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 250px;
        gap: 1rem;
        padding: 1rem;
    }

    #albumCover {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .playlist-section, .lyrics-section {
        display: none;
    }

    .player-section {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .top-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .search-container {
        width: 100%;
    }

    #searchInput {
        width: 100%;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
}

.playlist-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
}

.playlist-item:hover {
    background-color: rgba(29, 185, 84, 0.1);
}

.playlist-item.active {
    background-color: rgba(29, 185, 84, 0.1);
}

.playlist-item .track-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.playlist-item .track-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.playlist-item .track-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.playlist-item .quality {
    font-size: 0.8rem;
    color: #1db954;
    background-color: rgba(29, 185, 84, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    align-self: flex-start;
}

.qishui-link-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.7rem;
    margin-bottom: 0.7rem;
}
#qishuiInput {
    border: none;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    width: 260px;
    outline: none;
}
#qishuiPlayBtn {
    background: #00C3FF;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
#qishuiPlayBtn:hover {
    background: #0099cc;
}

/* 错误提示样式 */
.error-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.error-toast.show {
    opacity: 1;
} 