/* style.css 文件内容 */
/* 侧边栏样式 */
.music-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width, 320px);
    height: 100%;
    background: var(--main-bg);
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.music-sidebar.open {
    transform: translateX(0);
}

.music-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color, #1db954);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: none;
}

.music-toggle-btn:hover {
    transform: scale(1.05);
    background: #1aa34a;
}

.music-toggle-btn i {
    font-size: 20px;
}

.menu_top_title {
    padding: 50px;
    color: white;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    transition: background 0.5s ease;
    backdrop-filter: blur(var(--sidebar-bg-blur));
    -webkit-backdrop-filter: blur(var(--sidebar-bg-blur));
}

.music_asidebar_title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.music_asidebar_author {
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.music_asidebar_time {
    margin-top: 10px;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.music-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.music-close-btn:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: rotate(90deg);
}

.now-playing {
    display:none;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #eee;
}

.now-playing-cover {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    margin-right: 15px;
    object-fit: cover;
    filter: blur(var(--cover-blur)) brightness(var(--cover-brightness));
    opacity: var(--cover-opacity);
    backdrop-filter: blur(var(--cover-blur));
    -webkit-backdrop-filter: blur(var(--cover-blur));
}

.now-playing-info {
    flex: 1;
}

.now-playing-title {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--music-title-color, #333333);
}

.now-playing-artist {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-controls {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #eee;
}

#wcmm-progress {
    width: 100%;
    height: 6px;
    margin: 10px 0;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

#wcmm-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--progress-bar-color, #1db954);
    cursor: pointer;
    transition: all 0.2s;
}

#wcmm-progress::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.music_mode {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.music_mode span {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.music_mode span:hover {
    background: var(--theme-color-op30);
    color: #000000;
}

.music_mode span.active {
    color: #000000;
    background: var(--theme-color-pri) !important;
}

.music_mode svg {
    width: 20px;
    height: 20px;
}

/* 播放列表头部样式 */
.wcmm-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
}

.wcmm-playlist-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcmm-playlist-count {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* 刷新缓存按钮样式 */
.wcmm-refresh-cache {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wcmm-refresh-cache:hover {
    color: var(--theme-color-pri);
    background-color: rgba(0, 0, 0, 0.05);
}

.wcmm-refresh-cache:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.wcmm-refresh-cache .fa-spin {
    animation: fa-spin 1s infinite linear;
}

.wcmm-refresh-count {
    font-size: 12px;
    opacity: 0.8;
}

/* 播放列表样式 */
.wcmm-music-list {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: white;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--theme-color-op10);
    cursor: pointer;
    transition: background 0.2s;
}

.playlist-item:hover {
    background: var(--theme-color-op10);
}

.playlist-item.active {
    background: var(--theme-color-op20);
    color: var(--active-playlist-color, #1890ff);
}

.playlist-item .name {
    display: flex;
    align-items: center;
    flex: 1;
}

.playlist-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 12px;
    object-fit: cover;
}

.playlist-item .title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.playlist-item .author {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    margin-left: 10px;
}

/* 歌词容器 */
.wcmm-lyrics-container {
    height: 60px;
    overflow: hidden;
    position: relative;
    background: white;
    border-top: 1px solid #eee;
}

/* 歌词渐变遮罩 */
.wcmm-lyrics-mask {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    pointer-events: none;
    z-index: 1;
}

.wcmm-lyrics-mask-top {
    top: 0;
    background: linear-gradient(to bottom, white 0%, transparent 100%);
}

.wcmm-lyrics-mask-bottom {
    bottom: 0;
    background: linear-gradient(to top, white 0%, transparent 100%);
}

/* 歌词文本容器 - 单行滚动 */
#wcmm-lyric {
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    text-align: center;
    scroll-behavior: smooth;
    padding: 20px 0;
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
}

/* 歌词行样式 -单行显示 */
#wcmm-lyric p {
    display: inline-block;
    margin: 0 15px;
    color: rgba(102, 102, 102, 0.6);
    transition: all 0.3s;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.5;
    transform: scale(0.95);
}

#wcmm-lyric p.active {
    color: var(--active-lyric-color);
    font-size: 16px;
    font-weight: bold;
    opacity: 1;
    transform: scale(1);
}

#wcmm-lyric p.no-lyric {
    color: #999;
    font-size: 14px;
    opacity: 0.8;
    transform: none;
}

/* 控制按钮样式 */
.wcmm-control-button.active,
#wcmm-play {
    background-color: var(--control-color, #1db954);
    color: white;
}

#wcmm-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--control-color, #1db954);
    color: white;
    font-size: 14px;
}

#wcmm-play:hover {
    background: color-mix(in srgb, var(--theme-color-pri) 90%, white);
    transform: scale(1.1);
}

#wcmm-play.playing i::before {
    content: "\f04c"; /* 暂停图标 */
}

/* 深色模式适配 */
.dark-theme .music-sidebar {
    background: var(--dark-bg);
}

.dark-theme .menu_top_title {
    background: linear-gradient(135deg, #1aa34a 0%, #107acc 100%);
}

.dark-theme .now-playing,
.dark-theme .music-controls,
.dark-theme .wcmm-playlist-header,
.dark-theme .wcmm-music-list,
.dark-theme .wcmm-lyrics-container {
    background: rgba(40, 40, 40, 0.9);
    color: var(--dark-color);
}

.dark-theme .now-playing-artist {
    color: var(--dark-minor-color);
}

.dark-theme .playlist-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .playlist-item:hover {
    background: #2f2f2f;
}

.dark-theme .playlist-item.active {
    background: color-mix(in srgb, var(--active-playlist-color) 20%, transparent);
    color: white;
}

.dark-theme #wcmm-progress {
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme #wcmm-progress::-webkit-slider-thumb {
    background: var(--progress-bar-color);
}

