/**
 * 栖屿碎片 - V2 轮播画廊样式
 * @author Huameitang
 */

.gallery-section {
    padding: 80px 20px;
    background: #100e17;
    text-align: center;
    overflow: hidden;
}

.gallery-section .section-title {
    font-size: 2.5rem;
    color: #d0b0ff;
    margin-bottom: 15px;
    font-family: 'Noto Sans SC', sans-serif;
}

.gallery-section .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #8e44ad, #3498db);
    margin: 10px auto 40px;
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-image {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    border: 2px solid rgba(208, 176, 255, 0.2);
    transition: transform 0.4s ease, filter 0.4s ease;
    cursor: pointer;
}

.carousel-image.lazy {
    filter: blur(10px);
}

.carousel-image:not(.lazy) {
    filter: blur(0);
}

.carousel-image:hover {
    transform: scale(1.05);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

.carousel-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.pagination-dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightbox-zoom 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes lightbox-zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(208, 176, 255, 0.3);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-download {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #8e44ad;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Noto Sans SC', sans-serif;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-download:hover {
    background: #9b59b6;
}

@media (max-width: 768px) {
    .carousel-image {
        height: 40vh;
    }
    .carousel-button {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    .carousel-button.prev {
        left: 10px;
    }
    .carousel-button.next {
        right: 10px;
    }
}