* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
}

.notice {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 5px;
}

header p {
    color: #666;
    font-size: 14px;
}

.search-container {
    background: white;
    padding: 20px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-container {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.tab {
    flex: 1;
    padding: 8px 0;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tab.active {
    background: #1e88e5;
    color: white;
    border-color: #1e88e5;
}

.tab-content {
    display: none;
    margin-top: 15px;
}

.tab-content.active {
    display: block;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    margin-bottom: 15px;
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.platforms label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.get-btn {
    width: 100%;
    padding: 10px;
    background: #1e88e5;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.get-btn:hover {
    background: #1976d2;
}

.loading {
    display: none;
    text-align: center;
    padding: 15px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    margin-bottom: 20px;
    font-size: 14px;
}

.results {
    margin-top: 20px;
}

.result-item {
    background: white;
    padding: 15px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.result-info h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    word-break: break-all;
}

.platform-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    text-transform: uppercase;
    font-weight: normal;
}

.platform-netease { background: #e53935; }
.platform-qq { background: #4caf50; }
.platform-kugou { background: #1e88e5; }
.platform-kuwo { background: #fbc02d; color: #333; }
.platform-migu { background: #e91e63; }
.platform-qianqian { background: #00bcd4; }
.platform-qishui { background: #212121; }
.platform-unknown { background: #999; }

.copyright-tip {
    font-size: 11px;
    color: #999;
    margin-left: 10px;
    font-style: italic;
}

.result-item p {
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.download-options {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.download-btn {
    padding: 6px 12px;
    background: #4caf50;
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #45a049;
}

.play-btn {
    padding: 6px 12px;
    background: #ff9800;
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.play-btn:hover {
    background: #f57c00;
}

/* 播放器增强样式 */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #eee;
    padding: 10px 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.player-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 25%;
}

.album-art {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    overflow: hidden;
}

.player-info h3 {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-info p {
    font-size: 13px;
    color: #888;
}

.player-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    max-width: 50%;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-controls button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    transition: transform 0.2s;
}

.player-controls button:hover {
    transform: scale(1.1);
    color: #1e88e5;
}

#play-btn {
    font-size: 28px;
}

.player-progress {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #888;
}

.progress-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.lyric-mini {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: #1e88e5;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

input[type="range"] {
    cursor: pointer;
    height: 4px;
    accent-color: #1e88e5;
}

.player-right {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 25%;
    justify-content: flex-end;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100px;
}

.player-volume input {
    width: 100%;
}

.player-actions button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    margin-left: 5px;
}

/* 全屏歌词层 */
.lyric-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999;
    display: none;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.lyric-header {
    padding: 20px;
    text-align: right;
}

#close-lyric {
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

.lyric-container {
    flex: 1;
    overflow-y: auto;
    text-align: center;
    padding: 40px 20px;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.lyric-wrapper {
    transition: transform 0.3s ease-out;
}

.lyric-line {
    font-size: 18px;
    color: #888;
    margin: 15px 0;
    transition: all 0.3s;
}

.lyric-line.active {
    font-size: 24px;
    color: #1e88e5;
    font-weight: bold;
    transform: scale(1.05);
}

.lyric-word {
    display: inline-block;
    margin: 0 2px;
    background-image: linear-gradient(to right, #888 0%, #888 100%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: #888;
    transition: transform 0.2s;
}

.lyric-line.active .lyric-word {
    font-size: 24px;
}

.lyric-word.played {
    /* 高亮状态由 JS 动态更新 backgroundImage */
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.quality-list {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quality-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
}

.quality-item:hover {
    background: #f5f5f5;
    border-color: #1e88e5;
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #4caf50;
    width: 0%;
    transition: width 0.3s;
}

@media (max-width: 768px) {
    .player {
        padding: 10px 15px;
    }

    .player-content {
        height: auto;
        padding: 5px 0;
        flex-direction: column;
        gap: 12px;
    }

    .player-left {
        width: 100%;
        justify-content: flex-start;
        padding: 0 5px;
    }

    .player-center {
        width: 100%;
        max-width: 100%;
        order: 2;
    }

    .player-right {
        width: 100%;
        justify-content: space-between;
        padding: 0 5px;
        order: 3;
    }

    .player-volume {
        display: none; /* 移动端隐藏音量条 */
    }

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

    .album-art {
        width: 45px;
        height: 45px;
    }

    .player-info h3 {
        font-size: 14px;
        max-width: 200px;
    }

    .player-controls {
        gap: 40px;
        margin-bottom: 5px;
    }

    #play-btn {
        font-size: 32px;
    }

    .lyric-mini {
        position: static;
        margin-bottom: 4px;
        font-size: 11px;
        height: 16px;
    }
    
    .progress-container {
        display: flex;
        flex-direction: column-reverse;
    }
}

/* 搜索建议样式 */
.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.suggestions-list {
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-icon {
    font-size: 14px;
}

.suggestion-text {
    font-size: 14px;
    color: #333;
}

/* 搜索历史样式 */
.search-history {
    margin-top: 10px;
    padding: 10px;
    background: #fafafa;
    border-radius: 8px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-label {
    font-size: 13px;
    color: #666;
    font-weight: bold;
}

.clear-history {
    font-size: 12px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
}

.clear-history:hover {
    color: #e53935;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-item {
    padding: 4px 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: #1e88e5;
    color: white;
    border-color: #1e88e5;
}

/* 热门搜索样式 */
.hot-searches {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
    border-radius: 8px;
    border: 1px solid #ffe4e4;
}

.hot-header {
    margin-bottom: 12px;
}

.hot-label {
    font-size: 14px;
    font-weight: bold;
    color: #d32f2f;
}

.hot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hot-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hot-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hot-rank {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ddd;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hot-rank.top-three {
    background: #e53935;
}

/* 筛选栏样式 */
#filter-bar {
    background: white;
    padding: 15px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: #666;
}

.filter-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.filter-btn.active {
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.filter-btn:first-of-type {
    background: #666 !important;
}

.results-count {
    font-size: 14px;
    color: #666;
}

.results-count strong {
    color: #1e88e5;
}

/* 结果项增强样式 */
.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.result-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    word-break: break-all;
}

.result-artist, .result-album, .result-duration {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 15px;
}

/* 搜索输入框容器 */
#unified-content {
    position: relative;
}


/* 结果列表样式优化 */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.result-item:hover {
    background: #fafafa;
}

.result-info {
    flex: 1;
}

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

@media (max-width: 480px) {
    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .result-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    padding-bottom: 120px; /* 为播放器留出空间 */
    color: #666;
    font-size: 12px;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    .platforms {
        gap: 10px;
    }
}