/* 相关文章瀑布流样式 */
.related-posts-section {
    margin-top: 30px;
    margin-bottom: 30px;
}

/* 相关文章使用与.apk_left_title一致的标题样式 */

.related-posts-waterfall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.related-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.related-post-thumb {
    width: 60px;
    height: 60px;
    display: block;
    flex-shrink: 0;
    box-shadow: none;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.related-post-thumb.loaded {
    opacity: 1;
}

.related-post-thumb.skeleton-img.loaded {
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.related-post-item {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 12px;
}

.related-post-content {
    padding: 0;
    flex: 1;
}

.related-post-title {
    margin-bottom: 4px;
}

.related-post-content {
    padding: 15px;
}

.related-post-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-title a {
    color: inherit;
    text-decoration: none;
}

.related-post-title a:hover {
    color: #007bff;
}

.related-post-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.related-post-category {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #999;
}

.loading-indicator .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.end-message {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #ff6b6b;
}

/* 骨架屏加载样式 */
.related-post-item.skeleton .related-post-thumb {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.related-post-item.skeleton .related-post-title {
    height: 20px;
    background: #f0f0f0;
    border-radius: 4px;
}

.related-post-item.skeleton .related-post-meta span {
    display: inline-block;
    height: 14px;
    background: #f0f0f0;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 响应式调整 */
@media (max-width: 703px) and (min-width: 448px) {
    .related-post-thumb {
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 448px) {
    .related-post-thumb {
        width: 45px !important;
        height: 45px !important;
    }
    .related-post-title {
        font-size: 12px !important;
    }
    .related-post-meta {
        font-size: 11px !important;
    }
}
