
/* 涓诲鍣 */
.container {
    width: 990px;
    height: 220px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* 鍥剧墖婊氬姩瀹瑰櫒 */
.gallery-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.gallery {
    display: flex;
    gap: 10px;
    padding: 0 10px;
    height: 100%;
    align-items: center;
    animation: scroll 40s linear infinite;
    will-change: transform;
}

/* 鍥剧墖椤 */
.gallery-item {
    flex-shrink: 0;
    height: 200px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.gallery-item img {
    height: 200px;
    width: auto;
    display: block;
    object-fit: cover;
}

/* 婊氬姩鍔ㄧ敾 */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 寮圭獥鏍峰紡 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.modal-content {
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

/* 寮圭獥鎺у埗鎸夐挳 */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 50px;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* 鍝嶅簲寮忚璁 */
@media (max-width: 1024px) {
    .container {
        width: 100%;
        max-width: 990px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        height: 180px;
    }

    .gallery-item {
        height: 160px;
    }

    .gallery-item img {
        height: 160px;
    }

    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 40px;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
}