  /* =========================================
           1. 基础样式继承 (与首页保持一致)
           ========================================= */
           :root {
            --primary-color: #3b82f6;
            --primary-hover: #2563eb;
            --text-main: #1f2937;
            --text-secondary: #6b7280;
            --bg-body: #f3f4f6;
            --bg-card: #ffffff;
            --radius: 8px;
            --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
            --header-height: 64px;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; }
        a { text-decoration: none; color: inherit; transition: color 0.2s; }
        ul { list-style: none; }
        img { max-width: 100%; display: block; object-fit: cover; }

        .container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
        .flex { display: flex; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }

        /* 标签样式 */
        .tag { font-size: 12px; padding: 2px 6px; border-radius: 4px; margin-right: 8px; font-weight: bold; }
        .tag.new { background: #e0f2fe; color: #0284c7; }
        .tag.hot { background: #fee2e2; color: #dc2626; }
        .tag.pro { background: #f3e8ff; color: #9333ea; }
        .tag.video { background: #ffedd5; color: #c2410c; } 

        /* =========================================
           2. 顶部导航 (复用首页)
           ========================================= */
        header { background: var(--bg-card); height: var(--header-height); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
        .nav-inner { height: 100%; }
        .logo { font-size: 20px; font-weight: 800; color: var(--primary-color); letter-spacing: 1px; }
        .nav-links { display: flex; gap: 32px; }
        .nav-links a { font-weight: 500; font-size: 15px; position: relative; }
        .nav-links a:hover, .nav-links a.active { color: var(--primary-color); }
        .nav-links a.active::after { content: ''; position: absolute; bottom: -22px; left: 0; width: 100%; height: 3px; background: var(--primary-color); }
        .search-box { background: #f3f4f6; padding: 6px 12px; border-radius: 20px; display: flex; align-items: center; }
        .search-box input { border: none; background: transparent; outline: none; font-size: 14px; width: 150px; }
        .search-icon { 
    cursor: pointer; 
    transition: transform 0.2s; 
    user-select: none; /* 防止双击选中图标 */
}
.search-icon:hover { 
    transform: scale(1.2); 
}
        .mobile-menu-btn { display: none; font-size: 24px; cursor: pointer; }

        /* =========================================
           3. 列表页专用样式
           ========================================= */
        .breadcrumb { margin: 24px 0 16px; font-size: 14px; color: var(--text-secondary); }
        .breadcrumb span { margin: 0 8px; color: #d1d5db; }
        .breadcrumb a:hover { color: var(--primary-color); }

        .filter-box {
            background: var(--bg-card);
            padding: 24px;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            margin-bottom: 24px;
        }
        .filter-group { display: flex; align-items: flex-start; margin-bottom: 16px; border-bottom: 1px dashed #f3f4f6; padding-bottom: 16px; }
        .filter-group:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
        .filter-label { font-weight: bold; width: 80px; flex-shrink: 0; color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
        .filter-options { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
        .filter-btn {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 14px;
            color: var(--text-main);
            cursor: pointer;
            transition: all 0.2s;
        }
        .filter-btn:hover { color: var(--primary-color); }
        .filter-btn.active { background: var(--primary-color); color: white; }

        .sort-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            font-size: 14px;
            color: var(--text-secondary);
        }
        .sort-options span { cursor: pointer; margin-right: 20px; position: relative; }
        .sort-options span.active { color: var(--primary-color); font-weight: bold; }
        .sort-options span:hover { color: var(--primary-color); }

        .main-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; margin-bottom: 64px; }
        .guide-list { display: flex; flex-direction: column; gap: 16px; }
        .guide-card {
            background: var(--bg-card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow);
            display: flex; gap: 20px; transition: transform 0.2s; position: relative;
        }
        .guide-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
        .guide-img { width: 200px; height: 125px; border-radius: 6px; background: #e5e7eb; flex-shrink: 0; overflow: hidden; position: relative; }
        .guide-img img { transition: transform 0.3s; width: 100%; height: 100%; }
        .guide-card:hover .guide-img img { transform: scale(1.05); }

        .guide-content { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
        .guide-desc { font-size: 14px; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; line-height: 1.5; }
        
        /* 元数据样式优化 */
        .guide-meta { 
            display: flex; 
            align-items: center; 
            justify-content: space-between; /* 左右分布 */
            margin-top: auto; 
            padding-top: 12px;
            border-top: 1px dashed #f3f4f6; /* 顶部虚线分隔 */
            font-size: 12px;
            color: #9ca3af;
        }
        
        .meta-left { display: flex; align-items: center; gap: 16px; }
        .meta-item { display: flex; align-items: center; gap: 6px; }
        .author-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid #e5e7eb; }
        .meta-icon { width: 14px; height: 14px; fill: currentColor; opacity: 0.8; }
        .comment-count { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #9ca3af; transition: color 0.2s; }
        .comment-count:hover { color: var(--primary-color); }

        .pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
        .page-btn {
            width: 36px; height: 36px;
            display: flex; align-items: center; justify-content: center;
            background: var(--bg-card);
            border-radius: 4px;
            color: var(--text-main);
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
        }
        .page-btn:hover { color: var(--primary-color); border: 1px solid var(--primary-color); }
        .page-btn.active { background: var(--primary-color); color: white; }
        .page-btn.disabled { opacity: 0.5; cursor: not-allowed; }

        /* =========================================
           4. 侧边栏复用 (Sidebar) & 游戏推荐样式
           ========================================= */
        .sidebar-widget { background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
        .widget-title { font-size: 16px; font-weight: bold; margin-bottom: 16px; border-left: 4px solid var(--primary-color); padding-left: 10px; }
        
        /* [新增] 侧边栏游戏推荐列表样式 */
        .mini-game-list { display: flex; flex-direction: column; gap: 16px; }
        .mini-game-item { display: flex; align-items: center; justify-content: space-between; }
        .mini-game-info { display: flex; align-items: center; gap: 12px; }
        .mini-game-icon { width: 48px; height: 48px; border-radius: 10px; background: #e5e7eb; flex-shrink: 0; }
        .mini-game-text { display: flex; flex-direction: column; }
        .mini-game-text h5 { font-size: 14px; font-weight: bold; line-height: 1.2; margin-bottom: 2px; color: var(--text-main); }
        .mini-game-text span { font-size: 12px; color: var(--text-secondary); }
        .mini-dl-btn {
            background: #f3f4f6; color: var(--text-main);
            font-size: 12px; padding: 6px 14px; border-radius: 20px;
            font-weight: bold; flex-shrink: 0; transition: all 0.2s;
        }
        .mini-dl-btn:hover { background: var(--primary-color); color: white; }

        .tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
        .cloud-item { 
            font-size: 13px; background: #f3f4f6; color: #4b5563; padding: 4px 10px; border-radius: 20px; transition: 0.2s;
        }
        .cloud-item:hover { background: #e0f2fe; color: var(--primary-color); }

       /* 1. 给列表容器加上宽度限制和隐藏溢出，防止撑开侧边栏 */
.rank-list {
    width: 100%;
    overflow: hidden; 
}

/* 2. 列表项：强制宽度为 100%，确保不跟随内容变宽 */
.rank-list li { 
    display: flex; 
    align-items: center; 
    padding: 10px 0; 
    border-bottom: 1px solid #f3f4f6; 
    width: 100%; /* 关键 */
    box-sizing: border-box;
}

.rank-num { 
    width: 20px; 
    height: 20px; 
    background: #9ca3af; 
    color: white; 
    font-size: 12px; 
    text-align: center; 
    line-height: 20px; 
    border-radius: 4px; 
    margin-right: 10px; 
    flex-shrink: 0; /* 禁止排名数字被压缩 */
}

/* 3. 标题：使用 width: 0 彻底忽略文字本身长度 */
.rank-title { 
    font-size: 14px; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    
    flex: 1; 
    width: 0;       /* 【核心修复】强制基准宽度为0，完全由flex-grow控制 */
    display: block; /* 确保作为块级元素处理 */
}

/* 颜色保持不变 */
.rank-list li:nth-child(1) .rank-num { background: #ef4444; }
.rank-list li:nth-child(2) .rank-num { background: #f97316; }
.rank-list li:nth-child(3) .rank-num { background: #eab308; }
.rank-title:hover { color: var(--primary-color); text-decoration: underline; }

        footer { background-color: #111827; color: #9ca3af; padding: 40px 0 20px; margin-top: auto; }
        .footer-bottom { text-align: center; font-size: 13px; }

        @media (max-width: 768px) {
            .nav-links, .search-box { display: none; }
            .mobile-menu-btn { display: block; }
            .main-layout { grid-template-columns: 1fr; }
            .guide-card { flex-direction: column; }
            .guide-img { width: 100%; height: 180px; }
            .filter-label { width: 100%; margin-bottom: 8px; }
            .filter-group { flex-direction: column; }
        }