/* 右侧边栏 - 确保靠右 */
.right-sidebar {
    width: 270px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin-right: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-self: flex-start;
    /* 确保在flex布局中自然靠右 */
}

/* WebKit浏览器隐藏滚动条 */
.right-sidebar::-webkit-scrollbar {
    display: none;
}

/* 侧边栏卡片 */
.sidebar-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar-header {
    padding: 15px;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-body {
    padding: 15px;
}

/* 用户信息中心样式 */
.user-info-center {
    text-align: center;
    margin-bottom: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
}

.user-nickname {
    font-weight: 600;
    margin-bottom: 10px;
}

/* 用户统计数据样式 */
.user-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 15px;
}

.user-stat-item {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.user-stat-item:hover {
    color: #4361ee;
    transform: translateY(-2px);
}

.user-stat-item .stat-number {
    font-weight: 600;
}

.user-stat-item .stat-label {
    font-size: 12px;
}

/* 用户操作按钮样式 */
.user-actions {
    display: flex;
    gap: 10px;
}

.user-action-btn {
    flex: 1;
    text-align: center;
    font-size: 13px;
}

/* 登录提示样式 */
.login-prompt {
    text-align: center;
    padding: 10px 0;
}

.login-icon {
    font-size: 50px;
    color: #ddd;
    margin-bottom: 10px;
}

.login-message {
    color: var(--gray);
}

.login-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.login-action-btn {
    flex: 1;
    text-align: center;
}

/* 通知链接样式 */
.notice-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    text-decoration: none;
}

.notice-link i {
    color: var(--primary);
}

/* 软件排行榜样式 - 蓝色主题（改为和游戏一样的格式） */
.hot-rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-rank-item {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    transition: all 0.3s ease;
}

.hot-rank-item:last-child {
    border-bottom: none;
}

.hot-rank-item:hover {
    background-color: rgba(25, 152, 255, 0.05);
    transform: translateX(3px);
}

.hot-rank-link {
    display: flex;
    align-items: center;
    color: var(--dark);
    text-decoration: none;
}

.hot-rank-link:hover .hot-rank-name {
    color: var(--primary);
}

