/* 相册详情页样式 */

.album-header {
    text-align: center;
    padding: 40px 20px 30px;
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #ff6b6b;
}

.album-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Noto Serif SC', serif;
}

.album-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* 瀑布流容器 */
.waterfall-container {
    column-count: 4;
    column-gap: 15px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.waterfall-item {
    break-inside: avoid;
    margin-bottom: 15px;
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.image-item,
.video-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
    transition: transform 0.3s;
}

.image-item:hover,
.video-item:hover {
    transform: translateY(-3px);
}

.image-item img,
.video-item video {
    width: 100%;
    display: block;
    transition: transform 0.3s;
}

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

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.video-item:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.video-overlay i {
    font-size: 3rem;
    color: #fff;
    opacity: 0.9;
    transition: transform 0.3s;
}

.video-item:hover .video-overlay i {
    transform: scale(1.1);
}

.item-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-item:hover .item-description,
.video-item:hover .item-description {
    opacity: 1;
}

/* 视频模态框 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
}

.video-modal-close:hover {
    color: #ff6b6b;
}

.video-modal-content {
    width: 90%;
    max-width: 1000px;
}

.video-modal-content video {
    width: 100%;
    border-radius: 8px;
}

/* 懒加载占位 */
.waterfall-item img[data-src] {
    min-height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

/* Viewer.js 自定义样式 */
.viewer-backdrop {
    background-color: rgba(0, 0, 0, 0.95) !important;
}

.viewer-navbar {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.viewer-toolbar {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* 响应式 */
@media screen and (max-width: 1200px) {
    .waterfall-container {
        column-count: 3;
    }
}

@media screen and (max-width: 768px) {
    .waterfall-container {
        column-count: 2;
        column-gap: 10px;
        padding: 10px;
    }
    
    .waterfall-item {
        margin-bottom: 10px;
    }
    
    .album-title {
        font-size: 1.5rem;
    }
    
    .item-description {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .waterfall-container {
        column-count: 1;
    }
}
