/* 瀑布流样式 - 与xiaosou主题风格一致 */

/* 瀑布流容器 */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

/* 瀑布流主容器 */
.waterfall-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    /* 添加初始状态，防止布局跳动 */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* 瀑布流容器加载完成状态 */
.waterfall-container.loaded {
    opacity: 1;
}

/* 瀑布流项目 */
.waterfall-item {
    position: absolute;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    /* 初始状态隐藏，防止布局跳动 */
    opacity: 0;
    transform: translateY(20px);
}

/* 瀑布流项目显示状态 */
.waterfall-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* 图片卡片 */
.image-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #f1f1f1;
}

.image-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #e1e1e1;
}

/* 图片样式 */
.waterfall-img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

.image-card:hover .waterfall-img {
    transform: scale(1.02);
}

/* 图片信息覆盖层 */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: all 0.3s ease;
    opacity: 0;
}

.image-card:hover .image-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* 图片信息 */
.image-info {
    text-align: left;
}

.image-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #fff;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.9;
}

.image-date,
.image-views {
    color: #fff;
}

/* 无内容提示 */
.no-content {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

/* 分页样式 */
.gallery-pagination {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #f1f1f1;
}

.page-btn {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 16px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.page-btn:hover {
    border-color: #ccc;
    color: #333;
    background: #f8f9fa;
}

.page-btn.active {
    background: #007bf5;
    border-color: #007bf5;
    color: #fff;
}

.page-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-container {
        padding: 15px;
    }
    
    .waterfall-item {
        margin-bottom: 12px;
    }
    
    .image-card {
        border-radius: 6px;
    }
    
    .image-overlay {
        padding: 15px 12px 12px;
    }
    
    .image-title {
        font-size: 13px;
    }
    
    .image-meta {
        font-size: 11px;
    }
    
    .page-btn {
        padding: 6px 12px;
        font-size: 13px;
        margin: 0 3px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        padding: 10px;
    }
    
    .waterfall-item {
        margin-bottom: 10px;
    }
    
    .image-overlay {
        position: static;
        transform: none;
        opacity: 1;
        background: #f8f9fa;
        color: #333;
        padding: 12px;
    }
    
    .image-title {
        color: #333;
        font-size: 14px;
    }
    
    .image-date,
    .image-views {
        color: #666;
    }
}

/* 加载动画 */
.loading-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #999;
    font-size: 14px;
}

.loading-placeholder::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bf5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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