* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 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;
}

header h1 {
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 搜索区域样式 */
.search-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 搜索模式切换样式 */
.search-mode {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.search-mode label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
    padding: 15px 30px;
    border-radius: 20px;
    position: relative;
    min-width: 120px;
    text-align: center;
    font-size: 14px;
}

.search-mode label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-mode input[type="radio"] {
    display: none;
}

.search-mode input[type="radio"]:checked + span {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.search-mode span {
    transition: all 0.3s ease, transform 0.3s ease;
    border-radius: 20px;
    padding: 0;
}

/* 搜索数量选择框样式 */
#searchLimit {
    padding: 15px 10px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    flex: 0 0 auto;
    width: 80px;
    margin-right: 10px;
}

#searchLimit:focus {
    border-color: #667eea;
}

.input-group {
    display: flex;
    gap: 10px;
}

#songInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#songInput:focus {
    border-color: #667eea;
}

#qualitySelect {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 140px;
}

#qualitySelect:focus {
    border-color: #667eea;
}

#searchBtn {
    padding: 12px 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s;
}

#searchBtn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 搜索结果样式 */
.search-results {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.search-results h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.results-list {
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.result-item .song-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.result-item .song-artist {
    color: #666;
    margin-bottom: 3px;
    font-size: 14px;
}

.result-item .song-album {
    color: #888;
    font-size: 12px;
}

.result-item .song-duration {
    color: #999;
    font-size: 12px;
    float: right;
    margin-top: -20px;
}

.player-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.song-info {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
}

.album-cover {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.song-details h2 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.8em;
}

.song-details p {
    color: #666;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.audio-player {
    margin-bottom: 25px;
}

#audioPlayer {
    width: 100%;
    height: 50px;
}

.lyrics-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.lyrics-container {
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.8;
    font-size: 14px;
    color: #555;
    white-space: pre-line;
}

.loading {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #ffcdd2;
}

/* 下载按钮样式 */
.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 下载进度条样式 */
.download-progress {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 15px;
    width: 300px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* 为song-details添加相对定位以支持绝对定位的进度条 */
.song-details {
    position: relative;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .search-mode {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .search-options {
        padding: 12px;
        margin: 10px 0;
    }
    
    .search-options label {
        display: block;
        margin-bottom: 8px;
        margin-right: 0;
    }
    
    #searchLimit {
        width: 70px;
        font-size: 14px;
        padding: 12px 8px;
        margin-right: 8px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    #qualitySelect {
        min-width: auto;
    }
    
    .search-results {
        padding: 15px;
    }
    
    .result-item {
        padding: 12px;
    }
    
    .result-item .song-title {
        font-size: 14px;
    }
    
    .result-item .song-artist,
    .result-item .song-album {
        font-size: 12px;
    }
    
    .song-info {
        flex-direction: column;
        text-align: center;
    }
    
    .album-cover {
        margin-bottom: 20px;
    }
    
    .download-btn {
        width: 100%;
        margin-top: 20px;
    }
    
    .download-progress {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 10px;
        margin-left: 0;
        width: auto;
        padding: 10px;
        z-index: 10;
    }
    
    .progress-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .song-info {
        flex-direction: column;
        text-align: center;
    }
    
    .album-cover {
        width: 120px;
        height: 120px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #qualitySelect {
        min-width: auto;
    }
    
    header h1 {
        font-size: 2em;
    }
}