.hot-rank-num {
    width: 24px;
    height: 24px;
    background: #f0f3f7;
    color: var(--gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-rank-num.top {
    background: linear-gradient(to right, var(--primary), #6e8ffa);
    color: white;
}

.hot-rank-item:first-child .hot-rank-num.top {
    background: linear-gradient(to right, #FF6B6B, #FF8E8E);
}

.hot-rank-item:nth-child(2) .hot-rank-num.top {
    background: linear-gradient(to right, #FF9F43, #FFBC7D);
}

.hot-rank-item:nth-child(3) .hot-rank-num.top {
    background: linear-gradient(to right, #54A0FF, #6ABEFF);
}

/* 软件排行榜图标样式 - 与游戏图标保持一致 */
.hot-rank-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-rank-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.hot-rank-info {
    flex: 1;
    min-width: 0;
}

.hot-rank-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-rank-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.hot-rank-category {
    color: var(--primary);
    background: rgba(25, 152, 255, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.hot-rank-downloads {
    color: #999;
    font-size: 11px;
}

.hot-rank-downloads i {
    margin-right: 3px;
}

/* 火热游戏排行样式 - 绿色主题 */
.hot-games-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-game-item {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    transition: all 0.3s ease;
}

.hot-game-item:last-child {
    border-bottom: none;
}

.hot-game-item:hover {
    background-color: rgba(34, 197, 94, 0.05);
    transform: translateX(3px);
}

.hot-game-link {
    display: flex;
    align-items: center;
    color: var(--dark);
    text-decoration: none;
}

.hot-game-link:hover .hot-game-name {
    color: #22c55e;
}

.hot-game-num {
    width: 24px;
    height: 24px;
    background: #f0f3f7;
    color: var(--gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-game-num.top {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
}

.hot-game-item:first-child .hot-game-num.top {
    background: linear-gradient(to right, #FF6B6B, #FF8E8E);
}

.hot-game-item:nth-child(2) .hot-game-num.top {
    background: linear-gradient(to right, #FF9F43, #FFBC7D);
}

.hot-game-item:nth-child(3) .hot-game-num.top {
    background: linear-gradient(to right, #54A0FF, #6ABEFF);
}

.hot-game-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.hot-game-info {
    flex: 1;
    min-width: 0;
}

.hot-game-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.hot-game-category {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.hot-game-count {
    color: #999;
    font-size: 11px;
}

.hot-game-count i {
    margin-right: 3px;
}

/* 热门工具排行样式 - 橙色主题 */
.hot-tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-tool-item {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    transition: all 0.3s ease;
}

.hot-tool-item:last-child {
    border-bottom: none;
}

.hot-tool-item:hover {
    background-color: rgba(255, 153, 102, 0.05);
    transform: translateX(3px);
}

.hot-tool-link {
    display: flex;
    align-items: center;
    color: var(--dark);
    text-decoration: none;
}

.hot-tool-link:hover .hot-tool-name {
    color: #ff9966;
}

.hot-tool-num {
    width: 24px;
    height: 24px;
    background: #f0f3f7;
    color: var(--gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-tool-num.top {
    background: linear-gradient(to right, #ff9966, #ff5e62);
    color: white;
}

.hot-tool-item:first-child .hot-tool-num.top {
    background: linear-gradient(to right, #FF6B6B, #FF8E8E);
}

.hot-tool-item:nth-child(2) .hot-tool-num.top {
    background: linear-gradient(to right, #FF9F43, #FFBC7D);
}

.hot-tool-item:nth-child(3) .hot-tool-num.top {
    background: linear-gradient(to right, #54A0FF, #6ABEFF);
}

.hot-tool-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.hot-tool-info {
    flex: 1;
    min-width: 0;
}

.hot-tool-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.hot-tool-category {
    color: #ff9966;
    background: rgba(255, 153, 102, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.hot-tool-count {
    color: #999;
    font-size: 11px;
}

.hot-tool-count i {
    margin-right: 3px;
}

/* 帖子排行榜样式 - 紫色主题 */
.post-ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-ranking-item {
    position: relative;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.post-ranking-item:not(:last-child) {
    border-bottom: 1px dashed var(--border);
}

.post-ranking-item:hover {
    background-color: rgba(138, 43, 226, 0.05);
    transform: translateX(3px);
}

.post-ranking-link {
    display: flex;
    text-decoration: none;
    color: var(--dark);
}

.post-ranking-link:hover .post-ranking-title {
    color: #8a2be2;
}

.rank-badge {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.rank-1 {
    background: linear-gradient(135deg, #FF6B6B, #FF0000);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 0, 0, 0.2);
}

.rank-2 {
    background: linear-gradient(135deg, #5C7CFA, #339AF0);
    color: white;
    box-shadow: 0 2px 4px rgba(51, 154, 240, 0.2);
}

.rank-3 {
    background: linear-gradient(135deg, #20C997, #38D9A9);
    color: white;
    box-shadow: 0 2px 4px rgba(32, 201, 151, 0.2);
}

.rank-4, .rank-5, .rank-6 {
    background: #f0f0f0;
    color: #777;
}

.post-ranking-content {
    flex: 1;
    overflow: hidden;
}

.post-ranking-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
}

.post-ranking-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.post-ranking-plate {
    color: #8a2be2;
    padding: 2px 6px;
    background-color: rgba(138, 43, 226, 0.08);
    border-radius: 3px;
    white-space: nowrap;
}

.post-ranking-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
}

.post-ranking-stats span {
    display: flex;
    align-items: center;
}

.post-ranking-stats i {
    margin-right: 3px;
    font-size: 11px;
}

/* 活跃用户排行榜样式 - 青色主题 */
.right-active-users-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.right-active-user-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.right-active-user-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.right-active-user-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.right-active-user-link:hover {
    color: #4361ee;
    transform: translateX(3px);
}

.right-active-user-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.right-active-user-rank {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.right-active-user-rank.rank-1 {
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.right-active-user-rank.rank-2 {
    background: linear-gradient(45deg, #C0C0C0, #A0A0A0);
}

.right-active-user-rank.rank-3 {
    background: linear-gradient(45deg, #CD7F32, #B8860B);
}

.right-active-user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
}

.right-active-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.right-active-user-info {
    flex: 1;
    min-width: 0;
}

.right-active-user-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.right-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
    flex-shrink: 1;
}

.right-active-user-time {
    font-size: 11px;
    color: #666;
}

.right-active-user-time i {
    color: #6c757d;
}

.right-admin-tag {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.right-vip-tag {
    background: linear-gradient(45deg, #ffc107, #ffb300);
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.right-online-tag {
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* 在线状态指示器 */
.right-online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #28a745;
    border: 2px solid #fff;
    border-radius: 50%;
}

.right-online-indicator {
    font-size: 12px;
    color: #28a745;
    margin-left: auto;
}

.right-online-dot {
    color: #28a745;
    animation: right-pulse 2s infinite;
}

@keyframes right-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 统计数据容器 */
.header-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    padding: 12px 0;
    border-top: 1px dashed var(--border);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
    font-size: 12px;
}

.stat-item.new {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.stat-item.active {
    color: #fd7e14;
    background: rgba(253, 126, 20, 0.1);
}

.stat-number {
    font-weight: 600;
    font-size: 13px;
}

.stat-label {
    font-size: 11px;
}

/* 友情链接样式 - 粉色主题 */
.friend-link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.friend-link-apply {
    font-size: 12px;
    color: inherit;
    margin-left: 10px;
    text-decoration: none;
}

.friend-link-apply i {
    margin-right: 3px;
}

.friend-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.friend-link-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s;
    background: #f8f9fa;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.friend-link-item:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #3b82f6;
    transform: translateY(-2px);
}

.friend-link-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 8px;
    object-fit: cover;
}

.friend-link-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.empty-links {
    grid-column: span 2;
    text-align: center;
    padding: 15px;
    color: #888;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .right-sidebar {
        width: 100%;
        position: static;
    }
}

/* 移动端隐藏右侧边栏 */
@media (max-width: 768px) {
    .right-sidebar {
        display: none;
    }
}
