.article-list {
    padding: var(--spacing-sm) 0;
}

.article-item {
    display: flex;
    margin-bottom: 15px;
    background: var(--white);
    border-radius: 8px;
    transition: all .3s;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    align-items: flex-start; /* 确保封面图和标题顶部对齐 */
}

.article-item:hover {
    transform: translateY(3px);
    box-shadow: 0 0 25px 5px rgba(0, 0, 0, 0.08);
}

/* 添加图片悬停效果 */
.article-cover img:hover {
    transform: scale(1.05);
}

/* 添加标题悬停效果 */
.article-content h2 a:hover {
    color: var(--primary-color);
}

/* 添加文章摘要上下间距 */
.article-summary {
    margin: 10px 0;
    font-size: 14px;
}

.article-item .article-cover {
    width: 180px;
    height: 120px;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

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

.article-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.article-meta {
    color: var(--text-light);
    font-size: 13px;
}

.article-meta span {
    margin-left: var(--spacing-sm);
}

.article-meta span i {
    margin-right: 3px;
}
.article-content h2 {
    margin: 0; /* 移除标题上下边距，确保与封面顶部对齐 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-content h2 a {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
}

.article-tags .layui-badge-rim {
    font-size: 12px;
    padding: 2px 8px;
    margin-right: 8px;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 4px;
    transition: all .3s ease;
}

.article-tags .layui-badge-rim:hover {
    opacity: 0.8;
}

.article-summary {
    color: var(--text-light);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* 文章排序栏样式 */
.article-sort-bar {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
    border-left: 4px solid #ff4d4f;
}

.sort-item {
    margin-right: 20px;
    color: #666;
    font-size: 14px;
    position: relative;
    padding: 0 2px;
    transition: all 0.3s;
}

.sort-item:hover {
    color: #ff4d4f;
}

.sort-item.active {
    color: #ff4d4f;
    font-weight: bold;
}

.sort-item.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff4d4f;
}

/* 文章元数据项样式 */
.article-meta .meta-item {
    margin-right: 20px; /* PC端间距更大 */
    display: inline-block;
}

.article-meta .meta-item:last-child {
    margin-right: 0;
}

/* 响应式布局调整 */
@media screen and (max-width: 768px) {
    .article-item {
        flex-direction: row; /* 保持水平布局 */
        align-items: flex-start; /* 顶部对齐 */
    }
    
    .article-item .article-cover {
        width: 30%; /* 移动端封面宽度，从35%减小到30% */
        height: 70px; /* 移动端封面高度，从80px减小到70px */
        margin-right: 10px;
        margin-bottom: 0;
    }
    
    .article-content {
        width: 100%; /* 对应增加内容区域宽度 */
    }
    
    /* 移动端隐藏文章描述 */
    .article-summary {
        display: none !important;
    }
    
    /* 移动端标题自动换行 */
    .article-content h2 {
        white-space: normal !important;
    }
    
    .article-content h2 a {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-meta {
        width: 100%;
    }
    
    .article-meta span {
        margin-left: 0;
        margin-right: var(--spacing-sm);
    }
    
    .article-tags {
        width: 100%;
    }
    
    .article-meta .meta-item {
        margin-right: 10px; /* 移动端间距较小 */
    }
    
    /* 文章项悬停效果 */
    .article-item {
        transition: all 0.3s ease;
        border-left: 3px solid transparent;
    }
    
    /* 文章底部布局 */
    .article-footer .layui-row {
        display: flex;
        align-items: center;
    }
    
    /* 右对齐文本 */
    .text-right {
        text-align: right;
    }
    
    /* 确保在移动设备上的响应式布局 */
    @media screen and (max-width: 768px) {
        .article-footer .layui-row {
            flex-direction: column;
            align-items: flex-start;
        }
        
        .article-footer .layui-col-xs6 {
            width: 100%;
            margin-bottom: 5px;
        }
        
        .text-right {
            text-align: left;
        }
    }

    /* 确保在移动设备上的响应式布局 */
    @media screen and (max-width: 450px) {
        .article-meta .views,
        .article-meta .likes {
            display: none !important;
        }
        .article-meta {
            text-align: right;
        }
    }

}