/* css/articles.css */

.page-title {
    color: #333;
    font-size: 2.2em;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.page-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #EE0000;
    border-radius: 2px;
}

.page-title i {
    color: #EE0000;
    margin-right: 10px;
}

/* 发布文章按钮样式 */
.publish-article-btn-container {
    text-align: center;
    margin-bottom: 40px;
}

.publish-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #EE0000;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 0, 0, 0.2);
}

.publish-article-btn:hover {
    background-color: #cc0000;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(238, 0, 0, 0.3);
}

.publish-article-btn i {
    font-size: 1.2em;
}

/* 合集按钮样式 */
.collections-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #3a3aee;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(58, 58, 238, 0.2);
    margin-left: 15px;
}

.collections-btn:hover {
    background-color: #2a2acc;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(58, 58, 238, 0.3);
    color: white;
}

.collections-btn i {
    font-size: 1.2em;
}

.search-and-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 30px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
}

.search-bar input {
    border: none;
    padding: 12px 20px;
    flex-grow: 1;
    font-size: 1em;
    outline: none;
}

.search-bar button {
    background-color: #EE0000;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #cc0000;
}

.category-filter select {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 30px;
    background-color: white;
    font-size: 1em;
    color: #333;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none; /* 移除默认箭头 */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23EE0000%22%20d%3D%22M287%2C197.8c-3.2%2C3.2-8.3%2C3.2-11.5%2C0L146.2%2C71.3L16.9%2C197.8c-3.2%2C3.2-8.3%2C3.2-11.5%2C0C3.7%2C194.6%2C3.7%2C189.4%2C6.9%2C186.2l134.6-134.6c3.2-3.2%2C8.3-3.2%2C11.5%2C0l134.6%2C134.6C290.2%2C189.4%2C290.2%2C194.6%2C287%2C197.8z%22%2F%3E%3C%2Fsvg%3E'); /* 自定义箭头 */
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    padding-right: 40px; /* 留出箭头空间 */
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background-color: #fefefe;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(238, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: bold;
    z-index: 1;
}

.article-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

.article-excerpt {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制行数 */
    -webkit-box-orient: vertical;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 0.85em;
    padding-top: 15px;
    border-top: 1px dashed #f0f0f0;
    margin-top: auto; /* 推到底部 */
}

.article-author, .article-date, .article-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-author i, .article-date i, .article-views i {
    color: #EE0000;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.page-link {
    display: block;
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover:not(.disabled), .page-link.active {
    background-color: #EE0000;
    color: white;
    border-color: #EE0000;
    box-shadow: 0 4px 10px rgba(238, 0, 0, 0.2);
}

.page-link.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    color: #999;
    font-size: 1.2em;
    padding: 50px 0;
    grid-column: 1 / -1; /* 跨越所有列 */
}

@media (max-width: 768px) {
    .search-and-filter {
        flex-direction: column;
        gap: 15px;
    }

    .search-bar, .category-filter select {
        max-width: 100%;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-thumbnail {
        height: 180px;
    }
} 