/* nav-music.css */
@keyframes cover-rotate { 0% { transform: rotate(0deg) } 100% { transform: rotate(360deg) } }

/* 修正下拉三角箭头在夜间的颜色 */
.hover-show-con.dropdown-menu:before, .hover-show-con.dropdown-menu:after { 
    right: 20px !important; left: auto !important; 
}
.dark-theme .hover-show-con.dropdown-menu:after {
    border-bottom-color: var(--main-bg-color) !important;
}

/* 主容器 (固定 350px 高度) */
.nav-music-dropdown { 
    width: 300px !important; 
    padding: 0 !important; 
    right: 0; left: auto; 
    margin-top: 10px; 
    border-radius: 12px; 
    overflow: hidden; 
    background: var(--main-bg-color, #fff) !important;
    border: 1px solid var(--main-border-color, rgba(0,0,0,0.05));
    box-shadow: 0 10px 30px var(--main-shadow, rgba(0,0,0,0.1));
}

.nav-music-inner { 
    position: relative; width: 100%; height: 350px; 
    background: var(--main-bg-color, #fff); color: var(--main-color, #333);
}

.music-view { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    padding: 20px 15px; 
    transition: all 0.3s; box-sizing: border-box; 
    display: flex; flex-direction: column;
}
#nav-playlist-view { display: none; padding: 15px 10px 15px 15px; }

/* --- 顶部操作栏 (仅列表视图使用) --- */
.music-top-bar { 
    display: flex; justify-content: space-between; align-items: center; 
    flex-shrink: 0; z-index: 10; margin-bottom: 10px;
}
.music-icon-btn { 
    cursor: pointer; transition: all 0.3s; 
    display: flex; align-items: center; justify-content: center; 
    width: 32px; height: 32px; border-radius: 50%; 
}
.music-icon-btn svg { stroke: var(--muted-2-color, #888) !important; transition: all 0.3s; }
.music-icon-btn:hover { background: var(--muted-bg-color, #f5f5f5); }
.music-icon-btn:hover svg { stroke: var(--theme-color, #ff4a68) !important; }

/* --- 核心主体：垂直居中、均匀分布 --- */
.player-content {
    flex: 1; display: flex; flex-direction: column; 
    justify-content: space-between; align-items: center; overflow: hidden;
    padding-top: 10px; /* 给右上角的按钮留出一点呼吸空间 */
}

#nav-music-cover { 
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover; 
    animation: cover-rotate 20s linear infinite; animation-play-state: paused; 
    box-shadow: 0 0 0 4px var(--muted-border-color, rgba(0,0,0,0.03)), 0 4px 10px var(--main-shadow, rgba(0,0,0,0.15)); 
    flex-shrink: 0;
}

.music-title-box { text-align: center; width: 100%; flex-shrink: 0; margin-top: 5px; }
#nav-music-name { font-weight: 600; font-size: 15px; margin-bottom: 2px; color: var(--main-color, #333); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-music-singer { font-size: 12px; color: var(--muted-color, #999); }

.music-lrc-container { 
    width: 100%; height: 50px; overflow: hidden; position: relative; margin: 5px 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #fff 25%, #fff 75%, transparent 100%); 
    mask-image: linear-gradient(to bottom, transparent 0%, #fff 25%, #fff 75%, transparent 100%); 
}
#lrc-list { list-style: none; padding: 0; margin: 0; transition: transform 0.4s ease-out; }
.lrc-item { font-size: 12px; color: var(--muted-2-color, #999); line-height: 25px; min-height: 25px; transition: all 0.3s ease; text-align: center; opacity: 0.6; }
.lrc-item.active { color: var(--theme-color, #ff4a68); font-size: 13px; font-weight: bold; opacity: 1; transform: scale(1.05); }

.music-progress-bar { 
    width: 85%; display: flex; align-items: center; gap: 8px; 
    font-size: 10px; color: var(--muted-2-color, #999); font-family: Arial, sans-serif;
    flex-shrink: 0;
}
.progress-slider { flex: 1; height: 16px; display: flex; align-items: center; cursor: pointer; position: relative; }
.progress-track { width: 100%; height: 3px; background: var(--muted-border-color, rgba(0,0,0,0.06)); border-radius: 2px; position: relative; }
.dark-theme .progress-track { background: var(--muted-4-color, #43454a); }
.progress-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--theme-color, #ff4a68); border-radius: 2px; pointer-events: none; }
.progress-thumb { position: absolute; left: 0%; top: 50%; width: 8px; height: 8px; background: var(--theme-color, #ff4a68); border-radius: 50%; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.2s, transform 0.2s; box-shadow: 0 0 4px rgba(0,0,0,0.3); pointer-events: none; }
.progress-slider:hover .progress-thumb, .progress-slider.dragging .progress-thumb { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }

.music-controls { display: flex; justify-content: center; gap: 24px; align-items: center; flex-shrink: 0; }
.music-btn { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; transition: all 0.2s; cursor: pointer; }
.music-btn svg { width: 22px; height: 22px; fill: var(--muted-3-color, #666) !important; transition: all 0.2s; }
.music-btn:hover svg { fill: var(--theme-color, #ff4a68) !important; color:#fff; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--theme-color, #ff4a68); }
.play-btn svg { width: 22px; height: 22px; fill: #fff !important; }
.play-btn:hover { background: var(--theme-color, #ff4a68); transform: scale(1.0); }

/* 列表视图样式 */
.playlist-header { font-size: 15px; font-weight: bold; text-align: center; color: var(--main-color, #333); flex: 1; }
.playlist-items { flex: 1; overflow-y: auto; padding-right: 5px; display: flex; flex-direction: column; gap: 6px; }
.playlist-items::-webkit-scrollbar { width: 4px; }
.playlist-items::-webkit-scrollbar-thumb { background: var(--muted-border-color, #ddd); border-radius: 4px; }
.playlist-items::-webkit-scrollbar-track { background: transparent; }
.dark-theme .playlist-items::-webkit-scrollbar-thumb { background: var(--muted-4-color); }
.playlist-item { display: flex; align-items: center; padding: 10px; border-radius: 8px; cursor: pointer; transition: all 0.2s; background: transparent; border: 1px solid transparent; }
.playlist-item:hover { background: var(--muted-bg-color, #f9f9f9); }
.playlist-item.active { border-color: var(--theme-color, #ff4a68); background: var(--muted-bg-color, rgba(255, 74, 104, 0.05)); }
.playlist-item img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; margin-right: 12px; opacity: 0.9; }
.playlist-item-info { flex: 1; overflow: hidden; }
.playlist-item-name { font-size: 14px; font-weight: 600; color: var(--main-color, #333); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;}
.playlist-item-singer { font-size: 12px; color: var(--muted-color, #999); }
.playlist-item-duration { font-size: 12px; color: var(--muted-2-color, #bbb); margin-left: 10px; }

@media (max-width: 768px) { .nav-music-dropdown { width: 280px !important; } }