/* ========== 右侧边栏样式 ========== */

/* 侧边栏：与左侧边栏对称 */
.qq-sidebar{
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    width: 60px;
    background-color: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.08);
    z-index: 998;
    overflow-y: auto;
    transition: width 0.3s ease, right 0.3s ease;
    border-left: 1px solid #e2e8f0;
}
/* 滚动条在左边 */
.qq-sidebar{
    direction: rtl;
}
.qq-sidebar > * {
    direction: ltr;
}
.qq-sidebar.open{width:260px;}

/* 滚动时收缩效果 - 向右让出空间，露出部分图标 */
.qq-sidebar.scrolled {
    right: -45px;
    width: 60px;
}

/* QQ顶部蓝色栏 */
.qq-head{
    height:44px;background:#12b7f5;
    display:flex;align-items:center;justify-content:space-between;
    padding:0 12px;color:#fff;
}
.qq-head h3{
    font-size:15px;white-space:nowrap;overflow:hidden;
    width:0;transition:width 0.3s;
}
.qq-sidebar.open .qq-head h3{width:auto;}

.toggle-btn{
    width:26px;height:26px;border-radius:50%;
    background:rgba(255,255,255,0.25);
    display:flex;align-items:center;justify-content:center;
    cursor:pointer;font-size:15px;user-select:none;
}

/* 侧边菜单 */
.qq-menu-item{
    height:48px;display:flex;align-items:center;
    padding:0 12px;gap:10px;cursor:pointer;
    border-bottom:1px solid #eee;transition:background 0.2s;
    position:relative;
}
.qq-menu-item:hover{background:#f0f2f5;}
.qq-icon{
    width:32px;height:32px;border-radius:6px;
    background:#e8f4ff;display:flex;align-items:center;justify-content:center;
    color:#12b7f5;font-size:17px;flex-shrink:0;
}
.qq-text{
    white-space:nowrap;overflow:hidden;width:0;transition:width 0.3s;
}
.qq-sidebar.open .qq-text{width:auto;}

/* 收缩悬浮文字提示 */
.tip-text{
    position:absolute;
    left:64px;
    top:50%;
    transform:translateY(-50%);
    background:#222;
    color:#fff;
    font-size:12px;
    padding:4px 9px;
    border-radius:4px;
    white-space:nowrap;
    z-index:9999;
    opacity:0;
    visibility:hidden;
    transition:0.15s;
}
.qq-sidebar:not(.open) .qq-menu-item:hover .tip-text{
    opacity:1;
    visibility:visible;
}

/* 热度排名 */
.rank-title{
    height:0;
    line-height:36px;padding:0 12px;
    background:#f7f8fa;font-size:13px;color:#666;
    border-bottom:1px solid #eee;
    overflow:hidden;
    transition:height 0.3s ease;
}
.qq-sidebar.open .rank-title{height:36px;}

.rank-user{
    display:flex;align-items:center;gap:10px;padding:10px 12px;
    border-bottom:1px solid #f0f0f0;cursor:pointer;
    transition:background 0.2s;
    position:relative;
}
.rank-user:hover{background:#f0f2f5;}
.user-avatar{
    width:36px;height:36px;border-radius:6px;
    background:#dceaff;display:flex;align-items:center;justify-content:center;
    font-size:16px;color:#12b7f5;flex-shrink:0;
    overflow:hidden;
}
.user-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.user-name{
    white-space:nowrap;overflow:hidden;width:0;transition:width 0.3s;
}
.qq-sidebar.open .user-name{width:auto;}

.user-tip{
    position:absolute;
    left:64px;
    top:50%;
    transform:translateY(-50%);
    background:#222;
    color:#fff;
    font-size:12px;
    padding:4px 9px;
    border-radius:4px;
    white-space:nowrap;
    z-index:9999;
    opacity:0;
    visibility:hidden;
}
.qq-sidebar:not(.open) .rank-user:hover .user-tip{
    opacity:1;
    visibility:visible;
}

/* 音乐播放器 */
.music-player{
    padding:14px 12px;
    background:linear-gradient(160deg,#f8fbff,#eff6fe);
    border-top:1px solid #dde7f3;
    position:relative;
    width:100%;
}

.music-song-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}
.song-name{
    font-size:12px;color:#2b4666;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:170px;
}
.open-list-btn{
    width:22px;height:22px;
    display:flex;align-items:center;justify-content:center;
    font-size:13px;color:#12b7f5;
    border-radius:4px;cursor:pointer;
    transition:background 0.2s;
    flex-shrink:0;
}
.open-list-btn:hover{background:rgba(18,183,245,0.1);}

.music-progress{
    width:100%;
    height:3px;
    background:#dde7f3;
    border-radius:3px;
    margin-bottom:12px;
}
.progress-inner{
    height:100%;
    width:22%;
    background:#12b7f5;
    border-radius:3px;
}

.music-controls{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:16px;
}
.control-btn{
    border:none;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    cursor:pointer;
    flex-shrink:0;
}
.prev-btn,.next-btn{
    width:24px;height:24px;
    background:transparent;color:#555;
}
.prev-btn:hover,.next-btn:hover{color:#12b7f5;}
.play-btn{
    width:32px;height:32px;
    background:#12b7f5;color:#fff;
    box-shadow:0 1px 4px rgba(18,183,245,0.2);
}

/* 收缩仅保留播放键 */
.qq-sidebar:not(.open) .music-song-top,
.qq-sidebar:not(.open) .music-progress,
.qq-sidebar:not(.open) .prev-btn,
.qq-sidebar:not(.open) .next-btn,
.qq-sidebar:not(.open) .open-list-btn{
    display:none !important;
}

.playlist-panel{
    position:absolute;left:0;bottom:100%;width:100%;
    background:#fff;border-radius:8px 8px 0 0;box-shadow:0 -3px 10px rgba(0,0,0,0.08);
    max-height:180px;overflow:hidden;display:none;
}
.playlist-head{
    height:36px;line-height:36px;padding:0 12px;font-size:13px;color:#333;
    border-bottom:1px solid #eee;display:flex;justify-content:space-between;
}
.close-list{font-size:12px;color:#999;cursor:pointer;}
.playlist-scroll{max-height:144px;overflow-y:auto;}
.playlist-item{
    padding:8px 12px;font-size:12px;color:#555;cursor:pointer;
    border-bottom:1px solid #f5f7fa;
}
.playlist-item:hover{background:#f0f5fc;color:#12b7f5;}
.playlist-item.active{background:#e8f4ff;color:#12b7f5;}
.playlist-item .pl-item-title{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    margin-bottom:2px;
}
.playlist-item .pl-item-artist{
    font-size:10px;
    color:#999;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* 用户列表样式 */
.user-list-section {
    padding: 10px 0;
}
.user-list-title {
    font-size: 13px;
    color: #666;
    padding: 0 12px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}
.qq-sidebar.open .user-list-title {
    height: 36px;
    line-height: 36px;
    background: #f7f8fa;
    border-bottom: 1px solid #eee;
}
