/**
 * 软件分类页专用样式
 * 用于 /category.php 页面
 */

/* ========== 页面主容器 ========== */
.category-page-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.category-main-area {
    flex: 1;
    min-width: 0;
}
.category-sidebar-area {
    width: 330px;
    flex: 0 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 防止固定宽度导致页面溢出滚动条 */
body.category-page {
    overflow-x: auto;
}

/* ========== 标题区 ========== */
.category-header {
    margin-bottom: 30px;
}
.category-header h1 {
    font-size: 1.9rem;
    color: #1f2937;
    margin-bottom: 10px;
}
.category-desc {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ========== 软件列表（单列，宽度95%） ========== */
.software-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 95%;
    margin: 0 auto 40px auto;
}

/* 长条卡片样式 */
.software-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.software-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-inner {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: flex-start;
}

/* 图标区域 */
.card-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
.card-icon img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

/* 内容区域 */
.card-content {
    flex: 1;
    min-width: 0;
}
.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.card-title {
    font-size: 30px;      /* 30pt ≈ 40px，但按用户要求30pt */
    font-weight: 700;
    line-height: 1.2;
    color: #000000;
    margin: 0;
}
.card-title a {
    color: inherit;
    text-decoration: none;
}
.card-title a:hover {
    color: #d97706;
}
.card-detail-btn {
    background: #0f1724;
    color: #ffd966;
    border: 1px solid #ffcc00;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.card-detail-btn:hover {
    background: #ffcc00;
    color: #0f1724;
    border-color: #ffcc00;
}
.card-desc {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 16px;
}
.card-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 0.9rem;
    color: #6b7280;
}
.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.card-meta strong {
    color: #374151;
    font-weight: 500;
}

/* 暂无数据提示 */
.no-data {
    color: #9aaec9;
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
}

/* 子分类标题（全部分类视图） */
.sub-category-title {
    font-size: 1.6rem;
    color: #1f2937;
    margin: 40px 0 20px;
    padding-left: 12px;
    border-left: 4px solid #ffcc00;
}

/* ========== 右侧边栏样式（与详情页统一） ========== */
.category-sidebar-area .sidebar-ad-box {
    background: #f9fafb !important;
    border-radius: 8px !important;
    padding: 8px !important;
    margin-bottom: 25px !important;
    text-align: center !important;
    border: 1px solid #e5e7eb !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
}
.category-sidebar-area .sidebar-ad-box::before {
    content: "广告" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    color: #fff !important;
    font-size: 9px !important;
    padding: 2px 6px !important;
    border-radius: 0 0 4px 0 !important;
    z-index: 10 !important;
    pointer-events: none !important;
}
.category-sidebar-area .sidebar-ad-box img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    height: auto !important;
}
.category-sidebar-area .sidebar-ad-box .ad-placeholder {
    color: #6b7280 !important;
    font-size: 0.75rem !important;
    padding: 20px 0 !important;
    text-align: center !important;
}

.sidebar-news-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sidebar-news-card h3 {
    color: #d97706;
    font-size: 1rem;
    margin-bottom: 12px;
    border-left: 3px solid #ffcc00;
    padding-left: 10px;
}
.latest-software-list-sidebar {
    list-style: none;
    padding: 0;
}
.latest-software-list-sidebar li {
    margin-bottom: 12px;
    background: #f9fafb;
    border-radius: 10px;
    transition: 0.2s;
}
.latest-software-list-sidebar li:hover {
    background: #fffbeb;
    transform: translateX(5px);
}
.latest-link-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    text-decoration: none;
    color: #1f2937 !important;
}
.latest-icon-sidebar {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.latest-icon-sidebar img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
}
.latest-info-sidebar {
    flex: 1;
    min-width: 0;
}
.latest-name-sidebar {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.latest-meta-sidebar {
    font-size: 0.65rem;
    color: #6b7280;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.8rem;
}
.pagination a:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
}
.pagination .active {
    background: #d97706;
    border-color: #d97706;
    color: white;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .category-page-container {
        flex-direction: column;
    }
    .category-sidebar-area {
        width: 100%;
    }
    .software-list {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .card-inner {
        flex-direction: column;
        text-align: center;
    }
    .card-icon {
        margin: 0 auto;
    }
    .card-title-row {
        flex-direction: column;
        align-items: center;
    }
    .card-meta {
        justify-content: center;
    }
}