/* ============================================================
 * homepage.css — 26下载站首页（应用市场 4 板块模式）v2
 * 命名空间：所有类名以 .home- 或 .m-home- / .m-cat- / .m-featured- 开头
 * PC 端用 .home-*；M 端用 .m-home-* .m-cat-* .m-featured-*
 * ============================================================ */

/* === 首页：隐藏 base.html sidebar（首页走 4 板块模式，不再依赖 sidebar） === */
body.frontpage-body .sidebar {
    display: none !important;
}
body.frontpage-body .content {
    min-width: 0 !important;
    flex: 1 !important;
}
body.frontpage-body .container {
    gap: 0 !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* ============================================================
 * PC 端样式（≥769px）
 * ============================================================ */

/* === 板块基础 === */
.home-block {
    margin: 30px 0;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.home-block-head {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    gap: 8px;
    margin-bottom: 16px;
}

.home-block-bar {
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #2563eb;
    border-radius: 2px;
}

.home-block-more {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: #2563eb;
    text-decoration: none;
}

.home-block-more:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.home-block-body {
    display: flex;
    gap: 20px;
    margin-top: 4px;
}

/* === 板块左网格 === */
.home-block-grid {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 8px;
}

/* 4 个板块统一 5 列 × 4 行 = 20 个 (5×4=4 行 ≈ 320px 与 ranking 8 条对齐) */
.home-block-grid--mobile_games,
.home-block-grid--mobile_apps,
.home-block-grid--pc_software,
.home-block-grid--pc_games {
    grid-template-columns: repeat(5, 1fr);
}

.home-block-grid-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 10px 4px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.15s;
}

.home-block-grid-card:hover {
    transform: translateY(-2px);
    background: #f8fafc;
    color: #2563eb;
}

.home-block-grid-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #f1f5f9;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #94a3b8;
    font-weight: 700;
    overflow: hidden;
}

/* 竖版 logo（4:5 比例，适配游戏封面） */
.home-block-grid-logo--tall {
    width: 64px;
    height: 80px;
    border-radius: 10px;
    font-size: 20px;
}

.home-block-grid-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.home-block-grid-name {
    font-size: 12px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.3;
}

/* === 板块右排行 === */
.home-block-ranking {
    flex: 0 0 280px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
}

.home-block-ranking-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    padding-bottom: 8px;
    border-bottom: 2px solid #2563eb;
    margin: 0 0 10px;
}

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

.home-block-rank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px;
    border-bottom: 1px dashed #e2e8f0;
}

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

.home-block-rank-num {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: #94a3b8;
    color: #fff;
    font-size: 11px;
    text-align: center;
    line-height: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.home-block-rank-num.rank-1 {
    background: #ef4444;
}
.home-block-rank-num.rank-2 {
    background: #f97316;
}
.home-block-rank-num.rank-3 {
    background: #eab308;
}

.home-block-rank-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #94a3b8;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.home-block-rank-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.home-block-rank-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.home-block-rank-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.home-block-rank-cat {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.home-block-rank-btn {
    padding: 3px 10px;
    font-size: 11px;
    background: #fff;
    color: #334155;
    border-radius: 10px;
    text-decoration: none;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}

.home-block-rank-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* === 顶部精选横滑（精选手游 / 精选应用） === */
.home-featured-hscroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.home-featured-hscroll::-webkit-scrollbar {
    display: none;
}

.home-featured-hscroll-card {
    flex: 0 0 90px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    text-align: center;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.15s;
}

.home-featured-hscroll-card:hover {
    transform: translateY(-2px);
    background: #f8fafc;
    color: #2563eb;
}

.home-featured-hscroll-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #f1f5f9;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #94a3b8;
    font-weight: 700;
    overflow: hidden;
}

