/* 文章列表页面样式 */

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #007bff;
}

.loading p {
    margin: 0;
    font-size: 1rem;
}

/* 错误状态 */
.error {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
}

.error i {
    font-size: 2rem;
    margin-bottom: 15px;
}

.error p {
    margin: 0 0 20px 0;
    font-size: 1rem;
}

.error button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.error button:hover {
    background: #c82333;
}

/* 无文章状态 */
.no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-articles i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ccc;
}

.no-articles p {
    margin: 0;
    font-size: 1rem;
}

/* 分页按钮禁用状态 */
.pagination .page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .page-btn.disabled:hover {
    background: none;
    color: inherit;
}

/* 文章项悬停效果 */
.article-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 搜索框焦点效果 */
.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 分类筛选激活状态 */
.category-list li.active a {
    background: #007bff;
    color: white;
}

.category-list li.active a:hover {
    background: #0056b3;
}

/* 内容布局 */
.content-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

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

.category-filter,
.hot-articles {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-filter h3,
.hot-articles h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-list a:hover {
    background: #f8f9fa;
    color: #1976d2;
    transform: translateX(5px);
}

.category-list li.active a {
    background: linear-gradient(45deg, #1976d2, #2196f3);
    color: white;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.category-list i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.hot-list {
    list-style: none;
}

.hot-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.hot-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hot-list a {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hot-list a:hover {
    color: #1976d2;
}

.hot-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.hot-date {
    font-size: 12px;
    color: #999;
}

/* 文章内容区域 */
.article-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.article-header h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.article-tools {
    display: flex;
    gap: 15px;
}

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

.search-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    width: 250px;
    transition: border-color 0.3s ease;
}

.search-btn {
    background: linear-gradient(45deg, #1976d2, #2196f3);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.article-item {
    padding: 25px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.article-item:hover {
    border-color: #1976d2;
    box-shadow: 0 5px 20px rgba(25, 118, 210, 0.1);
    transform: translateY(-3px);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.article-category {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.article-category.c1 {
    background: linear-gradient(45deg, #d32f2f, #f44336);
}

.article-category.c2 {
    background: linear-gradient(45deg, #1976d2, #2196f3);
}

.article-category.c3 {
    background: linear-gradient(45deg, #ff9800, #ff5722);
}

.article-category.c4 {
    background: linear-gradient(45deg, #4caf50, #8bc34a);
}

.article-category.c5 {
    background: linear-gradient(45deg, #9c27b0, #e91e63);
}

.article-category.c6 {
    background: linear-gradient(45deg, #FF6D00, #FFAB00);
}

.article-date {
    color: #999;
    font-size: 12px;
}

.article-title {
    margin-bottom: 15px;
}

.article-title a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #1976d2;
}

.article-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.article-views {
    color: #999;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 10px;
    background: #f0f0f0;
    color: #666;
    border-radius: 15px;
    font-size: 11px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #1976d2;
    color: white;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-btn:hover {
    border-color: #1976d2;
    color: #1976d2;
    transform: translateY(-2px);
}

.page-btn.active {
    background: linear-gradient(45deg, #1976d2, #2196f3);
    color: white;
    border-color: #1976d2;
}

.page-dots {
    color: #999;
    padding: 10px 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .article-tools {
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 20px;
    }
    
    .article-item {
        padding: 20px;
    }
    
    .article-title a {
        font-size: 16px;
    }
    
    .article-excerpt {
        font-size: 13px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
} 