/* 图片弹窗样式 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    border: none;
}

.image-modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-modal-prev {
    left: 20px;
}

.image-modal-next {
    right: 20px;
}

.image-modal-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* 可点击图片的样式 */
.clickable-image {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .image-modal {
        padding: 10px;
    }
    
    .image-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .image-modal-prev {
        left: 10px;
    }
    
    .image-modal-next {
        right: 10px;
    }
    
    .image-modal-close {
        top: -35px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .image-modal-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .image-modal-prev {
        left: 5px;
    }
    
    .image-modal-next {
        right: 5px;
    }
}