.home-featured-hscroll-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.home-featured-hscroll-name {
    font-size: 12px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === PC 底部资讯列表（沿用旧 .home-list） === */
.home-section {
    margin: 30px 0;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.home-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #2563eb;
    border-radius: 2px;
}

.home-section-title .more {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: #2563eb;
    text-decoration: none;
}

.home-section-title .more:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.home-list {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.home-list-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

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

.home-list-item:hover {
    background: #f8fafc;
}

.home-list-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #94a3b8;
    overflow: hidden;
}

.home-list-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.home-list-info {
    flex: 1;
    min-width: 0;
}

.home-list-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-list-meta {
    font-size: 12px;
    color: #94a3b8;
}

.home-list-meta .sep {
    margin: 0 6px;
}

/* === 轮播图（包一层 .home-carousel，继承 base.html 的 .carousel 样式） === */
.home-carousel {
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
}

/* ============================================================
 * M 端样式（≤768px，由 .m-home-container 包裹）
 * ============================================================ */
.m-home-container {
    padding: 0 12px 20px;
}

/* === M 端轮播图 === */
.m-banner-box {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 7;
    margin: 0 0 12px;
    background: #f1f5f9;
}

.m-banner-box a {
    display: block;
    width: 100%;
    height: 100%;
}

.m-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === M 端 section 通用标题 === */
.m-section-title {
    display: flex;
    align-items: center;
    padding: 14px 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    gap: 8px;
}

.m-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #2563eb;
    border-radius: 2px;
}

/* === M 端顶部精选横滑 === */
.m-featured-hscroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.m-featured-hscroll::-webkit-scrollbar {
    display: none;
}

.m-featured-hscroll-card {
    flex: 0 0 70px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    text-align: center;
    padding: 6px 2px;
}

.m-featured-hscroll-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #fff;
    margin: 0 auto 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #94a3b8;
    font-weight: 700;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.m-featured-hscroll-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.m-featured-hscroll-name {
    font-size: 11px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === M 端 4 列分类入口 === */
.m-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.m-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 4px;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.m-cat-item:hover {
    transform: translateY(-1px);
    color: #2563eb;
}

.m-cat-ico {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin: 0 auto 4px;
}

.m-cat-name {
    font-size: 12px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* === M 端板块 === */
.m-home-block {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin: 16px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.m-home-block-head {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px;
    gap: 8px;
}

.m-home-block-head::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #2563eb;
    border-radius: 2px;
}

.m-home-block-more {
    margin-left: auto;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 400;
}

.m-home-block-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
    width: 100%;
    min-width: 0;
}

.m-home-block-grid-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6px 2px;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    transition: background 0.15s;
    min-width: 0;        /* 关键：防止长名字撑开 grid item */
    overflow: hidden;
}

.m-home-block-grid-card:active {
    background: #f1f5f9;
}

.m-home-block-grid-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f1f5f9;
    margin: 0 auto 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #94a3b8;
    font-weight: 700;
    overflow: hidden;
}

.m-home-block-grid-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.m-home-block-grid-name {
    font-size: 11px;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.3;
    width: 100%;
}

/* === M 端板块内排行 === */
.m-home-block-ranking {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.m-home-block-ranking-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    padding-bottom: 6px;
    margin: 0 0 6px;
    border-bottom: 1px solid #e2e8f0;
}

.m-home-block-rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.m-home-block-rank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.m-home-block-rank-item:last-child {
    border-bottom: none;
}

