* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #6a5acd;
    --secondary: #9370db;
    --accent: #ff6b6b;
    --dark: #2d2b55;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #e0e0e0;
}

body {
    background-color: #f5f7ff;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.logo span {
    margin-right: 10px;
    font-size: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 5px 15px;
    width: 300px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    width: 100%;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* 主内容区样式 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 30px 0;
}

/* 栏目页样式 */
.category-header {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 40px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: "⚔️";
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 12rem;
    opacity: 0.2;
    transform: rotate(15deg);
}

.category-header h1 {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    position: relative;
}

.category-header h1 span {
    margin-right: 15px;
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-header p {
    max-width: 800px;
    margin-top: 15px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.category-stats {
    display: flex;
    gap: 25px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 30px;
    white-space: nowrap;
}

.breadcrumb {
    display: flex;
    margin-bottom: 20px;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 10px;
    color: var(--gray);
}

/* 文章列表 */
.articles-list {
    margin-bottom: 40px;
}

.article-item {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 25px;
    transition: all 0.3s;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 图片自适应解决方案 */
.article-img {
    flex: 0 0 250px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #9c88ff, #8c7ae6);
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-img:hover img {
    transform: scale(1.05);
}

.article-content {
    flex: 1;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.article-content p {
    color: var(--gray);
    margin-bottom: 15px;
    line-height: 1.7;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 15px;
    flex-wrap: wrap;
}

.article-tags {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tag {
    background: var(--light);
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* 分页自适应解决方案 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0 8px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #333;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 侧边栏样式 */
.sidebar {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
}

.sidebar-widget h3 span {
    margin-right: 10px;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    text-decoration: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.category-list a:hover {
    color: var(--primary);
}

.category-list a span {
    margin-right: 10px;
    font-size: 1.2rem;
}

.popular-games {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.game-tag {
    background: var(--light);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.game-tag:hover {
    background: var(--primary);
    color: white;
    cursor: pointer;
}

/* 热门文章 */
.popular-article {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.popular-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-article .article-img {
    flex: 0 0 80px;
    height: 80px;
}

.popular-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.popular-content .date {
    font-size: 0.85rem;
    color: var(--gray);
}

/* 页脚样式 */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .category-header h1 {
        font-size: 2.2rem;
    }

    .sidebar {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
        flex: 1;
    }

    .mobile-menu-btn {
        display: block;
        order: 2;
        padding: 10px;
    }

    nav {
        order: 4;
        width: 100%;
        margin-top: 20px;
        display: none;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }

    .search-bar {
        order: 3;
        width: calc(100% - 60px);
        margin: 15px 0 0 0;
    }

    .article-item {
        flex-direction: column;
    }

    .article-img {
        width: 100%;
        flex: none;
        height: 200px;
    }

    .category-header {
        padding: 30px 20px;
    }

    .category-header h1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .category-header h1 span {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .category-stats {
        gap: 15px;
    }

    .stat-item {
        font-size: 0.9rem;
    }

    .popular-article .article-img {
        flex: 0 0 60px;
        height: 60px;
    }

    /* 分页在平板上的调整 */
    .pagination {
        gap: 6px;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .category-header {
        padding: 20px 15px;
    }

    .category-header h1 {
        font-size: 1.8rem;
    }

    .category-header p {
        font-size: 1rem;
    }

    .article-meta {
        gap: 10px;
    }

    .article-meta span {
        font-size: 0.85rem;
    }

    .breadcrumb {
        font-size: 0.85rem;
    }

    .search-bar {
        width: 100%;
        margin-top: 10px;
    }

    .mobile-menu-btn {
        padding: 5px;
    }

    .article-img {
        height: 160px;
    }

    .popular-article {
        gap: 10px;
    }

    .popular-article .article-img {
        flex: 0 0 50px;
        height: 50px;
    }

    /* 分页在手机上的调整 */
    .pagination {
        gap: 4px;
        justify-content: flex-start;
    }

    .page-btn {
        min-width: 28px;
        height: 28px;
        font-size: 0.8rem;
        padding: 0 4px;
    }
}

/* 超小屏幕分页优化 */
@media (max-width: 360px) {
    .pagination {
        gap: 3px;
    }

    .page-btn {
        min-width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
}