/**
 * 文章列表页专属样式
 * 结合搜索页视觉风格，保留文章页独特功能
 */

/* 面包屑导航 */
.article-breadcrumb {
    background: #F5F7FA;
    margin: 0 60px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
}

.article-breadcrumb ol {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-breadcrumb li {
    display: flex;
    align-items: center;
}

.article-breadcrumb li a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748B;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.article-breadcrumb li a:hover {
    color: #5B5FC7;
}

.article-breadcrumb li a i {
    font-size: 14px;
}

.article-breadcrumb li span {
    color: #1F2937;
    font-size: 14px;
}

.article-breadcrumb .separator {
    padding: 0 10px;
    color: #CBD5E1;
    font-size: 12px;
}

/* 文章页区块 - 灰色背景 */
.article-page-block {
    background: #F5F7FA;
    border-radius: 16px;
    margin: 20px 60px;
    padding: 24px;
}

.article-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.article-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.article-page-title i {
    color: #5B5FC7;
    font-size: 18px;
}

.article-page-body {
    padding: 0;
}

/* 搜索框 */
.article-search-mini {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.article-search-mini input {
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 14px;
    color: #1E293B;
    width: 200px;
    outline: none;
}

.article-search-mini input::placeholder {
    color: #94A3B8;
}

.article-search-mini button {
    background: #5B5FC7;
    border: none;
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.article-search-mini button:hover {
    background: #4B4FB7;
}

/* 分类筛选标签 */
.category-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tab {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    color: #475569;
    background: #F1F5F9;
    text-decoration: none;
    transition: all 0.2s;
}

.filter-tab:hover {
    background: #E2E8F0;
    color: #1E293B;
}

.filter-tab.active {
    background: #5B5FC7;
    color: #FFFFFF;
}

/* 搜索提示条 */
.search-tip-bar {
    margin: 0 60px 16px;
    padding: 12px 20px;
    background: #FEF3C7;
    border-radius: 8px;
    font-size: 14px;
    color: #92400E;
}

.search-tip-bar strong {
    color: #B45309;
}

/* 广告区块 */
.article-ad-block {
    margin: 0 60px 20px;
    border-radius: 12px;
    overflow: hidden;
}

.article-ad-block img {
    width: 100%;
    display: block;
}

/* 主布局：文章列表 + 侧边栏 - 灰色背景 */
.article-main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    margin: 0 60px 24px;
    background: #F5F7FA;
    border-radius: 16px;
    padding: 24px;
}

/* 文章列表区 - 白色卡片 */
.article-list-section {
    min-width: 0;
}

.article-list-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 文章卡片 */
.article-item-card {
    display: flex;
    gap: 20px;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
}

.article-item-card:hover {
    box-shadow: 0 4px 12px rgba(91, 95, 199, 0.15);
    transform: translateY(-2px);
}

.item-cover {
    flex-shrink: 0;
    width: 200px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
}

.item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-item-card:hover .item-cover img {
    transform: scale(1.05);
}

.item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #64748B;
}

.badge-top,
.badge-recommend {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-top {
    background: #FEE2E2;
    color: #DC2626;
}

.badge-recommend {
    background: #FEF3C7;
    color: #D97706;
}

.meta-category {
    color: #5B5FC7;
    text-decoration: none;
}

.meta-category:hover {
    text-decoration: underline;
}

.item-title {
    font-size: 17px;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.item-title a {
    color: inherit;
    text-decoration: none;
}

.item-title a:hover {
    color: #5B5FC7;
}

.item-summary {
    font-size: 14px;
    color: #64748B;
    line-height: 1.6;
    margin: 0 0 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    font-size: 13px;
    color: #94A3B8;
}

.stat-views i {
    margin-right: 4px;
}

.item-tags {
    display: flex;
    gap: 8px;
}

.tag-link {
    padding: 2px 10px;
    background: #F1F5F9;
    border-radius: 12px;
    font-size: 12px;
    color: #64748B;
    text-decoration: none;
}

.tag-link:hover {
    background: #E2E8F0;
    color: #475569;
}

/* 分页 */
.article-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 20px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #5B5FC7;
    border-color: #5B5FC7;
    color: #FFFFFF;
}

.page-text {
    font-size: 14px;
    color: #64748B;
}

/* 空状态 */
.article-empty-block {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.article-empty-block i {
    font-size: 48px;
    color: #CBD5E1;
    margin-bottom: 16px;
}

.article-empty-block h3 {
    font-size: 18px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 8px 0;
}

.article-empty-block p {
    font-size: 14px;
    color: #94A3B8;
    margin: 0;
}

/* 侧边栏 */
.article-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 侧边栏广告 */
.sidebar-card.sidebar-ad {
    padding: 0;
}

.sidebar-card.sidebar-ad a {
    display: block;
}

.sidebar-card.sidebar-ad img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.sidebar-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #F3F4F6;
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
}

.sidebar-card-header i {
    color: #5B5FC7;
    margin-right: 8px;
}

.sidebar-card-body {
    padding: 16px 20px;
}

/* 侧边栏搜索框 */
.sidebar-search-form {
    display: flex;
    background: #F5F7FA;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 14px;
    font-size: 14px;
    color: #1E293B;
    outline: none;
}

.sidebar-search-form input::placeholder {
    color: #94A3B8;
}

.sidebar-search-form button {
    background: #5B5FC7;
    border: none;
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-search-form button:hover {
    background: #4B4FB7;
}

/* 推荐列表 */
.recommend-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recommend-list li {
    margin-bottom: 12px;
}

.recommend-list li:last-child {
    margin-bottom: 0;
}

.recommend-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    transition: color 0.2s;
}

.recommend-list a:hover {
    color: #5B5FC7;
}

.recommend-list img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.recommend-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cloud-tag {
    padding: 6px 14px;
    background: #F1F5F9;
    border-radius: 16px;
    font-size: 13px;
    color: #64748B;
    text-decoration: none;
    transition: all 0.2s;
}

.cloud-tag:hover {
    background: #5B5FC7;
    color: #FFFFFF;
}

/* 侧边栏广告 */
.sidebar-ad img {
    width: 100%;
    display: block;
}

/* 响应式 */
@media (max-width: 1100px) {
    .article-main-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar-section {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-card {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .article-page-block,
    .article-main-layout,
    .search-tip-bar,
    .article-ad-block {
        margin-left: 16px;
        margin-right: 16px;
    }
    
    .article-page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .article-search-mini input {
        width: 140px;
    }
    
    .article-item-card {
        flex-direction: column;
    }
    
    .item-cover {
        width: 100%;
        height: 180px;
    }
    
    .sidebar-card {
        min-width: 100%;
    }
}

/* ==================== 暗黑主题 ==================== */
body.dark-theme .article-breadcrumb {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme .article-breadcrumb li a {
    color: #888;
}

body.dark-theme .article-breadcrumb li a:hover {
    color: #ccc;
}

body.dark-theme .article-breadcrumb li span {
    color: #ccc;
}

body.dark-theme .article-breadcrumb .separator {
    color: #555;
}

body.dark-theme .article-page-block {
    background: rgba(255, 255, 255, 0.02);
}

/* 文章列表布局暗色 */
body.dark-theme .article-main-layout {
    background: rgba(255, 255, 255, 0.02);
}

body.dark-theme .article-list-block {
    background: transparent;
}

body.dark-theme .article-page-title {
    color: #e0e0e0;
}

body.dark-theme .article-page-title i {
    color: #888;
}

/* 分类筛选暗色 */
body.dark-theme .filter-tab {
    background: rgba(255, 255, 255, 0.06);
    color: #888;
}

body.dark-theme .filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

body.dark-theme .filter-tab.active {
    background: #555;
    color: #fff;
}

body.dark-theme .article-search-mini {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-theme .article-search-mini input {
    background: transparent;
    color: #ccc;
}

body.dark-theme .article-search-mini input::placeholder {
    color: #666;
}

body.dark-theme .article-search-mini button {
    background: #555;
    color: #aaa;
}

/* 文章卡片暗色 */
body.dark-theme .article-item-card {
    background: #252525;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .article-item-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-theme .item-category {
    background: rgba(255, 255, 255, 0.06);
    color: #888;
}

body.dark-theme .item-title {
    color: #e0e0e0;
}

body.dark-theme .item-excerpt {
    color: #888;
}

body.dark-theme .item-meta span {
    color: #666;
}

body.dark-theme .meta-category {
    color: #888;
}

body.dark-theme .meta-category:hover {
    color: #aaa;
}

/* 侧边栏暗色 */
body.dark-theme .sidebar-card {
    background: #252525;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .sidebar-card-header {
    color: #e0e0e0;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .sidebar-card-header i {
    color: #888;
}

body.dark-theme .sidebar-search-form {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-theme .sidebar-search-form input {
    color: #ccc;
}

body.dark-theme .sidebar-search-form input::placeholder {
    color: #666;
}

body.dark-theme .sidebar-search-form button {
    background: #555;
}

body.dark-theme .sidebar-search-form button:hover {
    background: #666;
}

body.dark-theme .recommend-list a {
    color: #aaa;
}

body.dark-theme .recommend-list a:hover {
    color: #ccc;
}

body.dark-theme .sidebar-title {
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .sidebar-item {
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .sidebar-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme .sidebar-item-title {
    color: #ccc;
}

body.dark-theme .sidebar-item-meta {
    color: #666;
}

/* 分页暗色 */
body.dark-theme .pagination-wrap {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme .pagination a,
body.dark-theme .pagination span {
    background: rgba(255, 255, 255, 0.06);
    color: #888;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .pagination a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

body.dark-theme .pagination .current {
    background: #555;
    color: #fff;
}

/* 搜索提示暗色 */
body.dark-theme .search-tip-bar {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme .search-tip-bar strong {
    color: #ccc;
}

/* 广告位暗色 */
body.dark-theme .article-ad-block {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

/* 标签暗色 */
body.dark-theme .tag-link {
    background: rgba(255, 255, 255, 0.06);
    color: #888;
}

body.dark-theme .tag-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

/* 空状态暗色 */
body.dark-theme .article-empty-block {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme .article-empty-block i {
    color: #555;
}

body.dark-theme .article-empty-block h3 {
    color: #aaa;
}

body.dark-theme .article-empty-block p {
    color: #666;
}
