/* style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.player-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.current-song {
    text-align: center;
    margin-bottom: 30px;
}

.current-song h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.progress-container {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.control-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.control-btn.play-pause {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.search-container {
    margin-bottom: 20px;
}

#searchBar {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.song-list {
    margin-top: 30px;
}

.song-list h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3rem;
}

.song-item,
.folder-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.song-item:hover,
.folder-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.song-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.folder-item {
    cursor: pointer;
    font-weight: 600;
}

.folder-name {
    flex: 1;
    display: flex;
    align-items: center;
}

.folder-name .icon {
    margin-right: 10px;
}

.folder-contents {
    padding-left: 20px;
    /* 缩进文件夹内容 */
    margin-top: 10px;
}


/* 隐藏文件夹内容 */

.folder-item.collapsed .folder-contents {
    display: none;
}

.song-info {
    flex: 1;
    cursor: pointer;
}

.song-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.song-size {
    font-size: 0.8rem;
    opacity: 0.7;
}

.song-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.song-item.active .download-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.song-item.active .download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 10px;
    margin: 20px 0;
}

.status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status-indicator.show {
    opacity: 1;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    .header h1 {
        font-size: 2rem;
    }
    .player-container {
        padding: 20px;
    }
    .controls {
        gap: 15px;
    }
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .control-btn.play-pause {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}