.m-home-block-rank-num {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: #cbd5e1;
    color: #fff;
    font-size: 10px;
    text-align: center;
    line-height: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.m-home-block-rank-num.rank-1 {
    background: #ef4444;
}
.m-home-block-rank-num.rank-2 {
    background: #f97316;
}
.m-home-block-rank-num.rank-3 {
    background: #eab308;
}

.m-home-block-rank-logo {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    background: #f1f5f9;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
}

.m-home-block-rank-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.m-home-block-rank-body {
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.m-home-block-rank-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    display: block;
}

.m-home-block-rank-cat {
    font-size: 10px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    line-height: 1.3;
}

.m-home-block-rank-btn {
    padding: 2px 8px;
    font-size: 10px;
    background: #f0f2f5;
    color: #334155;
    border-radius: 8px;
    text-decoration: none;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.m-home-block-rank-btn:active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ============================================================
 * 响应式：中等屏幕（769-1199px）—— 板块改 column（ranking 移到下方）
 * 防止窄屏下 left/right 等高拉伸
 * ============================================================ */
@media (max-width: 1199px) and (min-width: 769px) {
    .home-block-body {
        flex-direction: column;
    }
    .home-block-ranking {
        flex: 0 0 auto;
    }
}

/* ============================================================
 * 每日更新页（参考 Image #18 截图）
 * PC: 3 列 grid card + 横向分类导航
 * M:  单列卡片 + 横向滚动分类导航
 * URL: /daily-updates.html  /  /daily-updates/<slug>.html
 * ============================================================ */
.daily-updates-container {
    margin: 24px 0;
    background: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}

.daily-page-title {
    position: relative;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px;
    padding-left: 14px;
    line-height: 1.3;
}

.daily-page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(180deg, #0073e6 0%, #5ba8ff 100%);
}

.daily-page-title-sub {
    font-size: 16px;
    font-weight: 500;
    color: #0073e6;
    margin-left: 4px;
}

/* 横向分类导航 */
.daily-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.daily-cat-link {
    padding: 7px 18px;
    font-size: 14px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    text-decoration: none;
    transition: all 0.18s ease;
    font-weight: 500;
}

.daily-cat-link:hover {
    background: #eff6ff;
    color: #0073e6;
    border-color: #bfdbfe;
}

.daily-cat-link.active {
    background: linear-gradient(135deg, #0073e6 0%, #2563eb 100%);
    color: #fff;
    border-color: #0073e6;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 115, 230, 0.25);
}

.daily-cat-nav-bottom {
    margin-top: 32px;
    margin-bottom: 0;
    border-bottom: none;
    border-top: 1px solid #f1f5f9;
    padding-top: 22px;
    padding-bottom: 0;
}

/* 3 列 grid 列表 */
.daily-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.daily-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid #f0f2f5;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    min-width: 0;
}

.daily-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 20px rgba(0, 115, 230, 0.12);
    transform: translateY(-2px);
}

.daily-card-logo {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    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.08);
}

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

.daily-card-logo-placeholder {
    font-size: 28px;
    color: #94a3b8;
}

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

.daily-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.daily-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.daily-card-rating {
    color: #f97316;
    font-weight: 700;
    font-size: 12px;
}

.daily-card-cat {
    color: #0073e6;
    background: #eff6ff;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.daily-card-date {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 3px;
}

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

/* 响应式：中等屏幕 2 列 */
@media (max-width: 1199px) and (min-width: 769px) {
    .daily-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .daily-updates-container {
        padding: 22px 20px;
    }
}

/* ========== M 端每日更新页 ========== */
.m-daily-updates-container {
    background: #fff;
    border-radius: 12px;
    padding: 16px 14px;
    margin: 12px 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.m-daily-page-title {
    position: relative;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    padding-left: 12px;
    line-height: 1.3;
}

.m-daily-page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #0073e6 0%, #5ba8ff 100%);
}

.m-daily-cat-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    padding: 4px 0 12px;
    overflow-x: auto;
    border-bottom: 1px solid #f1f5f9;
    scrollbar-width: none;
}

.m-daily-cat-nav::-webkit-scrollbar {
    display: none;
}

.m-daily-cat-link {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.18s ease;
}

.m-daily-cat-link.active {
    background: linear-gradient(135deg, #0073e6 0%, #2563eb 100%);
    color: #fff;
    border-color: #0073e6;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 115, 230, 0.25);
}

.m-daily-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.m-daily-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
}

.m-daily-card:active {
    background: #f8fafc;
    border-color: #bfdbfe;
}

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

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

.m-daily-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.m-daily-card-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #94a3b8;
    align-items: center;
    flex-wrap: wrap;
}

.m-daily-card-cat {
    color: #0073e6;
    background: #eff6ff;
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 500;
}

