/* Base Styles - 基础样式不包含主题颜色 */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    scrollbar-width: none;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    touch-action: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

::-webkit-scrollbar { width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }

/* 基础布局 */
.tab-content { 
    padding: 16px; 
    padding-bottom: 160px; 
    height: 100%; 
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 本地歌曲标签页 - 特殊布局以支持 sticky breadcrumb */
#tree {
    padding: 0;
    padding-bottom: 160px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.tab-visible, #tree.tab-visible {
    opacity: 1;
}

h1 { font-size: 24px; font-weight: 600; margin-bottom: 16px; }

/* 按钮样式 */
button {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
button:active { transform: scale(0.98); }

/* Modal 过渡动画 */
.modal, .search-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.modal-visible, .search-modal.modal-visible {
    opacity: 1;
}

/* 标签导航 */
.tabs-nav { display: flex; border-bottom: 1px solid; transition: all 0.3s ease; }
.tab-btn {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active { border-bottom-color: var(--text-primary); }

/* 本地歌曲内容区域（header 已移除）*/

.local-close-btn:active {
    transform: scale(0.95);
}

.local-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0 16px;
}

/* 本地文件树状结构 */
.local-tree {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tree-item:hover {
    background-color: var(--card-hover-bg);
}

.tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 12px;
    transition: transform 0.2s;
}

.tree-toggle.expanded {
    transform: rotate(90deg);
}

.tree-icon {
    font-size: 18px;
    min-width: 20px;
}

.tree-label {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-folder .tree-label {
    font-weight: 600;
}

.tree-file .tree-toggle {
    opacity: 0;
    cursor: default;
}

/* 本地专辑卡片网格（目录显示） */
.local-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 12px 0;
}

.local-album-grid.sub-grid {
    padding-left: 20px;
}

.local-album-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary, #1e1e1e);
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.local-album-card:hover {
    border-color: var(--accent-color, #1e90ff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.local-album-card.expanded {
    border-color: var(--accent-color, #1e90ff);
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

.local-album-cover {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary, #2a2a2a);
    position: relative;
    overflow: hidden;
}

.local-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-album-cover-placeholder {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: var(--bg-tertiary, #2a2a2a);
}

.local-album-info {
    padding: 10px;
}

.local-album-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.local-album-count {
    font-size: 11px;
    color: var(--text-secondary, #888);
}

.local-album-expand-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
}

.local-album-content {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-tertiary, #1a1a1a);
    border-radius: 8px;
}

/* 面包屑导航 - Sticky Header */
.local-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary, #888);
    border-bottom: 1px solid var(--border-color, #333);
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.breadcrumb-home,
.breadcrumb-item {
    color: var(--accent-color, #1e90ff);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.breadcrumb-home:hover,
.breadcrumb-item:hover {
    background: var(--bg-secondary, #1e1e1e);
    color: var(--text-primary, #fff);
}

.breadcrumb-sep {
    color: var(--text-muted, #555);
    font-size: 12px;
}

/* 本地歌曲返回按钮 */
.local-return-btn {
    margin-left: auto; /* 推到最右侧 */
    background: none;
    border: none;
    color: var(--text-secondary, #888);
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0; /* 防止被挤压 */
}

.local-return-btn:hover {
    background: var(--bg-secondary, #1e1e1e);
    color: var(--text-primary, #fff);
}

.local-return-btn:active {
    transform: scale(0.95);
}

/* 本地歌曲列表（播放列表样式） */
.local-songs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
}

.local-song-item {
    cursor: pointer;
}

.local-song-item:hover {
    border-color: var(--accent-color, #1e90ff) !important;
}

/* 兼容旧版本的卡片样式 */
.local-song-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 12px 0;
}

.local-song-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary, #1e1e1e);
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.local-song-card:hover {
    border-color: var(--accent-color, #1e90ff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.local-song-cover {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary, #2a2a2a);
    position: relative;
    overflow: hidden;
}

.local-song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-song-cover-placeholder {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: var(--bg-tertiary, #2a2a2a);
}

.local-song-info {
    padding: 12px;
}

.local-song-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.local-song-type {
    font-size: 11px;
    color: var(--text-secondary, #888);
}

/* 本地文件卡片 */
.local-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.local-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.local-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 24px;
}
.local-card-body { flex: 1; min-width: 0; }
.local-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.local-card-meta {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 面包屑导航 */
.local-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 13px;
}
.breadcrumb-home, .breadcrumb-item {
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

/* 统计值（跨页面一致样式） */
.stat-value {
    color: var(--text-primary);
    font-family: monospace;
    font-weight: 600;
}
.card-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
}


/* 播放列表 */
.playlist-empty { padding: 40px; text-align: center; }
.playlist-track-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.playlist-track-item.current-playing { 
    border-left: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 25;
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    width: calc(100% + 24px);
    overflow: visible;
}

/* 当前播放歌曲的水平进度条（底部） */
.track-progress-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(128, 128, 128, 0.2);
    z-index: 30;
}

.track-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    height: 100%;
    background: #1e90ff;
    transition: width 0.3s linear;
}

/* 移除之前的margin-left */
.playlist-track-item.current-playing .track-left {
    margin-left: 0;
}

.track-cover {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-track-item.current-playing .track-cover {
    width: 300px;
    height: 300px;
    border-radius: 12px;
}

.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-cover-placeholder { display: none; }

/* 序列号 */
.track-seq {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1.2;
}

/* 左侧：图片 + 类型 */
.track-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.track-type { 
    font-size: 11px; 
    text-align: center;
    max-width: 80px;
}

/* 中间：标题 + 信息 */
.track-info { 
    flex: 1; 
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.track-title {
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-track-item:not(.current-playing) .track-title {
    max-width: 200px;
}

.track-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.track-playlist-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}

.track-progress { 
    font-size: 11px;
    white-space: nowrap;
}

/* 当前播放歌曲的标题允许多行显示 */
.playlist-track-item.current-playing .track-title {
    font-size: 22px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-menu-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 拖拽手柄 - 移动端触摸拖拽（右侧） */
.drag-handle {
    width: 28px;
    height: 44px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
    margin-left: auto;  /* 推到右侧 */
}
.drag-handle:active {
    cursor: grabbing;
    opacity: 1;
    transform: scale(1.1);
}
.drag-handle svg {
    pointer-events: none;
}

/* 三点菜单按钮在左侧 */
.track-menu-btn {
    order: -1;  /* 确保在最左侧 */
    margin-right: 8px;
    flex-shrink: 0;
}

/* 拖拽占位符 */
.drag-placeholder {
    background: var(--accent-light, rgba(59, 130, 246, 0.15));
    border: 2px dashed var(--accent-color, #3b82f6);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: height 0.2s ease;
}

/* 拖拽中的元素样式 */
.playlist-track-item.dragging {
    opacity: 0.9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
    transition: none;
    pointer-events: none;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    border-top: 1px solid;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 99;
    transition: background-color 0.3s ease;
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.nav-icon { font-size: 32px; }
.nav-label { font-size: 10px; font-weight: 500; }

/* 播放条 */
#playerBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    z-index: 20;
    border-top: 1px solid;
}
#playerBar.footer-collapsed { opacity: 0; pointer-events: none; }
#playerBar.footer-expanded { opacity: 1; pointer-events: auto; }
.footer-content { display: flex; flex-direction: column; gap: 8px; }

#playerProgress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    cursor: pointer;
}
#playerProgressFill { height: 100%; width: 0%; transition: width 0.1s; }

/* 歌单管理模态框 - 采用搜索操作菜单相同的设计风格 */
.playlists-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.playlists-modal.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.playlists-modal-content {
    position: relative;
    max-width: 420px;
    max-height: 70vh;
    width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(42, 42, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.playlists-modal.modal-visible .playlists-modal-content {
    transform: scale(1);
}

.playlists-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    flex-shrink: 0;
}

.playlists-modal-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.playlists-back-btn {
    display: none; /* 隐藏返回按钮 */
}

.playlists-add-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.playlists-add-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

.playlists-add-btn:active {
    transform: scale(0.95);
}

/* 添加关闭按钮样式（如果需要） */
.playlists-close-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 24px;
    transition: all 0.2s ease;
}

.playlists-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.playlists-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px 24px;
    background: transparent;
}

/* ==========================================
   搜索加载动画
   ========================================== */
.search-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-loading-overlay.visible {
    opacity: 1;
}

.search-loading-content {
    text-align: center;
    color: white;
}

.search-loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
    border-top-color: rgba(255, 255, 255, 0.9);
}

.spinner-ring:nth-child(2) {
    width: 75%;
    height: 75%;
    animation-delay: -0.5s;
    border-top-color: rgba(255, 255, 255, 0.7);
}

.spinner-ring:nth-child(3) {
    width: 50%;
    height: 50%;
    animation-delay: -1s;
    border-top-color: rgba(255, 255, 255, 0.5);
}

.search-loading-spinner .search-icon {
    position: relative;
    z-index: 1;
    animation: pulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.search-loading-message {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.5s ease-out;
}

.search-loading-submessage {
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.5s ease-out 0.1s backwards;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 浅色主题下的搜索加载动画 */
[data-theme="light"] .search-loading-overlay {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.95) 0%, rgba(0, 242, 254, 0.95) 100%);
}

/* 响应式调整 */
@media (max-width: 600px) {
    .playlists-modal-content {
        width: 95%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 0;
    }
    
    .search-loading-spinner {
        width: 100px;
        height: 100px;
    }
    
    .search-loading-message {
        font-size: 20px;
    }
    
    .search-loading-submessage {
        font-size: 13px;
    }
}

/* 歌单列表样式 */
.playlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.playlist-item:active {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(0);
}

.playlist-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.playlist-item:hover .playlist-icon {
    transform: scale(1.05);
}

.playlist-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.default-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    letter-spacing: 0.3px;
}

.playlist-count {
    font-size: 14px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
}

.playlist-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlist-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.08);
}

.playlist-action-btn:active {
    transform: scale(0.95);
}

.playlists-empty {
    padding: 40px 24px;
    text-align: center;
    border: 1px dashed;
    border-radius: 14px;
}

.playlists-empty-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.playlists-empty-text {
    font-size: 16px;
    font-weight: 600;
}

/* 通用模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.modal-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close, .ranking-modal-close, .history-modal-close, .local-songs-modal-close {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-body, .ranking-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    transition: all 0.3s ease;
}

/* 排行榜 Modal - 不遮挡底部导航栏 */
#rankingModal {
    bottom: 64px;
    max-height: calc(100vh - 64px);
}

#rankingModal .modal-content {
    max-height: calc(100vh - 64px);
}

#rankingModal .ranking-modal-header {
    justify-content: center;
}

/* 排行榜标签页 */
.ranking-tabs {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.ranking-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 1px solid;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.ranking-tab.active {
    font-weight: 600;
}

/* 搜索模态框 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 64px;
    z-index: 999;
    max-height: calc(100vh - 64px);
}

.search-modal-overlay {
    display: none;
}

.search-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid;
    flex-shrink: 0;
}

.search-modal-back {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.search-modal-input {
    flex: 1;
    border: 1px solid;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 15px;
}

.search-modal-input:focus {
    outline: none;
}

.search-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px;
}

.search-tabs {
    position: sticky;
    top: 0;
    padding: 12px 16px;
    border-bottom: 1px solid;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    width: 100%;
    box-sizing: border-box;
}

.search-tab {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
}

.search-tab.active {
    font-weight: 600;
}

.search-tab-panels { width: 100%; }

.search-results-panel {
    padding: 12px 16px;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.search-results-panel.active {
    display: flex;
}

.search-empty {
    padding: 32px 12px;
    text-align: center;
}

.search-result-item.playlist-track-item {
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-modal-history {
    padding: 16px;
    border-bottom: 1px solid;
}

.search-modal-history-actions {
    display: flex;
    justify-content: center;
    padding: 16px;
    border-top: 1px solid;
}

.search-modal-history-clear {
    padding: 10px 16px;
    background: transparent;
    border: 1px solid;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-modal-history-clear svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.search-modal-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-history-header {
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-history-count {
    font-size: 12px;
    font-weight: 400;
}

.search-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.search-history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-history-icon {
    font-size: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}

.search-history-text {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.search-history-delete {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.search-history-delete:hover {
    opacity: 1;
    transform: scale(1.1);
}

.search-empty-state {
    padding: 60px 20px;
    text-align: center;
}

.search-empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.6;
}

.search-empty-text {
    font-size: 14px;
    margin: 0;
}

.search-placeholder {
    padding: 60px 20px;
    text-align: center;
}

.search-placeholder-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

/* 历史记录模态框 */
.history-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    /* 毛玻璃效果 - 遮挡背景 */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-modal.modal-visible {
    opacity: 1;
}

.history-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.history-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid;
    flex-shrink: 0;
}

.history-modal-header h3 {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.history-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* YouTube搜索结果 */
.youtube-search-results, .youtube-search-modal {
}

.youtube-search-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.youtube-search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid;
}

.youtube-search-modal-header h3 {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.youtube-search-modal-close {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.youtube-search-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px;
}

.youtube-search-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.youtube-search-list, .youtube-search-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 播放列表区域 */
.play-list-section {
    padding: 0;
}

.play-list-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--text-primary, #fff);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.play-list-action-btn:hover {
    background: var(--accent-color, #1e90ff);
    transform: scale(1.05);
}

.play-list-action-btn:active {
    transform: scale(0.95);
}

.play-list-container {
    padding: 16px;
}

/* Mini Player 代码已移除 */

/* Full Screen Player */
.full-player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.full-player.show {
    opacity: 1;
}

.full-player-content {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

.full-player-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    flex-shrink: 0;
}

.full-player-back {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-player-back:active {
    transform: translateY(4px);
}

.full-player-artwork {
    padding: 20px 20px 30px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.full-player-artwork-container {
    width: min(480px, 95vw);
    height: min(480px, 95vw);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.8), 0 0 80px rgba(74, 158, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.full-player-artwork-container:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.8), 0 0 80px rgba(74, 158, 255, 0.15);
}

.full-player-artwork-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: high-quality;
    filter: brightness(1);
    transition: filter 0.2s ease;
}

.full-player-artwork-container:hover img {
    filter: brightness(1.05);
}

.full-player-artwork-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 96px;
    opacity: 0.3;
}

.full-player-info {
    padding: 24px 20px 16px;
    text-align: center;
}

.full-player-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.full-player-artist {
    font-size: 16px;
    margin-bottom: 12px;
}

.full-player-playlist {
    font-size: 13px;
    opacity: 0.75;
}

.full-player-progress-section {
    padding: 16px 20px;
}

.full-player-progress-bar {
    height: 5px;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    margin-bottom: 10px;
    transition: height 0.2s ease;
}

.full-player-progress-bar:hover {
    height: 6px;
}

.full-player-progress-bar.dragging {
    height: 6px;
}

.full-player-progress-bar.dragging .full-player-progress-thumb {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.full-player-progress-fill {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.full-player-progress-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: left 0.1s linear, opacity 0.2s ease;
}

.full-player-progress-bar:hover .full-player-progress-thumb {
    opacity: 1;
}

.full-player-time {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
}

.full-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 20px;
}

.full-player-control-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-player-control-btn:hover {
    transform: scale(1.1);
}

.full-player-control-btn:active {
    transform: scale(0.95);
}

.full-player-play-pause {
    width: 72px;
    height: 72px;
}

.full-player-volume {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px 24px;
    max-width: 400px;
    margin: 0 auto;
}

.full-player-volume svg {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.full-player-volume:hover svg {
    opacity: 1;
}

.full-player-volume-slider {
    flex: 1;
    position: relative;
}

.full-player-volume-slider input[type="range"] {
    width: 100%;
    height: 5px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.full-player-volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.full-player-volume-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 音量显示 */
.volume-display {
    position: absolute;
    right: 0;
    top: -28px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.volume-display.show {
    opacity: 1;
}

.volume-value {
    font-weight: 600;
}

/* Now Playing Modal */
.now-playing-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

.now-playing-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.now-playing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid;
    flex-shrink: 0;
}

.now-playing-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.now-playing-close {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.now-playing-menu-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.now-playing-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}

/* Footer控制栏 */
.footer-expand-btn {
    background: transparent;
    border: none;
    cursor: pointer;
}

.footer-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-controls-left, .footer-controls-right {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn.loop-active {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.control-btn.loop-active:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-primary);
}

.play-pause-large {
    width: 56px;
    height: 56px;
    font-size: 20px;
    border-color: var(--text-primary);
}

/* 排行榜项目样式 */
.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ranking-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    flex-shrink: 0;
}

.ranking-number {
    font-size: 20px;
    font-weight: 700;
}

.ranking-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid;
    border-color: var(--border-color);
}

.ranking-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.ranking-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ranking-count::before {
    content: '▶';
    font-size: 10px;
}

.ranking-play {
    flex-shrink: 0;
}

.ranking-play-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ranking-empty {
    padding: 60px 20px;
    text-align: center;
}

.ranking-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.6;
}

.ranking-empty-text {
    font-size: 14px;
}

/* 循环模式按钮的active状态 */
#nowPlayingRepeatBtn.loop-active,
#fullPlayerRepeat.loop-active {
    color: var(--accent-color);
    opacity: 1;
}

#nowPlayingRepeatBtn.loop-active svg path,
#fullPlayerRepeat.loop-active svg path {
    fill: var(--accent-color);
}

.local-empty { padding: 40px; text-align: center; }

/* 播放列表模态框动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 歌单选择模态框 */
.select-playlist-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.select-playlist-modal.modal-visible {
    opacity: 1;
}

.select-playlist-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.select-playlist-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.select-playlist-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.select-playlist-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.select-playlist-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.select-playlist-close-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.select-playlist-close-btn:active {
    transform: scale(0.95);
}

.select-playlist-modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.select-playlist-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    justify-content: flex-end;
}

.select-playlist-cancel-btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-width: 80px;
}

.select-playlist-cancel-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.select-playlist-cancel-btn:active {
    transform: scale(0.98);
}

/* 深色主题 */
[data-theme="dark"] .select-playlist-modal {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .select-playlist-modal .modal-content {
    background: #1a1a1a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .select-playlist-modal .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .select-playlist-modal .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* 浅色主题 */
[data-theme="light"] .select-playlist-modal {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .select-playlist-modal .modal-content {
    background: #f5f5f5;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .select-playlist-modal .modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .select-playlist-modal .modal-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* ===== 搜索结果操作菜单（全屏模态框） ===== */
.search-action-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.search-action-menu.show {
    opacity: 1;
    pointer-events: auto;
}

.search-action-menu-content {
    background: #2a2a2a;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.search-action-menu.show .search-action-menu-content {
    transform: scale(1);
}

.search-action-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-action-menu-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.search-action-menu-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.search-action-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-action-menu-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-action-menu-item {
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    color: #e0e0e0;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
    text-align: left;
    border-radius: 12px;
}

.search-action-menu-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.search-action-menu-item:active {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(0);
}

.search-action-menu-item .icon {
    font-size: 24px;
    width: 28px;
    text-align: center;
}

.search-action-menu-item .label {
    flex: 1;
    font-weight: 500;
}

/* 浅色主题 */
[data-theme="light"] .search-action-menu {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .search-action-menu-content {
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .search-action-menu-title {
    color: #333;
}

[data-theme="light"] .search-action-menu-close {
    color: #666;
}

[data-theme="light"] .search-action-menu-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

[data-theme="light"] .search-action-menu-item {
    color: #333;
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .search-action-menu-item:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .search-action-menu-item:active {
    background: rgba(0, 0, 0, 0.12);
}