/* ============================================================
 * software-list.css — 26下载站分类列表页（PC 端）
 * 设计语言：蓝橙渐变 + 扁平卡片 + 资源密集型网格
 * ============================================================ */

/* ====== 隐藏 base 的侧栏（本页改用自定义左右布局） ====== */
body.software-list-page .sidebar {
    display: none;
}
body.software-list-page .content {
    min-width: 0;
    width: 100%;
}

/* ====== 🔥 热门推荐（随机同类型） ====== */
.sl-hot {
    margin: 20px 0 18px;
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sl-hot-header {
    margin-bottom: 14px;
}

.sl-hot-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.sl-hot-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.sl-hot-track::-webkit-scrollbar {
    display: none;
}

.sl-hot-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    min-width: 0;
    background: #fafbfc;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 110px;
}

.sl-hot-card:hover {
    background: #f0f7ff;
    border-color: #dbeafe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.10);
}

.sl-hot-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sl-hot-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-hot-logo-placeholder {
    font-size: 20px;
    color: #94a3b8;
}

.sl-hot-name {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 90px;
}

.sl-hot-dl {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

/* ====== 子分类导航（保留原有风格，微调间距） ====== */
.sl-subcat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.sl-subcat-link {
    padding: 6px 16px;
    font-size: 13px;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sl-subcat-link:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.sl-subcat-link.active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.sl-subcat-count {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 3px;
}

.sl-subcat-link.active .sl-subcat-count {
    color: rgba(255, 255, 255, 0.7);
}

/* ====== 排序栏 ====== */
.sl-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #64748b;
}

.sl-sort-label { font-size: 13px; color: #94a3b8; margin-right: 4px; }

.sl-sort-link {
    padding: 4px 14px;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
}

.sl-sort-link:hover {
    color: #2563eb;
    background: #eff6ff;
}

.sl-sort-link.active {
    background: #f97316;
    color: #fff;
    font-weight: 600;
}

/* ====== 主区域：左列表 + 右排行 ====== */
.sl-main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.sl-main-left {
    flex: 1;
    min-width: 0;
}

.sl-main-right {
    flex: 0 0 300px;
    align-self: stretch;
    min-width: 0;
}
.sl-rank-sticky {
    position: sticky;
    top: 88px;
    height: fit-content;
}

/* ====== 软件网格：3 列密集排列 ====== */
.sl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* ====== 软件卡片（横向布局，56x56 logo） ====== */
.sl-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    min-width: 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.sl-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.10);
    transform: translateY(-2px);
}

.sl-card-logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #94a3b8;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sl-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sl-card-logo-placeholder {
    font-size: 22px;
    line-height: 1;
}

.sl-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sl-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.sl-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sl-card-cat {
    font-size: 11px;
    color: #2563eb;
    background: #eff6ff;
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.sl-card-version {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.sl-card-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.2;
}

.sl-card-stat {
    white-space: nowrap;
}

.sl-card-rating {
    font-size: 11px;
    color: #f59e0b;
    font-weight: 500;
    white-space: nowrap;
}

.sl-card-rating.muted {
    color: #cbd5e1;
}

.sl-card-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.sl-card-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 16px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #f97316;
    border-radius: 6px;
    text-align: center;
    align-self: flex-start;
    transition: all 0.15s;
}

.sl-card:hover .sl-card-download {
    background: #ea580c;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

/* 空状态 */
.sl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #94a3b8;
    font-size: 14px;
}

/* ====== 📊 本类下载排行（右侧） ====== */
.sl-rank-box {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    border: 1px solid #f0f2f5;
    margin-bottom: 16px;
}

.sl-rank-box--steam {
    border-top: 3px solid #f97316;
}

.sl-rank-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sl-rank-title-icon { font-size: 16px; }

.sl-rank-update {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
    white-space: nowrap;
}

.sl-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sl-rank-item {
    border-bottom: 1px solid #f8fafc;
    min-width: 0;
}

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

.sl-rank-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    text-decoration: none;
    color: inherit;
}

.sl-rank-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    background: #e5e7eb;
    border-radius: 4px;
}