.m-daily-empty {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
    font-size: 13px;
}

/* ============================================================
   软件详情页 - 富文本描述图片限制
   PC: 横图最宽 600px，竖图最高 550px
   M : 横图最宽 100% (容器宽)，竖图最高 480px
   ============================================================ */
.detail-section-body img {
    max-width: 600px;
    max-height: 550px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 8px auto;
    border-radius: 6px;
}

.m-description img {
    max-width: 100%;
    max-height: 480px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 8px auto;
    border-radius: 6px;
}

/* ============================================================
   软件详情页：锚点导航 + 区块（PC + M 通用，M 在媒体查询里覆盖）
   ============================================================ */
.detail-anchor-nav {
    display: flex;
    gap: 24px;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
    margin-bottom: 16px;
    border-radius: 8px 8px 0 0;
}
.detail-anchor-nav::-webkit-scrollbar { display: none; }
.detail-anchor-nav a {
    color: #666;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.detail-anchor-nav a:hover { color: #00bcd4; }
.detail-anchor-nav a.anchor-active {
    color: #00bcd4;
    border-color: #00bcd4;
    font-weight: 600;
}

/* 区块通用容器 */
.detail-section {
    padding: 24px 30px;
    border-top: 1px solid #f0f2f5;
    scroll-margin-top: 70px; /* 留出 sticky nav 的高度 */
}
.detail-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #00bcd4;
    border-radius: 2px;
}

/* 卡片网格（猜您喜欢、同厂商、其它版本通用） */
.detail-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
@media (max-width: 768px) {
    .detail-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .detail-section { padding: 16px; scroll-margin-top: 60px; }
    .detail-anchor-nav { padding: 10px 16px; gap: 18px; font-size: 13px; }
}

/* 卡片（复用 daily-card 视觉，做一个紧凑版） */
.detail-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #f0f2f5;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    min-width: 0;
}
.detail-card:hover {
    border-color: #00bcd4;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.12);
    transform: translateY(-1px);
}
.detail-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f5f7fa;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #00bcd4;
}
.detail-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-card-info {
    flex: 1;
    min-width: 0;
}
.detail-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.detail-card-meta {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 相关文章列表 */
.detail-news-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.detail-news-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.detail-news-item:hover { background: #f0f9fa; }
.detail-news-title {
    flex: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.detail-news-date {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* "其它版本"区块的横向滚动卡片 */
.detail-versions-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.detail-versions-scroll::-webkit-scrollbar { height: 6px; }
.detail-versions-scroll::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 3px; }
.detail-versions-scroll .detail-card {
    flex: 0 0 240px;
}
@media (max-width: 768px) {
    .detail-versions-scroll .detail-card { flex: 0 0 200px; }
}

/* 详情页：侧栏 sticky（仅 PC，仅当 body 带 .software-detail-page 类时生效）
   移动端在 base.html 已用 position:static 覆盖，这里通过 body 类隔离，
   不影响首页/列表页的侧栏卡片。 */
@media (min-width: 769px) {
    body.software-detail-page .sidebar .card {
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    body.software-detail-page .sidebar .card::-webkit-scrollbar { width: 6px; }
    body.software-detail-page .sidebar .card::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 3px; }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #00bcd4;
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.35);
    z-index: 1000;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
    opacity: 0;
}
.back-to-top.is-visible {
    display: flex;
    opacity: 1;
}
.back-to-top:hover {
    background: #00a5bb;
    transform: translateY(-2px);
}
.back-to-top svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
}
@media (max-width: 768px) {
    .back-to-top {
        right: 16px;
        bottom: 80px;
        width: 40px;
        height: 40px;
    }
}

/* 详情页标签栏：#vivo游戏 #休闲游戏 ... */
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.detail-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f0f9fa;
    color: #00bcd4;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #c7eef2;
    transition: background 0.2s, color 0.2s;
}
.detail-tag:hover {
    background: #00bcd4;
    color: #fff;
    border-color: #00bcd4;
}

