/* 左侧边栏 - 基础样式 */
.left-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-self: flex-start;
    margin-left: 20px; /* 添加左边距，确保靠左显示 */
    /* 或者使用 margin-right: auto; 也可以实现靠左效果 */
}


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

/* 分类卡片 */
.category-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

/* 分类标题栏 - 蓝色渐变（软件库） */
.category-header {
    background: linear-gradient(to right, var(--primary), #6e8ffa);
    color: white;
    padding: 15px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 分类标题栏 - 绿色渐变（游戏中心） */
.game-category-header {
    background: linear-gradient(to right, #22c55e, #16a34a) !important;
    color: white;
    padding: 15px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 分类标题栏 - 紫色渐变（论坛板块） */
.forum-category-header {
    background: linear-gradient(to right, #8a2be2, #ba55d3) !important;
    color: white;
    padding: 15px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    display: flex;
    align-items: center;
}

.header-title i {
    margin-right: 5px;
}

/* 分类列表 */
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-right: 5px;
}

/* WebKit浏览器隐藏分类列表滚动条 */
.category-list::-webkit-scrollbar {
    display: none;
}

.category-item {
    border-bottom: 1px solid var(--border);
    margin: 0;
    padding: 0;
}

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

/* 分类图标 */
.category-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    object-fit: contain;
    vertical-align: middle;
}

/* 分类链接 - 默认（软件库蓝色） */
.category-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--dark);
    transition: var(--transition);
    gap: 10px;
    text-decoration: none;
}

.category-link:hover {
    background-color: rgba(25, 152, 255, 0.05);
    color: var(--primary);
    padding-left: 20px;
}

.category-link.active {
    background-color: rgba(25, 152, 255, 0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* 游戏分类链接 - 绿色主题 */
.game-category-link:hover {
    background-color: rgba(34, 197, 94, 0.05) !important;
    color: #22c55e !important;
    padding-left: 20px;
}

.game-category-link.active {
    background-color: rgba(34, 197, 94, 0.1) !important;
    color: #22c55e !important;
    border-left: 3px solid #22c55e !important;
}

/* 论坛板块链接 - 紫色主题 */
.forum-plate-link:hover {
    background-color: rgba(138, 43, 226, 0.05) !important;
    color: #8a2be2 !important;
    padding-left: 20px;
}

.forum-plate-link.active {
    background-color: rgba(138, 43, 226, 0.1) !important;
    color: #8a2be2 !important;
    border-left: 3px solid #8a2be2 !important;
}

/* 投稿/发帖按钮文字 */
.wz {
    font-size: 12px;
    color: white;
    font-weight: normal;
    text-decoration: none;
}

.wz:hover {
    color: white;
}

.wz i {
    margin-right: 5px;
}

/* 工具分类容器 */
.tool-cat-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

/* 工具分类标题栏 - 橙色渐变 */
.tool-cat-header {
    background: linear-gradient(to right, #ff9966, #ff5e62);
    color: white;
    padding: 15px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-cat-title {
    display: flex;
    align-items: center;
}

.tool-cat-title i {
    margin-right: 5px;
}

.tool-cat-more {
    font-size: 12px;
    color: white;
    font-weight: normal;
    text-decoration: none;
}

.tool-cat-more:hover {
    color: white;
}

.tool-cat-more i {
    margin-right: 5px;
}

/* 工具分类网格 */
.tool-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 8px;
    gap: 8px;
}

.tool-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--dark);
    padding: 10px 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tool-cat-item:hover {
    background-color: rgba(255, 153, 102, 0.05);
    color: #ff9966;
}

.tool-cat-active {
    background-color: rgba(255, 153, 102, 0.1);
    color: #ff9966;
}

.tool-cat-icon-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
}

.tool-cat-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.tool-cat-name {
    font-size: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .left-sidebar {
        width: 100%;
        position: static;
        order: 3;
        margin-top: 20px;
        border-top: 1px solid var(--border);
        padding-top: 20px;
    }
}

@media (max-width: 576px) {
    .left-sidebar {
        display: none;
    }
    
    .tool-cat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
