
/* 动态文章加载样式 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.article-image {
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.article-category {
    background: #f0f5ff;
    color: #2d5bff;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.article-date {
    color: #999;
}

.article-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    line-height: 1.4;
}

.article-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: #2d5bff;
}

.article-preview {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
}

.article-read-time {
    color: #999;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.article-tags .tag {
    background: #f5f5f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.articles-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #2d5bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.articles-error {
    text-align: center;
    padding: 40px;
    background: #fff5f5;
    border-radius: 8px;
    color: #e53e3e;
}

.articles-error button {
    margin-top: 16px;
    padding: 8px 24px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.articles-error button:hover {
    background: #c53030;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-image {
        height: 150px;
    }
    
    .article-content {
        padding: 16px;
    }
    
    .article-title {
        font-size: 16px;
    }
}
