/* =========================================================
   照片库页面样式 gallery.css
   依赖：common.css
   风格：深青绿背景 + 玻璃图片网格 + 发光 Lightbox
   ========================================================= */

/* ===== 顶部面包屑条（统一）===== */
.breadcrumb-bar {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 0;
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}
.breadcrumb-bar .container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.breadcrumb-bar a { color: var(--text-secondary); }
.breadcrumb-bar a:hover { color: var(--primary); }
.breadcrumb-bar svg {
    width: 12px; height: 12px;
    stroke: var(--text-light);
    fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.breadcrumb-bar .current { color: var(--primary); }

/* ===== 页面 Hero ===== */
.page-hero {
    position: relative;
    height: 420px;
    background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-base) 50%, var(--bg-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -30%; right: -15%;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.18) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(20px);
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(20px);
}
.page-hero .hero-bg-pattern {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(74, 222, 128, 0.08) 1.5px, transparent 1.5px),
        radial-gradient(circle at 75% 75%, rgba(34, 211, 238, 0.06) 1.5px, transparent 1.5px);
    background-size: 50px 50px, 70px 70px;
    opacity: 0.6;
}
.page-hero .hero-arc {
    position: absolute;
    width: 120%; height: 120%;
    top: -10%; left: -10%;
    border: 1px solid rgba(74, 222, 128, 0.08);
    border-radius: 50%;
    pointer-events: none;
}
.page-hero-content {
    z-index: 2;
    text-align: center;
    color: var(--white);
}
.page-hero-content .hero-tagline {
    display: inline-block;
    padding: 6px 20px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 30px;
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 24px;
    text-transform: uppercase;
    background: rgba(74, 222, 128, 0.08);
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.2);
}
.page-hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
    text-shadow:
        0 0 40px rgba(74, 222, 128, 0.5),
        0 0 80px rgba(34, 211, 238, 0.2);
}

/* ===== 返回链接（玻璃胶囊）===== */
.back-bar {
    padding: 28px 0 0;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid var(--border-default);
    background: var(--bg-card);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.back-link svg {
    width: 16px; height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s;
}
.back-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
}
.back-link:hover svg { transform: translateX(-4px); }
.Main{
	background: -webkit-linear-gradient(right, #1a693c, #08293f);
	background: -o-linear-gradient(left, #1a693c, #08293f);
	background: -moz-linear-gradient(left, #1a693c, #08293f);
	background: linear-gradient(to left, #1a693c, #08293f);
}
/* ===== 相册标题 + 信息 ===== */
.gallery-header {
    padding: 40px 0;
    position: relative;
}
.gallery-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    padding-left: 22px;
    position: relative;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.25);
}
.gallery-header h2::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 70%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 4px;
    box-shadow: 0 0 14px var(--primary-glow);
}
.gallery-header .info {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 22px;
    flex-wrap: wrap;
}
.gallery-header .info svg {
    width: 16px; height: 16px;
    color: var(--primary);
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}
.gallery-header .info strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}
.gallery-header .info .info-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--text-light);
    opacity: 0.5;
}

/* ===== 照片网格区 ===== */
.gallery-section {
    padding: 0 0 100px;
    position: relative;
    overflow: hidden;
	padding-top: 40px;
}
.gallery-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(74, 222, 128, 0.2) 15%,
        var(--primary) 50%,
        rgba(34, 211, 238, 0.2) 85%,
        transparent 100%);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
    opacity: 0.7;
    z-index: 2;
}
.gallery-section::after {
    content: '';
    position: absolute;
    top: 20%; right: -8%;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.06) 0%, transparent 60%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* ===== 单张照片（玻璃拟态）===== */
.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1/1;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.gallery-item:hover img { transform: scale(1.08); }

/* 双层绿色色调滤镜 */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(8, 52, 58, 0.15) 0%, transparent 50%),
        linear-gradient(to top, rgba(5, 31, 35, 0.4) 0%, transparent 50%);
    transition: opacity 0.3s;
    pointer-events: none;
}
.gallery-item:hover::after {
    background:
        linear-gradient(135deg, rgba(74, 222, 128, 0.12) 0%, transparent 50%),
        linear-gradient(to top, rgba(5, 31, 35, 0.3) 0%, transparent 50%);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: var(--primary);
}

/* 放大图标（绿青渐变 + 发光）*/
.gallery-item .zoom-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition);
    box-shadow: 0 0 24px var(--primary-glow), 0 0 48px rgba(74, 222, 128, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.gallery-item .zoom-icon svg {
    width: 22px; height: 22px;
    stroke: var(--bg-deep);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.gallery-item:hover .zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

/* 图片说明（深色渐变 + 发光）*/
.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px 12px;
    background: linear-gradient(to top,
        rgba(5, 31, 35, 0.95) 0%,
        rgba(5, 31, 35, 0.5) 60%,
        transparent 100%);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}
.gallery-item:hover .caption { opacity: 1; }

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, rgba(5, 31, 35, 0.96), rgba(8, 52, 58, 0.96));
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}
.lightbox.open {
    opacity: 1;
    visibility: visible;
}

/* Lightbox 顶部光带 */
.lightbox::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(74, 222, 128, 0.3) 15%,
        var(--primary) 50%,
        rgba(34, 211, 238, 0.3) 85%,
        transparent 100%);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
}
/* 中心放射光晕 */
.lightbox::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.lb-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.lb-container img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(74, 222, 128, 0.2);
    border: 1px solid var(--border-subtle);
    transition: opacity 0.3s;
}
/* .lb-container img.fading { opacity: 0; } */

/* 左右箭头（玻璃拟态 + 发光）*/
.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition);
    border: 1px solid var(--border-default);
}
.lb-arrow:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 0 24px var(--primary-glow);
    border-color: transparent;
}
.lb-arrow svg {
    width: 24px; height: 24px;
    stroke: var(--white);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s;
}
.lb-arrow:hover svg { stroke: var(--bg-deep); }

.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* 关闭按钮 */
.lb-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition);
    border: 1px solid var(--border-default);
}
.lb-close:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: rotate(90deg);
    box-shadow: 0 0 24px var(--primary-glow);
    border-color: transparent;
}
.lb-close svg {
    width: 20px; height: 20px;
    stroke: var(--white);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transition: stroke 0.3s;
}
.lb-close:hover svg { stroke: var(--bg-deep); }

/* 底部信息 */
.lb-info {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    z-index: 10000;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-default);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}
.lb-info .lb-counter {
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    text-shadow: 0 0 8px var(--primary-glow);
}
.lb-info .lb-info-divider {
    width: 1px;
    height: 14px;
    background: var(--border-default);
}
.lb-info .lb-caption {
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.lb-arrow:active { transform: translateY(-50%) scale(0.92); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .page-hero-content h1 { font-size: 36px; }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .lb-arrow {
        width: 44px; height: 44px;
    }
    .lb-prev { left: 12px; }
    .lb-next { right: 12px; }
    .gallery-header h2 { font-size: 26px; }
}
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .lb-info {
        gap: 10px;
        padding: 8px 14px;
        font-size: 12px;
    }
}