/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(25, 25, 35, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 30px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 2.8rem;
    color: #7c3aed;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: #a78bfa;
    margin-bottom: 15px;
}

.server-info {
    font-size: 0.9rem;
    color: #94a3b8;
    background: rgba(124, 58, 237, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* 搜索区域 */
.search-section {
    background: rgba(30, 30, 46, 0.7);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

#search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(124, 58, 237, 0.3);
    transition: all 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

#search-btn, #clear-btn {
    padding: 15px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 600;
}

#search-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: white;
}

#search-btn:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    transform: translateY(-2px);
}

#clear-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

#clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.search-controls {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.source-select, .limit-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-select label, .limit-select label {
    color: #cbd5e1;
    font-weight: 500;
}

.source-select select, .limit-select select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid rgba(124, 58, 237, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.source-select select:focus, .limit-select select:focus {
    outline: none;
    border-color: #7c3aed;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1100px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 结果区域 */
.results-section, .player-section {
    background: rgba(30, 30, 46, 0.7);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.results-section h2, .player-section h2 {
    color: #a78bfa;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
}

#results-count {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: normal;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.pagination button {
    padding: 10px 20px;
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination button:hover:not(:disabled) {
    background: rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    color: #cbd5e1;
    font-weight: 500;
}

.bottom-pagination {
    margin-top: 20px;
}

/* 结果容器 */
.results-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.5);
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.7);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    margin-bottom: 20px;
    color: #7c3aed;
}

/* 歌曲项样式 */
.song-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 15px;
}

.song-item:hover {
    background: rgba(124, 58, 237, 0.1);
    border-left-color: #7c3aed;
    transform: translateX(5px);
}

.song-item.selected {
    background: rgba(124, 58, 237, 0.2);
    border-left-color: #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

.song-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.song-details {
    flex: 1;
}

.song-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #f8fafc;
}

.song-details p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.song-actions {
    display: flex;
    gap: 10px;
}

.song-actions button {
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.play-btn {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.play-btn:hover {
    background: rgba(124, 58, 237, 0.4);
}

.download-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #34d399;
}

.download-btn:hover {
    background: rgba(34, 197, 94, 0.4);
}

/* 播放器区域 */
.player-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-song-selected {
    text-align: center;
    color: #94a3b8;
}

.currently-playing {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-top: 25px;
}

.song-info {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

#current-album-art {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.song-details h3 {
    font-size: 1.5rem;
    color: #f8fafc;
    margin-bottom: 5px;
}

.song-details p {
    color: #94a3b8;
    font-size: 1rem;
}

.player-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.player-controls button {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

#play-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

#play-btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-2px);
}

#pause-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

#pause-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
}

#stop-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

#stop-btn:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-2px);
}

#download-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

#download-btn:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    transform: translateY(-2px);
}

.player-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 说明区域 */
.instructions {
    background: rgba(124, 58, 237, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid #7c3aed;
}

.instructions h3 {
    color: #a78bfa;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    list-style-type: none;
    padding-left: 10px;
}

.instructions li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    color: #cbd5e1;
}

.instructions li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* 页脚 */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.9rem;
}

footer a {
    color: #a78bfa;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #7c3aed;
    text-decoration: underline;
}

.small {
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #7c3aed;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .song-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .song-actions {
        width: 100%;
        justify-content: center;
    }
    
    .player-controls {
        justify-content: center;
    }
    
    .song-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}