/* ==================== 音乐播放器 ==================== */

.music-player-toggle {
    background: rgba(0, 255, 249, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--neon-cyan);
}

.music-player-toggle:hover {
    background: rgba(0, 255, 249, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 249, 0.3);
    transform: scale(1.1);
}

.music-player-toggle.playing {
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 249, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 249, 0.6);
    }
}

/* 音乐播放器面板 - 小组件样式 */
.music-player-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 320px;
    max-height: 420px;
    background: rgba(10, 14, 39, 0.95);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 249, 0.2);
    backdrop-filter: blur(20px);
    z-index: 999;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.music-player-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* 播放器头部 */
.music-player-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.music-player-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}

.music-player-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.music-player-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

/* 当前播放 - 精简版 */
.music-current-playing {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 255, 249, 0.1);
}

/* 移除封面 */
.music-cover-container {
    display: none;
}

.music-info {
    text-align: left;
}

.music-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 进度条 - 紧凑版 */
.music-progress-container {
    padding: 0 1rem 0.75rem;
}

.music-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.music-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.music-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.music-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 255, 249, 0.6);
}

/* 播放控制 - 紧凑版 */
.music-controls {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(0, 255, 249, 0.1);
}

.music-control-btn {
    background: rgba(0, 255, 249, 0.1);
    border: 1px solid rgba(0, 255, 249, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--neon-cyan);
}

.music-control-btn:hover {
    background: rgba(0, 255, 249, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 249, 0.4);
    transform: scale(1.1);
}

.music-control-btn.play-pause {
    width: 44px;
    height: 44px;
    background: var(--neon-cyan);
    color: var(--bg-primary);
}

.music-control-btn.play-pause:hover {
    background: var(--neon-purple);
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.6);
}

/* 播放列表 - 紧凑版 */
.music-playlist-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.music-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(0, 255, 249, 0.1);
}

.music-playlist-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.music-import-btn {
    background: rgba(0, 255, 249, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.music-import-btn:hover {
    background: rgba(0, 255, 249, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 249, 0.3);
}

.music-playlist {
    max-height: 200px;
    overflow-y: auto;
}

.music-playlist-item {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    margin: 0.2rem;
}

.music-playlist-item:hover {
    background: rgba(0, 255, 249, 0.1);
}

.music-playlist-item.active {
    background: rgba(0, 255, 249, 0.15);
    border-left: 2px solid var(--neon-cyan);
}

.music-playlist-item-cover {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.music-playlist-item-info {
    flex: 1;
    min-width: 0;
}

.music-playlist-item-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.2rem;
}

.music-playlist-item-artist {
    font-size: 0.7rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-playlist-item.active .music-playlist-item-name {
    color: var(--neon-cyan);
}

/* 音量控制 - 紧凑版 */
.music-volume-container {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(0, 255, 249, 0.1);
}

.music-volume-icon {
    color: var(--neon-cyan);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.music-volume-icon svg {
    width: 16px;
    height: 16px;
}

.music-volume-slider {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.music-volume-fill {
    height: 100%;
    background: var(--neon-cyan);
    border-radius: 2px;
    width: 80%;
}

/* 空状态 */
.music-empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.music-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.music-empty-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* 滚动条样式 */
.music-playlist::-webkit-scrollbar {
    width: 6px;
}

.music-playlist::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.music-playlist::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 249, 0.3);
    border-radius: 3px;
}

.music-playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 249, 0.5);
}

/* 响应式 */
@media (max-width: 768px) {
    .music-player-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 500px;
    }
}

/* ==================== QQ登录弹窗 ==================== */

.qq-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.qq-login-content {
    background: rgba(10, 14, 39, 0.98);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 249, 0.3);
    animation: slideUp 0.3s ease;
}

.qrcode-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

#qrcode {
    display: inline-block;
}

#qrcode img {
    border-radius: 8px;
}

/* ==================== 歌单选择器 ==================== */

.playlist-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.playlist-selector-content {
    background: rgba(10, 14, 39, 0.98);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 249, 0.3);
    animation: slideUp 0.3s ease;
}

.playlist-list {
    margin: 1rem 0;
    max-height: 60vh;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}

.playlist-item:hover {
    background: rgba(0, 255, 249, 0.1);
    border-color: rgba(0, 255, 249, 0.3);
    transform: translateX(4px);
}

.playlist-item img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 255, 249, 0.2);
}

.playlist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.playlist-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.playlist-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==================== 动画 ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条美化 */
.playlist-selector-content::-webkit-scrollbar,
.playlist-list::-webkit-scrollbar {
    width: 6px;
}

.playlist-selector-content::-webkit-scrollbar-track,
.playlist-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.playlist-selector-content::-webkit-scrollbar-thumb,
.playlist-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 249, 0.3);
    border-radius: 3px;
}

.playlist-selector-content::-webkit-scrollbar-thumb:hover,
.playlist-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 249, 0.5);
}
