/* ====== 音乐播放器 ====== */
#music-player {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#music-player.dragging { cursor: grabbing; transition: none !important; }
#music-player.dragging button,
#music-player.dragging input,
#music-player.dragging a { pointer-events: none; }

/* 面板深色主题 */
#music-panel {
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(55, 65, 81, 0.5);
    color: #f1f5f9;
}

#music-panel .text-gray-400 { color: #94a3b8 !important; }
#music-panel .text-gray-300 { color: #cbd5e1 !important; }
#music-panel .text-gray-500 { color: #64748b !important; }
#music-panel .bg-gray-700 { background-color: #334155 !important; }
#music-panel .bg-gray-800 { background-color: #1e293b !important; }
#music-panel .border-gray-700 { border-color: #334155 !important; }
#music-panel .border-gray-700\/50 { border-color: rgba(51, 65, 85, 0.5) !important; }
#music-panel .hover\:bg-gray-800\/50:hover { background-color: rgba(30, 41, 59, 0.5) !important; }
#music-panel .hover\:text-white:hover { color: #ffffff !important; }
#music-panel .bg-gray-600 { background-color: #475569 !important; }

/* 播放列表滚动条 */
#music-playlist::-webkit-scrollbar { width: 3px; }
#music-playlist::-webkit-scrollbar-track { background: transparent; }
#music-playlist::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 2px; }

/* 浅色模式 */
html:not([data-theme="dark"]) #music-panel {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(229, 231, 235, 0.8) !important;
    color: #1f2937 !important;
}
html:not([data-theme="dark"]) #music-panel .text-gray-400 { color: #9ca3af !important; }
html:not([data-theme="dark"]) #music-panel .text-gray-300 { color: #6b7280 !important; }
html:not([data-theme="dark"]) #music-panel .text-gray-500 { color: #6b7280 !important; }
html:not([data-theme="dark"]) #music-panel .bg-gray-700 { background-color: #e5e7eb !important; }
html:not([data-theme="dark"]) #music-panel .bg-gray-800 { background-color: #f3f4f6 !important; }
html:not([data-theme="dark"]) #music-panel .border-gray-700 { border-color: #e5e7eb !important; }
html:not([data-theme="dark"]) #music-panel .border-gray-700\/50 { border-color: rgba(229, 231, 235, 0.8) !important; }
html:not([data-theme="dark"]) #music-panel .hover\:bg-gray-800\/50:hover { background-color: rgba(243, 244, 246, 0.8) !important; }
html:not([data-theme="dark"]) #music-panel .hover\:text-white:hover { color: #111827 !important; }
html:not([data-theme="dark"]) #music-panel .bg-gray-600 { background-color: #d1d5db !important; }

/* 进度条 */
#music-progress-track:hover #music-progress-thumb { opacity: 1 !important; }

/* 封面脉冲 */
#music-cover.music-cover-pulse { animation: coverPulse 2s ease-in-out infinite; }
@keyframes coverPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
}

/* 音乐源切换 */
#music-source-switch { border: 1px solid rgba(75,85,99,0.4); }
.music-src-btn { color: #9ca3af; cursor: pointer; }
.music-src-btn.active { background: linear-gradient(135deg, #06b6d4, #14b8a6); color: #fff; box-shadow: 0 2px 8px rgba(6,182,212,0.3); }
.music-src-btn:hover:not(.active) { color: #e2e8f0; }
html:not([data-theme="dark"]) #music-source-switch { background: rgba(229,231,235,0.6) !important; border-color: rgba(209,213,219,0.6) !important; }
html:not([data-theme="dark"]) .music-src-btn { color: #6b7280; }
html:not([data-theme="dark"]) .music-src-btn:hover:not(.active) { color: #111827; }

/* 云歌单独立盒子 */
#music-cloud-box { z-index: 1; }
#music-cloud-box iframe { display: block; border: none; }

/* 小屏 */
@media (max-width: 640px) {
    #music-player { bottom: 1rem; right: 1rem; }
    #music-panel { width: calc(100vw - 2rem) !important; right: -0.5rem !important; }
}
