/* ViewImage 灯箱样式 - 本地化版本 */

.viewimage-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.viewimage-layer.active {
    display: flex;
}

.viewimage-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewimage-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
    animation: viewimage-fadein 0.3s ease;
}

@keyframes viewimage-fadein {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.viewimage-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
}

.viewimage-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.viewimage-close::before,
.viewimage-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

.viewimage-close::before {
    transform: rotate(45deg);
}

.viewimage-close::after {
    transform: rotate(-45deg);
}

.viewimage-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
}

.viewimage-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.viewimage-nav.prev {
    left: 20px;
}

.viewimage-nav.next {
    right: 20px;
}

.viewimage-nav::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.viewimage-nav.prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.viewimage-nav.next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

.viewimage-loading {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: viewimage-spin 0.8s linear infinite;
}

@keyframes viewimage-spin {
    to {
        transform: rotate(360deg);
    }
}

.viewimage-caption {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
    .viewimage-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .viewimage-nav {
        width: 40px;
        height: 40px;
    }

    .viewimage-nav.prev {
        left: 10px;
    }

    .viewimage-nav.next {
        right: 10px;
    }

    .viewimage-caption {
        bottom: 10px;
        font-size: 12px;
        padding: 8px 16px;
    }
}
