/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 - 1486px宽度 */
.container {
    max-width: 1486px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */


.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    width: 300px;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-btn {
    padding: 12px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* 筛选导航 */
.filter-nav {
    padding: 20px 40px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.article-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.article-title-link:hover {
    color: #fdfdfd;
}

.article-title-link h3 {
    transition: color 0.3s ease;
}

.article-title-link:hover h3 {
    color: #fdfdfd;
}

.article-title-link p {
    transition: color 0.3s ease;
}

.sort-select {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: #667eea;
}

/* 主要内容区域 */
.main-content {
    padding: 40px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 265px);
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
}

/* 专题项目样式 */
.topic-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    width: 265px;
    height: 150px;
    position: relative;
}

.topic-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: auto;
    min-height: 150px;
    z-index: 10;
}

.topic-image {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.topic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.topic-item:hover .topic-image img {
    transform: scale(1.05);
}

.topic-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b6b;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
}

.topic-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    transform: translateY(100%);
    transition: all 0.3s ease;
    opacity: 0;
}

.topic-item:hover .topic-info {
    transform: translateY(0);
    opacity: 1;
}

.topic-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-item:hover .topic-title {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}

.topic-desc {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 0;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.topic-item:hover .topic-desc {
    -webkit-line-clamp: unset;
    max-height: 80px;
    opacity: 1;
    margin-bottom: 12px;
}



/* 分页样式 */


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: #667eea;
    color: #667eea;
}

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 1486px) {
    .container {
        margin: 0;
        max-width: 100%;
        box-shadow: none;
    }
    
    .topic-grid {
        grid-template-columns: repeat(auto-fit, 265px);
    }
}

@media (max-width: 1200px) {
    .topic-grid {
        grid-template-columns: repeat(auto-fit, 265px);
    }
}

@media (max-width: 900px) {
    .topic-grid {
        grid-template-columns: repeat(auto-fit, 265px);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .filter-nav {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .topic-grid {
        grid-template-columns: repeat(auto-fit, 265px);
        gap: 15px;
    }
    
    .topic-item {
        width: 265px;
        margin: 0 auto;
    }
    
    .topic-info {
        padding: 15px;
    }
    
    .footer {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .topic-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .topic-item {
        width: 100%;
        max-width: 300px;
        height: 150px;
    }
    
    .topic-image {
        height: 150px;
    }
    
    .topic-info {
        padding: 15px;
    }
    
    .topic-title {
        font-size: 0.9rem;
    }
    
    .topic-desc {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .topic-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .topic-item {
        max-width: 280px;
        height: 150px;
    }
    
    .topic-image {
        height: 150px;
    }
    
    .topic-info {
        padding: 12px;
    }
    
    .topic-title {
        font-size: 0.85rem;
    }
    
    .topic-desc {
        font-size: 0.7rem;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        padding: 8px 12px;
        min-width: 40px;
        font-size: 0.8rem;
    }
}