* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.article-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 450px;
    justify-content: space-between;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.article-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.article-title {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
    height: 90px; /* 4行高度 */
    overflow: hidden;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    -webkit-line-clamp: 4;
    -moz-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    font-weight: 600;
}

.article-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    height: 240px; /* 16行高度 */
    overflow: hidden;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    -webkit-line-clamp: 16;
    -moz-line-clamp: 16;
    line-clamp: 16;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
    position: absolute;
    bottom: 90px;
    left: 25px;
    right: 25px;
    margin: 0;
}

.read-more {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease;
    text-decoration: none;
    display: block;
    width: 80%;
    text-align: center;
    margin: 0 auto;
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.read-more:hover {
    transform: translateX(-50%) scale(1.05);
}

/* Footer Styles */
footer, .footer {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 16px;
    margin: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-info {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* Category Sidebar Styles */
.category-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-sidebar h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.category-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.category-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Article Category Classes */
.article-card[data-category="gaming-trends"] .article-image {
    background: linear-gradient(135deg, #8A2BE2, #4B0082);
}

.article-card[data-category="game-guides"] .article-image {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.article-card[data-category="psychology"] .article-image {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.article-card[data-category="mobile-gaming"] .article-image {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.article-card[data-category="game-design"] .article-image {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.article-card[data-category="casual-gaming"] .article-image,
.article-card[data-category="education"] .article-image {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.article-card[data-category="technology"] .article-image {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
}

@media (max-width: 768px) {
    /* 统一的边距容器样式 */
    .container {
        padding: 0;
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* 文章网格布局 */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 0 auto 40px auto;
        max-width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
        justify-items: center;
    }
    
    /* 头部样式 - 左边无间距，右边5px */
    .header {
        margin: 0 5px 20px 0 !important;
        padding: 20px 15px !important;
        text-align: center !important;
        width: calc(100% - 5px) !important;
        max-width: calc(100% - 5px) !important;
        box-sizing: border-box !important;
    }
    
    /* 分类栏样式 - 与头部相同的边距设置 */
    .category-sidebar {
        margin: 0 5px 20px 0 !important;
        padding: 15px !important;
        text-align: center !important;
        width: calc(100% - 5px) !important;
        max-width: calc(100% - 5px) !important;
        box-sizing: border-box !important;
    }
    
    /* 文章卡片样式 - 居中显示 */
    .article-card {
        min-height: 450px;
        padding: 20px;
        margin: 0 auto;
        max-width: calc(100% - 10px);
        width: calc(100% - 10px);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-self: center;
    }
    
    /* 底部样式 - 左边无间距，右边5px */
    footer, .footer {
        margin: 0 5px 0 0 !important;
        padding: 20px !important;
        text-align: center !important;
        width: calc(100% - 5px) !important;
        max-width: calc(100% - 5px) !important;
        box-sizing: border-box !important;
    }
    
    /* 文本元素样式 */
    .page-title {
        font-size: 1.8rem;
        text-align: center;
        margin: 0;
        max-width: 100%;
    }
    
    .page-subtitle {
        text-align: center;
        max-width: calc(100% - 10px);
        margin: 0 5px;
    }
    
    .article-title {
        text-align: center;
        width: 100%;
    }
    
    .article-excerpt {
        height: 240px;
        text-align: center;
        width: 100%;
    }
    
    .article-meta {
        display: flex;
        font-size: 0.8rem;
        width: calc(100% - 40px);
        justify-content: space-between;
        padding: 0 10px;
        box-sizing: border-box;
        position: absolute;
        bottom: 90px;
        left: 20px;
        right: 20px;
        margin: 0;
        align-items: center;
    }
    
    .article-meta span:first-child {
        text-align: left;
        flex: 1;
        max-width: 55%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-right: 5px;
    }
    
    .article-meta span:last-child {
        text-align: right;
        flex: 0 0 auto;
        max-width: 40%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 5px;
        min-width: 0;
    }
    
    .breadcrumb {
        text-align: center;
        justify-content: center;
    }
    
    /* 分类按钮样式 */
    .category-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        justify-items: center;
    }
    
    .category-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
        width: 100%;
        max-width: 140px;
    }
    
    /* 底部链接样式 */
    .footer-links {
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    /* 阅读更多按钮样式 */
    .read-more {
        width: 90%;
        bottom: 25px;
        padding: 12px 30px;
        left: 50%;
        transform: translateX(-50%);
        position: absolute;
    }
}