/**
 * 列表页专用样式 — 龙城传奇风格
 * 完整版 + 容器宽度限制
 */

/* ===== 全局重置 & 容器 ===== */
* {
    box-sizing: border-box;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== 页面头部 ===== */
.page-header {
    margin: 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text, #222);
}

/* ===== 面包屑 ===== */
.breadcrumb {
    font-size: 0.78rem;
    color: var(--color-text-muted, #888);
}

.breadcrumb a {
    color: var(--color-text-muted, #888);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--color-primary, #c0392b);
}

.breadcrumb span {
    margin: 0 5px;
    color: #b0bccd;
}

/* ===== 页面标题区域 ===== */
.page-hero {
    margin: 16px 0 20px;
}

.page-hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text, #222);
    margin: 0 0 6px 0;
}

.page-hero p {
    font-size: 0.88rem;
    color: var(--color-text-muted, #888);
    margin: 0;
}

/* ===== 内容两栏布局 ===== */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    margin: 16px 0 32px;
}

/* ===== 筛选栏 ===== */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

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

.filter-tabs a {
    font-size: 0.82rem;
    padding: 4px 14px;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 20px;
    color: var(--color-text-secondary, #555);
    background: var(--color-surface, #fff);
    transition: 0.15s;
    text-decoration: none;
}

.filter-tabs a:hover,
.filter-tabs a.active {
    border-color: var(--color-primary, #c0392b);
    color: var(--color-primary, #c0392b);
    background: var(--color-primary-soft, rgba(192, 57, 43, 0.08));
}

/* ===== 文章列表容器 ===== */
.article-list-wrap {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    padding: 4px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ===== 文章列表 ===== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ===== 单篇文章项 ===== */
.article-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: padding-left 0.15s;
    align-items: flex-start;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item:hover {
    padding-left: 6px;
}

/* ===== 文章主体内容 ===== */
.item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* ===== 标签区域 ===== */
.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.item-tag {
    font-size: 0.68rem;
    padding: 1px 10px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-block;
}

.tag-base {
    background: rgba(46, 204, 113, 0.12);
    color: #27ae60;
}

.tag-adv {
    background: rgba(255, 129, 86, 0.12);
    color: #ff8156;
}

.tag-default {
    background: rgba(192, 57, 43, 0.08);
    color: #c0392b;
}

/* ===== 文章标题 ===== */
.item-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    text-decoration: none;
}

.item-title:hover {
    color: #c0392b;
}

/* ===== 文章摘要 ===== */
.item-excerpt {
    font-size: 0.8rem;
    color: #888;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    margin: 0;
}

/* ===== 文章元信息 ===== */
.item-meta {
    font-size: 0.72rem;
    color: #888;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* ===== 右侧箭头 ===== */
.item-arrow {
    flex-shrink: 0;
    color: #bbb;
    font-size: 1.2rem;
    align-self: center;
    transition: transform 0.2s, color 0.2s;
}

.article-item:hover .item-arrow {
    transform: translateX(4px);
    color: #c0392b;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    font-size: 0.82rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #555;
    background: #fff;
    transition: 0.15s;
    text-decoration: none;
}

.pagination a:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.pagination .current,
.pagination a.current {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

.pagination .dots {
    border: none;
    background: transparent;
}

.pagination .prev,
.pagination .next {
    padding: 0 12px;
}

/* ===== 空状态 ===== */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #888;
}

.empty-state p {
    margin: 6px 0;
}

.empty-state a {
    color: #c0392b;
    text-decoration: underline;
}

.empty-state a:hover {
    color: #e74c3c;
}

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

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    .filter-tabs a {
        white-space: nowrap;
        font-size: 0.78rem;
        padding: 3px 12px;
    }
    .article-list-wrap {
        padding: 0 12px;
    }
    .article-item {
        flex-direction: column;
        gap: 6px;
    }
    .item-arrow {
        align-self: flex-end;
    }
    .page-hero h1 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .content-layout {
        margin: 12px 0 20px;
    }
    .article-item {
        padding: 12px 0;
    }
    .item-title {
        font-size: 0.88rem;
    }
    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    .article-list-wrap {
        padding: 0 8px;
    }
}