/* =========================================================
   photowall.css — 照片墙（按日期分组）
   依赖：style.css
   ========================================================= */

.photowall-main {
    position: relative;
    z-index: 10;
    max-width: 100%;
    margin: 0 auto;
    padding: 130px 60px 80px;
}

.photowall-main h1 {
    font-size: 38px;
    font-weight: 300;
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.photowall-main .subtitle {
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 2px;
    margin-bottom: 60px;
}

/* ===== 照片墙容器 ===== */
.photowall-grid {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ===== 日期分组 ===== */
.photo-group {
    width: 100%;
}

.photo-group-date {
    font-size: 22px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* ===== 网格：桌面 4 张 ===== */
.photo-group-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* ===== 单张照片 ===== */
.photo-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: border-color 0.3s;

    /* 滚动优化：屏幕外不渲染 */
    content-visibility: auto;
    contain-intrinsic-size: 200px 200px;
}

.photo-item:hover {
    border-color: rgba(255, 204, 0, 0.5);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
    opacity: 0;
}

.photo-item img.loaded {
    opacity: 1;
}

/* ===== 空状态 ===== */
.photowall-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
    letter-spacing: 1px;
}

/* ===== 大图预览层 ===== */
.photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    cursor: zoom-out;
}

.photo-lightbox.show {
    opacity: 1;
    visibility: visible;
}

.photo-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.photo-lightbox.show img {
    transform: scale(1);
}

/* ===== 手机适配：3 张 ===== */
@media (max-width: 1024px) {
    .photowall-main {
        padding: 100px 16px 60px;
    }

    .photowall-main h1 {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .photowall-main .subtitle {
        margin-bottom: 40px;
    }

    .photo-group-date {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .photo-group-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .photo-item {
        border-radius: 6px;
        contain-intrinsic-size: 100px 100px;
    }
}