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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0c0c0c;
    color: #fff;
    overflow-x: hidden;
}

/* 背景动画 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -2;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    z-index: -1;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 顶部导航 */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.logo i {
    color: #ff6b6b;
    font-size: 28px;
}

.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
    position: relative;
}

.search-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.source-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 8px 4px;
    outline: none;
    cursor: pointer;
    border-radius: 10px;
}

.source-select option {
    background: #2a2a2a;
    color: #ffffff;
    padding: 0px;
}

.search-btn {
    background: #ff6b6b;
    border: none;
    color: #fff;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #ff5252;
}

/* 主要内容区域 */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 3fr 4fr 3fr;
    gap: 20px;
    /* 使三列区域基于视口高度等高布局（预留导航高度和间距） */
    height: calc(100vh - 120px);
    align-items: start;
}

/* 搜索结果区域 */
.content-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 标签页样式 */
.tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}

.tab-btn {
    padding: 10px 14px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #ff6b6b;
    border-bottom-color: #ff6b6b;
}

.tab-content {
    display: none;
    flex: 1;
    overflow: auto;
    flex-direction: column;
}

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

.playlist-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.playlist-input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.playlist-btn {
    padding: 12px 16px;
    background: #ff6b6b;
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.playlist-btn:hover {
    background: #ff5252;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.song-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.song-item:hover::before {
    left: 100%;
}

.song-item.active {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 107, 107, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.5);
}

.song-index {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.song-item.active .song-index {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: #fff;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-duration {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-left: 15px;
}

/* 播放器区域 */
.player-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-height: 110%;
    /* overflow-y: auto; */
}

.current-song {
    text-align: center;
    margin-bottom: 25px;
}

.current-cover-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.current-cover {
    width: 18vh;
    height: 18vh;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 6px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.current-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.current-cover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.current-cover.playing {
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.current-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.current-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* 播放器歌词区域 */
.player-lyrics {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    height: 120px;
    overflow: hidden;
    position: relative;
}

.player-lyrics-scroll {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}

.player-lyrics-scroll::-webkit-scrollbar {
    display: none;
}

.player-lyric-line {
    text-align: center;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.player-lyric-line.active {
    color: #ff6b6b;
    font-weight: 600;
    transform: scale(1.05);
}

/* 播放控制 */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn.small {
    width: 45px;
    height: 45px;
    font-size: 18px;
}

.play-btn {
    width: 65px;
    height: 65px;
    font-size: 28px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.play-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff4444);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

/* 进度条 */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8a80);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* 音量控制 */
.volume-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.volume-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
}

/* 音质选择 */
.quality-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quality-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.quality-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    padding: 8px 12px;
    outline: none;
    cursor: pointer;
    font-size: 14px;
}

.quality-select option {
    background: #2a2a2a;
    color: #fff;
    padding: 8px;
}

/* 下载区域 */
.download-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.download-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 歌曲操作按钮 */
.song-actions {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.action-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    transform: scale(1.1);
}

/* 歌词区域 */
.lyrics-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    /* 与播放器区域等高，由主容器控制高度，内部容器滚动 */
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.lyrics-container {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    padding-right: 10px;
}

.lyrics-container::-webkit-scrollbar {
    width: 6px;
}

.lyrics-container::-webkit-scrollbar-track {
    background: transparent;
}

.lyrics-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.lyric-line {
    padding: 8px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 6px;
    padding-left: 10px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.lyric-line:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.lyric-line.active {
    color: #ff6b6b;
    font-weight: 600;
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.02);
    border-left: 3px solid #ff6b6b;
}

/* 移动端搜索界面 */
.mobile-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.mobile-search.active {
    display: flex;
}

.mobile-search-header {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.mobile-back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-search-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.mobile-search-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

/* 沉浸式歌词界面 */
.immersive-lyrics {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.immersive-lyrics.active {
    display: flex;
}

.immersive-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.immersive-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.immersive-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.immersive-song-info {
    text-align: center;
    flex: 1;
}

.immersive-song-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.immersive-song-artist {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.immersive-lyrics-container {
    flex: 1;
    padding: 40px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.immersive-lyric-line {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 80%;
}

.immersive-lyric-line.active {
    color: #ff6b6b;
    font-size: 28px;
    font-weight: 600;
    transform: scale(1.1);
}

/* 加载和错误状态 */
.loading,
.error,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.loading i,
.error i,
.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.loading i {
    animation: spin 1s linear infinite;
    color: #ff6b6b;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.error i {
    color: #ff5252;
}

.empty-state i {
    color: rgba(255, 255, 255, 0.4);
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 音频可视化波浪样式 */
.audio-visualizer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 10;
    pointer-events: none;
}

#waveCanvas {
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        max-width: 1200px;
    }

    .lyrics-section {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .search-container {
        margin: 0;
        max-width: none;
    }

    .content-section {
        /* 移动端隐藏搜索结果区域，与歌词部分保持一致 */
        display: none !important;
        height: auto;
        min-height: calc(100vh - 300px);
    }

    .player-section {
        height: auto;
        min-height: auto;
    }

    .lyrics-section {
        display: none;
    }

    /* 在移动端改为使用独立的移动搜索页，隐藏主页面的搜索结果区域 */
    .content-section {
        display: none !important;
    }

    .player-section {
        display: block;
    }

    .current-cover {
        width: 180px;
        height: 180px;
    }

    .player-controls {
        gap: 15px;
    }

    .download-container {
        grid-template-columns: 1fr;
    }

    /* 移动端搜索栏可点击 */
    .search-wrapper {
        cursor: pointer;
        position: relative;
    }

    .search-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 25px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .search-wrapper:hover::after {
        opacity: 1;
    }

    .mobile-search {
        display: none;
    }

    .mobile-search.active {
        display: flex;
    }

    /* 移动端唱片可点击提示 */
    .current-cover {
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .current-cover:hover {
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .main-container {
        padding: 15px;
    }

    .content-section {
        padding: 20px;
    }

    .player-section {
        padding: 20px;
    }

    .current-cover {
        width: 160px;
        height: 160px;
    }
}

/* 站点页脚 */
.site-footer {
    max-width: 600px;
    margin: 5px auto 5px;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

.site-footer a {
    color: #ff6b6b;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}