.sl-rank-item:nth-child(1) .sl-rank-num { background: linear-gradient(135deg, #f59e0b, #eab308); color: #fff; }
.sl-rank-item:nth-child(2) .sl-rank-num { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #fff; }
.sl-rank-item:nth-child(3) .sl-rank-num { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }

.sl-rank-name {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sl-rank-ver {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.sl-rank-dl,
.sl-rank-players {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    font-weight: 500;
}

.sl-rank-players {
    color: #2563eb;
    font-weight: 600;
}

/* 悬停展开区域 */
.sl-rank-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.sl-rank-item--expanded .sl-rank-expand {
    max-height: 90px;
}

.sl-rank-expand-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 10px 28px;
}

.sl-rank-expand-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sl-rank-expand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sl-rank-expand-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sl-rank-expand-size {
    font-size: 11px;
    color: #94a3b8;
}

.sl-rank-expand-btn {
    padding: 3px 12px;
    font-size: 11px;
    border-radius: 4px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.sl-rank-expand-btn:hover {
    background: #1d4ed8;
}

/* ====== 📊 本类下载排行（右侧 sticky） ====== */
.sl-rank-sticky {
    position: sticky;
    top: var(--header-h, 100px);
    height: fit-content;
}

/* ====== 加载更多 ====== */
.sl-loadmore {
    text-align: center;
    padding: 16px 0;
    margin-top: 12px;
    cursor: pointer;
    color: #2563eb;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    transition: color 0.15s;
}

.sl-loadmore:hover {
    color: #1d4ed8;
}

.sl-loadmore-text {
    display: inline;
}

.sl-loadmore-spinner {
    margin-left: 6px;
    color: #94a3b8;
}
.sl-loadmore-spinner.is-hidden { display: none; }

/* ============================================================
 * 响应式：中等屏幕（769-1199px）→ 2 列
 * ============================================================ */
@media (max-width: 1199px) and (min-width: 769px) {
    .sl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sl-main-right {
        flex: 0 0 240px;
    }
    .sl-hot-card {
        width: 100px;
    }
}

/* ============================================================
 * 响应式：移动端（<=768px）
 * ============================================================ */
@media (max-width: 768px) {
    .sl-hot {
        margin: 12px 0 14px;
        padding: 14px 16px;
        border-radius: 10px;
    }
    .sl-hot-title {
        font-size: 14px;
    }
    .sl-hot-track {
        gap: 10px;
    }
    .sl-hot-card {
        width: 88px;
        padding: 10px 12px;
    }
    .sl-hot-logo {
        width: 40px;
        height: 40px;
    }
    .sl-hot-name {
        font-size: 11px;
        max-width: 72px;
    }
    .sl-hot-dl {
        font-size: 10px;
    }

    .sl-subcat-nav {
        gap: 6px;
        margin: 0 0 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .sl-subcat-nav::-webkit-scrollbar { display: none; }

    .sl-subcat-link {
        flex-shrink: 0;
        padding: 4px 11px;
        font-size: 12px;
    }

    .sl-sort-bar {
        font-size: 12px;
        gap: 4px;
    }
    .sl-sort-link {
        font-size: 12px;
        padding: 3px 10px;
    }

    .sl-main {
        flex-direction: column;
        gap: 16px;
    }
    .sl-main-right {
        flex: none;
        width: 100%;
        align-self: auto;
    }
    .sl-rank-sticky {
        position: static;
    }

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

    .sl-card {
        padding: 10px;
        gap: 10px;
    }
    .sl-card-logo {
        width: 44px;
        height: 44px;
    }
    .sl-card-name {
        font-size: 13px;
    }
    .sl-card-desc {
        -webkit-line-clamp: 1;
    }

    .sl-rank-box {
        padding: 14px 16px;
    }
    .sl-rank-main {
        padding: 6px 0;
    }
    .sl-rank-title {
        font-size: 14px;
    }
    .sl-rank-name {
        font-size: 13px;
    }
    .sl-rank-ver {
        font-size: 11px;
    }
    .sl-rank-expand-inner {
        padding-left: 28px;
    }
    .sl-rank-expand-logo {
        width: 44px;
        height: 44px;
    }
    .sl-rank-expand-btn {
        font-size: 12px;
        padding: 5px 18px;
    }

    .sl-loadmore {
        font-size: 13px;
        padding: 12px 0;
    }
}

/* ============================================================
 * 电脑游戏专题页多区块（category=36 专用）
 * ============================================================ */

/* --- 区块容器 --- */
.pcg-section {
    margin-bottom: 28px;
}

/* --- 分区标题 --- */
.pcg-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 16px; font-weight: 700; color: #1f2937;
    margin: 0 0 14px;
}
.pcg-section-bar {
    display: inline-block; width: 4px; height: 18px;
    background: #f97316; border-radius: 2px;
}

/* --- 游戏卡片网格（上图下文评分徽章） --- */
.pcg-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.pcg-card {
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    background: #fff; border-radius: 12px; padding: 12px;
    border: 1px solid #eef2f6; transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}
.pcg-card:hover {
    border-color: #93c5fd; transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(37,99,235,0.12);
}
.pcg-card-cover {
    width: 100%; aspect-ratio: 1; border-radius: 10px;
    overflow: hidden; position: relative; background: #f1f5f9;
    margin-bottom: 10px;
}
.pcg-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.pcg-card-emoji {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; font-size: 36px; color: #94a3b8;
}
.pcg-card-badge {
    position: absolute; top: 8px; right: 8px;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; border: 2px solid #fff;
}
.pcg-card-badge.high { background: #f97316; color: #fff; }
.pcg-card-badge.mid { background: #3b82f6; color: #fff; }
.pcg-card-badge.none { background: #e2e8f0; color: #94a3b8; }
.pcg-card-info {
    display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.pcg-card-title {
    font-size: 13px; font-weight: 600; color: #1f2937; margin: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcg-card-sub { font-size: 11px; color: #94a3b8; }
.pcg-card-download {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 4px; padding: 5px 16px; margin-top: 8px;
    font-size: 12px; font-weight: 600; color: #fff;
    background: #f97316; border-radius: 6px;
    transition: all 0.15s; align-self: flex-start;
}
.pcg-card:hover .pcg-card-download {
    background: #ea580c; box-shadow: 0 2px 8px rgba(249,115,22,0.35);
}
.pcg-empty {
    grid-column: 1 / -1; text-align: center;
    padding: 60px; color: #94a3b8; font-size: 14px;
}

/* --- 即将上市时间线 --- */
.pcg-upcoming {
    display: flex; flex-direction: column; gap: 0;
}
.pcg-upcoming-item {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 14px; text-decoration: none; color: inherit;
    border-radius: 8px; transition: background 0.15s;
}
.pcg-upcoming-item:hover { background: #f8fafc; }
.pcg-upcoming-date {
    font-size: 12px; font-weight: 600; color: #64748b;
    width: 44px; flex-shrink: 0;
}
.pcg-upcoming-name {
    flex: 1; font-size: 14px; font-weight: 600; color: #1f2937;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcg-upcoming-tag {
    font-size: 11px; color: #94a3b8; padding: 2px 8px;
    background: #f1f5f9; border-radius: 4px; flex-shrink: 0;
}

/* --- 双栏排行（期待榜 + 人气榜） --- */
.pcg-dual-rank {
    display: flex; gap: 24px;
}
.pcg-rank-col { flex: 1; min-width: 0; }
.pcg-rank-list {
    display: flex; flex-direction: column; gap: 6px;
}
.pcg-rank-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    text-decoration: none; color: inherit; transition: background 0.15s;
}
.pcg-rank-item:hover { background: #f8fafc; }
.pcg-rank-num {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
    background: #e5e7eb; color: #666;
}
.pcg-rank-num.r1 { background: linear-gradient(135deg, #f59e0b, #eab308); color: #fff; }
.pcg-rank-num.r2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #fff; }
.pcg-rank-num.r3 { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.pcg-rank-cover {
    width: 36px; height: 36px; border-radius: 6px; overflow: hidden;
    flex-shrink: 0; background: #f1f5f9;
}
.pcg-rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.pcg-rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcg-rank-name {
    font-size: 13px; font-weight: 600; color: #1f2937;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcg-rank-meta { font-size: 11px; color: #94a3b8; }

/* 响应式 */
@media (max-width: 1199px) {
    .pcg-grid { grid-template-columns: repeat(3, 1fr); }
    .pcg-dual-rank { flex-direction: column; gap: 16px; }
}
@media (max-width: 768px) {
    .pcg-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pcg-card { padding: 10px; }
    .pcg-dual-rank { flex-direction: column; }
}

.sl-sort-bar--compact { margin: -8px 0 14px; }
