/* =========================================
   分类页专用样式 - category.css
   ========================================= */

/* 分类页包裹容器 */
.category-wrapper {
    padding-top: 16px;
}

/* 面包屑导航卡片 */
.breadcrumb-card {
    background: #fff;
    padding: 12px 20px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 16px;
}

.breadcrumb-card a {
    color: var(--text-sub);
    transition: color 0.2s;
}

.breadcrumb-card a:hover {
    color: var(--primary);
}

.breadcrumb-card .sep {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb-card .current {
    color: var(--text-main);
}

/* 分类头部 */
.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 24px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.category-desc {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.5;
}

.category-stats {
    flex-shrink: 0;
}

.stat-item {
    font-size: 14px;
    color: var(--text-sub);
}

.stat-item strong {
    color: var(--primary);
    font-size: 18px;
}

/* 子分类标签 */
.subcategory-card {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
    padding: 16px 20px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.subcate-tag {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 2px;
    color: var(--text-sub);
    background: var(--bg-body);
    transition: all 0.2s;
}

.subcate-tag:hover {
    color: var(--primary);
    background: var(--blue-light);
}

.subcate-tag.active {
    color: #fff;
    background: var(--primary);
}

/* 分类页主布局 */
.category-main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.category-content {
    min-width: 0;
}

.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 筛选排序栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 12px 16px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.filter-sort {
    display: flex;
    gap: 4px;
}

.sort-item {
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 2px;
    color: var(--text-sub);
    transition: all 0.2s;
}

.sort-item:hover {
    color: var(--primary);
}

.sort-item.active {
    color: #fff;
    background: var(--primary);
}

.filter-view {
    display: flex;
    gap: 4px;
}

.view-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    background: #fff;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.view-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--blue-light);
}

/* 软件网格 */
.soft-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* 软件卡片 */
.soft-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    padding: 16px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all 0.2s;
    overflow: hidden;
}

.soft-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.soft-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.soft-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.soft-card-info {
    flex: 1;
    min-width: 0;
}

.soft-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soft-card-desc {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soft-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
}

/* 卡片徽章 */
.soft-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 2px;
    background: var(--primary);
    color: #fff;
}

.soft-card-badge.t-green {
    background: var(--green);
}

.soft-card-badge.t-cyan {
    background: var(--cyan);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 20px 0;
}

.page-btn,
.page-num {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    font-size: 14px;
    color: var(--text-sub);
    background: #fff;
    transition: all 0.2s;
}

.page-btn:hover,
.page-num:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.page-num.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.page-btn.disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-light);
}

/* 侧边栏面板 */
.sidebar-panel {
    background: #fff;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bg-body);
}

/* 分类标签云 */
.cate-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cate-tag {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 2px;
    background: var(--bg-body);
    color: var(--text-sub);
    transition: all 0.2s;
}

.cate-tag:hover {
    color: var(--primary);
    background: var(--blue-light);
}

.cate-tag.active {
    color: #fff;
    background: var(--primary);
}

/* 迷你排行榜 */
.rank-mini-list {
    display: flex;
    flex-direction: column;
}

.rank-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-body);
}

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

.rank-mini-item:hover .rank-mini-name {
    color: var(--primary);
}

.rank-mini-num {
    width: 18px;
    height: 18px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    text-align: center;
    line-height: 18px;
    border-radius: 2px;
    font-weight: 700;
    flex-shrink: 0;
}

.rank-mini-num.no-1 { background: #fee2e2; color: #ef4444; }
.rank-mini-num.no-2 { background: #ffedd5; color: #f97316; }
.rank-mini-num.no-3 { background: #fef3c7; color: #f59e0b; }

.rank-mini-name {
    font-size: 13px;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 更新列表 */
.update-list {
    display: flex;
    flex-direction: column;
}

.update-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-body);
}

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

.update-item:hover .update-name {
    color: var(--primary);
}

.update-name {
    font-size: 13px;
    color: var(--text-main);
}

.update-ver {
    font-size: 12px;
    color: var(--text-light);
}

/* =========================================
   文章列表样式
   ========================================= */

/* 文章列表容器 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* 文章列表项 */
.article-item {
    display: flex;
    gap: 16px;
    background: #fff;
    padding: 20px;
    border-radius: 1px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.article-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 文章缩略图 */
.article-thumb {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 文章信息 */
.article-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item:hover .article-title {
    color: var(--primary);
}

.article-desc {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
}

.meta-date,
.meta-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 侧边栏软件列表 */
.sidebar-soft-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-soft-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-soft-item:hover {
    background: var(--bg-body);
}

.sidebar-soft-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
    object-fit: cover;
}

.sidebar-soft-name {
    font-size: 13px;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-soft-item:hover .sidebar-soft-name {
    color: var(--primary);
}
