 /* =========================================
           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; }
        a:hover { color: var(--primary-color); }
        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; }

        /* 顶部导航 */
        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; }

        /* =========================================
           2. 详情页布局
           ========================================= */
        .breadcrumb { margin: 20px 0; font-size: 13px; color: var(--text-secondary); }
        .breadcrumb span { margin: 0 8px; color: #d1d5db; }

        .detail-layout {
            display: grid;
            grid-template-columns: 1fr 320px;
            gap: 32px;
            margin-bottom: 64px;
        }

        /* 左侧文章卡片容器 */
        .article-card { background: var(--bg-card); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); margin-bottom: 24px; }

        /* =========================================
           [重写] 3. 文章头部样式 (Article Header)
           =========================================
        */
        .article-header {
            display: block; /* 强制块级 */
            border-bottom: 1px solid #e5e7eb;
            padding-bottom: 24px;
            margin-bottom: 32px;
        }

        /* 1. 标签行 */
        .header-tags {
            margin-bottom: 16px;
            display: flex;
            gap: 10px;
        }
        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            line-height: 1;
        }
        .badge-blue { background: #eff6ff; color: #3b82f6; }
        .badge-red { background: #fef2f2; color: #ef4444; }

        /* 2. 标题行 */
        .header-title {
            font-size: 30px;      /* 加大字号 */
            font-weight: 800;     /* 加粗 */
            color: #111827;       /* 深黑 */
            line-height: 1.4;     /* 舒适行高 */
            margin: 0 0 16px 0;   /* 下间距 */
            letter-spacing: -0.025em; /* 微调字间距 */
        }

        /* 3. 信息行 */
        .header-meta {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 24px;            /* 信息之间的间距 */
            font-size: 14px;
            color: #6b7280;
        }
        .meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .meta-icon { opacity: 0.6; font-size: 16px; }


        /* --- 正文样式 --- */
        .article-content { font-size: 16px; line-height: 1.8; color: #374151; }
        .article-content p { margin-bottom: 20px; text-align: justify; }
        .article-content h2 { font-size: 20px; font-weight: bold; margin: 32px 0 16px; border-left: 4px solid var(--primary-color); padding-left: 12px; color: #111827; }
        .article-content h3 { font-size: 18px; font-weight: bold; margin: 24px 0 12px; color: #1f2937; }
        .article-content img { border-radius: 8px; margin: 20px 0; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
        .article-content blockquote { background: #f9fafb; border-left: 4px solid #d1d5db; padding: 16px; margin: 20px 0; color: #4b5563; font-style: italic; }

        /* 底部互动 */
        .article-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid #f3f4f6; }
        .share-bar { display: flex; gap: 12px; margin-bottom: 30px; }
        .btn-action { padding: 8px 16px; border: 1px solid #e5e7eb; border-radius: 20px; font-size: 14px; cursor: pointer; background: white; transition: all 0.2s; }
        .btn-action:hover { border-color: var(--primary-color); color: var(--primary-color); }

        /* 下方相关文章 */
        .related-section { margin-top: 0; }
        .related-title { font-size: 18px; font-weight: bold; margin-bottom: 16px; padding-left: 10px; border-left: 4px solid var(--primary-color); }
        .related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .related-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; gap: 12px; padding: 12px; transition: transform 0.2s; }
        .related-card:hover { transform: translateY(-2px); }
        .related-img { width: 100px; height: 70px; border-radius: 4px; background: #e5e7eb; flex-shrink: 0; }
        .related-info { display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
        .related-text { font-size: 14px; font-weight: bold; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .related-date { font-size: 12px; color: var(--text-secondary); }

        /* --- 右侧边栏区域 --- */
        .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; }

        /* 1. 当前游戏下载 */
        .current-game-card { text-align: center; }
        .cg-icon { width: 80px; height: 80px; border-radius: 16px; margin: 0 auto 12px; background: #3b82f6; display: block; }
        .cg-name { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
        .cg-btn { display: block; width: 100%; background: var(--primary-color); color: white; padding: 12px; border-radius: 8px; font-weight: bold; margin-bottom: 8px; }
        .cg-btn:hover { background: var(--primary-hover); }

        /* 2. 侧边栏推荐文章 (纯文字列表) */
        .side-article-list { display: flex; flex-direction: column; gap: 12px; }
        .side-article-item { display: flex; gap: 10px; align-items: flex-start; }
        .side-index { 
            background: #f3f4f6; color: #6b7280; font-size: 12px; 
            width: 18px; height: 18px; border-radius: 4px; 
            display: flex; align-items: center; justify-content: center; 
            flex-shrink: 0; margin-top: 3px;
        }
        .side-article-item:nth-child(1) .side-index { background: #fee2e2; color: #dc2626; }
        .side-article-item:nth-child(2) .side-index { background: #ffedd5; color: #ea580c; }
        .side-article-item:nth-child(3) .side-index { background: #fef9c3; color: #ca8a04; }
        .side-article-link { font-size: 14px; line-height: 1.5; color: #374151; }
        .side-article-link:hover { color: var(--primary-color); text-decoration: underline; }

        /* 3. 推荐游戏下载 (图标模式) */
        .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: #ddd; flex-shrink: 0; }
        .mini-game-text h5 { font-size: 14px; font-weight: bold; line-height: 1.2; margin-bottom: 2px; }
        .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; }
        .mini-dl-btn:hover { background: #e5e7eb; color: var(--primary-color); }

        .sticky-wrapper { position: sticky; top: 80px; }

        footer { background-color: #111827; color: #9ca3af; padding: 40px 0; margin-top: 64px; text-align: center; font-size: 14px; }

        @media (max-width: 768px) {
            .nav-links, .search-box { display: none; }
            .mobile-menu-btn { display: block; }
            .detail-layout { grid-template-columns: 1fr; }
            .article-card { padding: 20px; }
            .related-grid { grid-template-columns: 1fr; }
            .sticky-wrapper { position: static; }
        }
        
        
        /* 图片画廊容器 */
.inserted-gallery {
    margin: 15px 0;
    display: grid;
    gap: 10px;
    width: 100%;
}

/* 1张图：全宽 */
.inserted-gallery.count-1 {
    grid-template-columns: 1fr;
}

/* 2张图：左右各一半 */
.inserted-gallery.count-2 {
    grid-template-columns: 1fr 1fr;
}

/* 3张图：左边一张大图，右边两张小图（示例） */
.inserted-gallery.count-3 {
    grid-template-columns: 2fr 1fr;
    /* 或者简单的平分: grid-template-columns: 1fr 1fr 1fr; */
}

/* 4张及以上：自动网格 */
.inserted-gallery {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.inserted-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证多图并排时高度一致 */
    border-radius: 5px;
}