/* 分类导航 */
.category-nav {
    margin: 30px 0;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 10px 25px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-tab a {
    color: #fff;
    text-decoration: none;
}

/* 文章列表页 */
.articles-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2.1fr);
    gap: 24px;
    margin: 30px 0 50px;
}

.articles-list-page {
    margin: 0;
    background: rgba(20, 20, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.page-title {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: left;
    color: #fff;
}

.article-list-page {
    list-style: none;
}

.article-item-page {
    margin-bottom: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.article-item-page:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(10px);
}

.article-item-page a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.article-title-page {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.article-meta-page {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
    flex-wrap: nowrap;
    align-items: center;
    overflow: hidden;
}

.article-category-page {
    color: #667eea;
}

.no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 桌面端侧边栏跟随滚动 */
@media (min-width: 993px) {
    .articles-layout {
        align-items: start;
    }
    .sidebar {
        position: sticky;
        top: 110px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: static;
    }
}

.sidebar-widget {
    background: rgba(20, 20, 40, 0.9);
    border-radius: 15px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.widget-title {
    color: #ff3366;
    font-size: 17px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-info p {
    color: #e5e7eb;
    margin-bottom: 12px;
}

.download-btn {
    width: 100%;
    justify-content: center;
}

.qr-code {
    position: relative;
    margin-top: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    text-align: center;
    overflow: hidden;
}

.qr-code img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.qr-code p {
    color: #fff;
    margin-top: 10px;
    font-weight: bold;
}

.qr-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff3366, transparent);
    box-shadow: 0 0 10px #ff3366;
    animation: qrScan 2s infinite linear;
    pointer-events: none;
}

@keyframes qrScan {
    0% { transform: translateY(0); opacity: 0.9; }
    50% { transform: translateY(160px); opacity: 0.6; }
    100% { transform: translateY(0); opacity: 0.9; }
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pagination-jump {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    color: #ccc;
    font-size: 14px;
}

.pagination-jump input {
    width: 64px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #fff;
    outline: none;
}

.page-jump-btn {
    padding: 8px 14px;
    border: none;
    cursor: pointer;
}

@media (max-width: 992px) {
    .articles-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .articles-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    /* 让侧边栏子项参与同级排序，方便穿插到列表前后 */
    .articles-layout .sidebar {
        display: contents;
    }
    /* 顺序：1) 游戏下载 2) 文章列表 3) 客服模块 */
    .sidebar .sidebar-widget.game-info {
        order: 1;
    }
    .articles-layout .articles-list-page {
        order: 2;
    }
    .sidebar .sidebar-widget:not(.game-info) {
        order: 3;
    }
    .article-title-page {
        font-size: 16px;
    }
    
    .article-meta-page {
        flex-direction: row;
        gap: 8px;
        font-size: 12px;
        flex-wrap: nowrap;
        align-items: center;
        overflow: hidden;
    }
}