.dark-theme #wcmm-lyric p {
    color: rgba(255, 255, 255, 0.4);
}

.dark-theme #wcmm-lyric p.active {
    color: var(--active-lyric-color);
}

.dark-theme #wcmm-lyric p.no-lyric {
    color: rgba(255, 255, 255, 0.3);
}

.dark-theme .wcmm-lyrics-mask-top {
    background: linear-gradient(to bottom, var(--dark-bg) 0%, transparent 100%);
}

.dark-theme .wcmm-lyrics-mask-bottom {
    background: linear-gradient(to top, var(--dark-bg) 0%, transparent 100%);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .music-sidebar {
        width: 100% !important;
    }
    
    .music-toggle-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .music-toggle-btn i {
        font-size: 16px;
    }
    
    .menu_top_title {
        padding: 15px;
    }
    
    .music_asidebar_title {
        font-size: 18px;
    }
    
    .now-playing {
        padding: 10px 15px;
    }
    
    .now-playing-cover {
        width: 40px;
        height: 40px;
    }
    
    .now-playing-title {
        font-size: 14px;
    }
    
    .now-playing-artist {
        font-size: 12px;
    }
    
    .music-controls {
        padding: 10px 15px;
    }
    
    .music_mode span {
        width: 32px;
        height: 32px;
    }
    
    .music_mode svg {
        width: 16px;
        height: 16px;
    }
    
    .wcmm-lyrics-container {
        height: 50px;
    }
    
    #wcmm-lyric p {
        font-size: 12px;
        margin: 0 10px;
    }
    
    #wcmm-lyric p.active {
        font-size: 14px;
    }
    
    .playlist-item {
        padding: 10px 15px;
    }
    
    .playlist-item .avatar {
        width: 35px;
        height: 35px;
    }
    
    .playlist-item .title {
        max-width: 120px;
    }
    
    .playlist-item .author {
        max-width: 60px;
        font-size: 11px;
    }
}

/* 音频元素样式 */
#wcmm-audio-player {
    display: none;
}

/* 导航栏音乐按钮 */
.navbar-nav .toggle-music {
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    height: 60px;
    color: var(--main-color);
    transition: var(--transition);
    position: relative;
    margin-left: 10px;
}

.navbar-nav .toggle-music .fa {
    font-size: 16px;
    line-height: 1;
}

.navbar-nav .toggle-music:hover {
    color: var(--theme-color);
    transform: scale(1.1);
}

/* 导航栏音乐按钮播放状态 */
.navbar-nav .toggle-music.playing {
    color: var(--theme-color);
    animation: musicIconPulse 2s infinite;
}

@keyframes musicIconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 深色模式适配 */
.dark-theme .navbar-nav .toggle-music.playing {
    color: var(--theme-color);
}

/* 滚动条样式优化 */
.wcmm-music-list::-webkit-scrollbar {
    width: 4px;
}

.wcmm-music-list::-webkit-scrollbar-track {
    background: transparent;
}

.wcmm-music-list::-webkit-scrollbar-thumb {
    background: rgba(24, 144, 255, 0.2);
    border-radius: 2px;
}

.wcmm-music-list::-webkit-scrollbar-thumb:hover {
    background: rgba(24, 144, 255, 0.4);
}

/* 深色模式滚动条适配 */
.dark-theme .wcmm-music-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme .wcmm-music-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 歌词滚动条样式 */
#wcmm-lyric.scrollbar-minimal::-webkit-scrollbar {
    width: 4px;
}

#wcmm-lyric.scrollbar-minimal::-webkit-scrollbar-track {
    background: transparent;
}

#wcmm-lyric.scrollbar-minimal::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.dark-theme #wcmm-lyric.scrollbar-minimal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

/* 歌词滚动条样式 - 播放列表风格 */
#wcmm-lyric.scrollbar-playlist::-webkit-scrollbar {
    width: 4px;
}

#wcmm-lyric.scrollbar-playlist::-webkit-scrollbar-track {
    background: transparent;
}

#wcmm-lyric.scrollbar-playlist::-webkit-scrollbar-thumb {
    background: rgba(24, 144, 255, 0.2);
    border-radius: 2px;
}

#wcmm-lyric.scrollbar-playlist::-webkit-slider-thumb:hover {
    background: rgba(24, 144, 255, 0.4);
}

.dark-theme #wcmm-lyric.scrollbar-playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme #wcmm-lyric.scrollbar-playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.playlist-item.active {
    background: var(--theme-color-op30);
    color: var(--active-playlist-color, #1890ff);
}

/* 深色模式适配 */
.dark-theme .playlist-item.active {
    background: var(--active-playlist-bg-color, rgba(24, 144, 255, 0.1)) !important;
    color: var(--active-playlist-color, #1890ff);
}

.music-sidebar.custom-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(var(--sidebar-bg-brightness, 100%));
    z-index: 0;
    pointer-events: none;
}

/* 移动端适配优化 */
@media (max-width: 768px) {
    .music-sidebar {
        width: 100% !important;
    }
}