/* =======================
   全局样式
======================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e6e6e6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* =======================
   容器
======================= */
.container {
    width: 100%;
    max-width: 1600px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    background-color: rgba(30, 30, 46, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* =======================
   Header
======================= */
.header {
    padding: 25px 40px;
    text-align: center;
    background: linear-gradient(to right, #0f3460, #533483);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00dbde, #fc00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: #b0b0d0;
    font-weight: 300;
}

/* =======================
   主体区域
======================= */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* =======================
   侧边栏
======================= */
.sidebar {
    width: 280px;
    background-color: rgba(25, 25, 40, 0.8);
    padding: 25px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex-shrink: 0;
    overflow-y: auto;
}

/* 文件夹头部样式 */
.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refresh-btn {
    background: none;
    border: none;
    color: #7c83fd;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background-color: rgba(124, 131, 253, 0.1);
    transform: rotate(90deg);
}

/* 加载状态 */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #7c83fd;
    gap: 10px;
}

/* 错误信息 */
.error-message {
    background-color: rgba(255, 87, 87, 0.1);
    border-left: 4px solid #ff5757;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff8a8a;
}

.error-message i {
    font-size: 1.2rem;
}

/* 空目录状态 */
.empty-folders {
    text-align: center;
    padding: 30px 20px;
    color: #6c6c8a;
}

.empty-folders i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.empty-folders p {
    font-size: 1.1rem;
}

.folder-section h3, .player-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #7c83fd;
    display: flex;
    align-items: center;
    gap: 10px;
}

.folder-list {
    list-style: none;
}

.folder-list li {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.folder-list li:hover {
    background-color: rgba(124, 131, 253, 0.1);
    transform: translateX(5px);
}

.folder-list li.active {
    background-color: rgba(124, 131, 253, 0.25);
    color: #7c83fd;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(124, 131, 253, 0.2);
}

.info-content p {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

.info-content p strong {
    color: #7c83fd;
    margin-right: 8px;
}

/* =======================
   内容区（右侧）
======================= */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow: hidden;
    min-height: 0;
}

/* =======================
   当前路径
======================= */
.current-path {
    background-color: rgba(25, 25, 40, 0.8);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: #a0a0d0;
    border-left: 4px solid #7c83fd;
    flex-shrink: 0;
}

/* =======================
   歌曲列表区域
======================= */
.songs-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 10px; /* 添加底部边距，防止被播放器遮挡 */
}

.songs-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #e6e6e6;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.songs-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: rgba(25, 25, 40, 0.5);
    border-radius: 15px;
    padding: 20px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6c6c8a;
    font-size: 1.2rem;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* =======================
   歌曲网格
======================= */
.song-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.song-item {
    background-color: rgba(40, 40, 60, 0.8);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.song-item:hover {
    background-color: rgba(124, 131, 253, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.song-item.active {
    background-color: rgba(124, 131, 253, 0.2);
    border-color: #7c83fd;
}

.song-number {
    width: 40px;
    height: 40px;
    background-color: rgba(124, 131, 253, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #7c83fd;
    margin-right: 20px;
}

.song-info {
    flex: 1;
}

.song-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #e6e6e6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    font-size: 0.9rem;
    color: #a0a0d0;
}

.song-action {
    font-size: 1.8rem;
    color: #7c83fd;
    transition: transform 0.3s ease;
}

.song-item:hover .song-action {
    transform: scale(1.2);
}
/* =======================
   播放器区域 - 最小化版本
======================= */
.player-area {
    background-color: rgba(20, 20, 35, 0.95);
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px; /* 固定最小高度 */
    max-height: 80px; /* 固定最大高度 */
    overflow: hidden;
}

.player-controls {
    background-color: rgba(25, 25, 40, 0.9);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 800px;
    margin: 0 auto;
    height: 60px;
    overflow: hidden;
}

/* 超紧凑布局 - 水平排列所有元素 */
.player-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 200px; /* 固定宽度 */
    min-width: 150px;
}

.now-playing-cover {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7c83fd, #5d63d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.now-playing-cover .spin {
    animation: spin 3s linear infinite;
}

.now-playing-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.now-playing-info h3 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: #e6e6e6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-info p {
    color: #a0a0d0;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.control-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(124, 131, 253, 0.2);
    border: none;
    color: #7c83fd;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover:not(:disabled) {
    background-color: rgba(124, 131, 253, 0.4);
    transform: scale(1.05);
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.play-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    background-color: #7c83fd;
    color: white;
}

.play-btn:hover:not(:disabled) {
    background-color: #6a70e0;
}

.progress-section {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #a0a0d0;
}

.progress-bar {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, #7c83fd, #5d63d4);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.volume-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 120px;
}

.volume-icon {
    font-size: 0.8rem;
    color: #7c83fd;
}

.volume-slider {
    width: 70px;
    height: 3px;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #7c83fd;
    cursor: pointer;
}

.volume-percent {
    width: 30px;
    text-align: center;
    font-size: 0.7rem;
    color: #a0a0d0;
}

/* =======================
   播放器区域 (在footer内部)
======================= */
/* .player-area {
    background-color: rgba(20, 20, 35, 0.95);
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-controls {
    background-color: rgba(25, 25, 40, 0.9);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 15px;
}

.now-playing-cover {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7c83fd, #5d63d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 5px 15px rgba(124, 131, 253, 0.3);
    flex-shrink: 0;
}

.now-playing-cover .spin {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.now-playing-info {
    flex: 1;
    min-width: 0;
}

.now-playing-info h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #e6e6e6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.now-playing-info p {
    color: #a0a0d0;
    font-size: 0.95rem;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(124, 131, 253, 0.2);
    border: none;
    color: #7c83fd;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover:not(:disabled) {
    background-color: rgba(124, 131, 253, 0.4);
    transform: scale(1.1);
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.play-btn {
    width: 65px;
    height: 65px;
    font-size: 1.6rem;
    background-color: #7c83fd;
    color: white;
}

.play-btn:hover:not(:disabled) {
    background-color: #6a70e0;
    box-shadow: 0 5px 15px rgba(124, 131, 253, 0.4);
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #a0a0d0;
}

.progress-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, #7c83fd, #5d63d4);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.volume-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.volume-icon {
    font-size: 1.1rem;
    color: #7c83fd;
}

.volume-slider {
    width: 150px;
    height: 5px;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #7c83fd;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(124, 131, 253, 0.5);
}

.volume-percent {
    width: 40px;
    text-align: center;
    font-size: 0.85rem;
    color: #a0a0d0;
} */

/* =======================
   底部样式
======================= */
.footer {
    background-color: rgba(15, 15, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.footer-info {
    padding: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: #8a8ab5;
    background-color: rgba(10, 10, 25, 0.9);
}

/* =======================
   滚动条样式
======================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(25, 25, 40, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 131, 253, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 131, 253, 0.8);
}

/* =======================
   响应式设计
======================= */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .folder-section, .player-info {
        flex: 1;
    }
    
    .song-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    body {
        padding: 0;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .sidebar {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .song-list {
        grid-template-columns: 1fr;
    }
    
    .controls {
        gap: 15px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
    }
    
    .play-btn {
        width: 55px;
        height: 55px;
    }
    
    .now-playing-cover {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
    
    .volume-slider {
        width: 120px;
    }
    
    .player-area {
        padding: 12px;
    }
    
    .player-controls {
        padding: 12px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .content {
        padding: 20px;
    }
    
    .current-path {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .song-item {
        padding: 15px;
    }
    
    .song-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-right: 15px;
    }
    
    .song-info h4 {
        font-size: 1.1rem;
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .now-playing-cover {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .volume-slider {
        width: 100px;
    }
    
    /* 在超小屏幕上，将播放器布局改为垂直 */
    .player-controls {
        gap: 10px;
    }
    
    .now-playing {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .progress-section {
        width: 100%;
    }
    
    .volume-section {
        width: 100%;
        justify-content: center;
    }
}