/* ===== 基础变量 ===== */
:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    --bg-card: #ffffff;
    --bg-hover: #f8f9fa;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* ===== 暗色模式支持 ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-main: #ecf0f1;
        --text-light: #bdc3c7;
        --bg-card: #1e1e2f;
        --bg-hover: #2a2a3e;
        --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
        --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    }
}

/* ===== 卡片式文章样式 ===== */
.post-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* 封面图 */
.post-thumbnail {
    margin: -1.5rem -1.5rem 1rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.03);
}

/* 标题 & 元信息 */
.post-title {
    font-size: 1.4rem;
    margin: 0 0 0.8rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem;
    align-items: center;
}

.meta-separator {
    opacity: 0.5;
}

.post-meta i {
    margin-right: 4px;
    font-size: 0.9em;
}

/* 摘要内容 */
.post-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.post-excerpt p {
    margin: 0;
}

/* 标签 */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--bg-hover);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 操作栏 */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.btn-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}

.btn-read-more:hover {
    gap: 0.6rem;
}

.comment-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 归档标题 */
.archive-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.archive-title {
    margin: 0;
    font-size: 1.3rem;
}

.archive-title em {
    font-style: normal;
    font-weight: 600;
}

.archive-desc {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* 分页 */
.page-navigation {
    margin: 2rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .active span {
    background: var(--primary-color);
    color: #fff;
}

.pagination .prev,
.pagination .next {
    font-weight: 500;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .post-card {
        padding: 1.2rem;
    }
    
    .post-thumbnail img {
        height: 160px;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .post-meta {
        font-size: 0.8rem;
    }
}

/* ===== 动画支持（可选，需引入 animate.css）===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate__fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}