.img-view {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: var(--root);
    z-index: 2;
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);

    transition: .5s cubic-bezier(.5, 0, 0, 1);
    outline: 5px solid transparent;
    border-radius: 0px;
    box-shadow: 3px 7px 20px #000b;
}

.img-view.hidden {
    opacity: 0;
    border-radius: 100px;
    outline: 5px solid var(--fg);
    pointer-events: none;
    transform: translate(-50%, -50%) perspective(70vw) scale(.5) rotateY(10deg) rotateX(20deg);
}

.img-view.hidden * {
    pointer-events: none;
}

.img-view-main {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navigate {
    position: absolute;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 200px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: .3s;
    pointer-events: all;
}

.navigate.hidden {
    opacity: 0;
    pointer-events: none;
}

.navigate svg {
    transition: .2s;
    transform: scale(1);
    stroke: var(--root-invert);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    width: 30px;
}

.navigate:hover svg {
    transform: scale(1.05);
}

.navigate:active svg {
    transform: scale(.95);
}

.nav-left {
    left: 10px;
}

.nav-right {
    right: 10px;
}

.nav-close {
    position: absolute;
    cursor: pointer;
    right: 20px;
    top: 20px;
    width: 50px;
    height: 50px;

    transform: scale(1);
    transition: .2s;
}

.nav-close:hover {
    transform: scale(1.2);
}

.nav-close:active {
    transform: scale(.95);
}

.img-view-main img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: calc(100% - 30px);
    max-height: calc(100% - 60px);
    border-radius: 10px;
}

.img-view-main #img1 {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.img-view-main #img2 {
    transform: translate(50%, -50%);
    opacity: 0;
}

.img-view-main img.moving-l#img1 {
    animation: img1-l .5s cubic-bezier(.6, 0, .1, 1) forwards;
}
.img-view-main img.moving-l#img2 {
    animation: img2-l .5s cubic-bezier(.6, 0, .1, 1) forwards;
}

.img-view-main img.moving-r#img1 {
    animation: img1-r .5s cubic-bezier(.6, 0, .1, 1) forwards;
}
.img-view-main img.moving-r#img2 {
    animation: img2-r .5s cubic-bezier(.6, 0, .1, 1) forwards;
}

@keyframes img1-l {
    0% {
        transform: translate(-50%, -50%);
        opacity: 1;
        filter: blur(0px);
    }
    100% {
        transform: translate(50%, -50%) scale(.5);
        opacity: 0;
        filter: blur(30px);
    }
}

@keyframes img2-l {
    0% {
        transform: translate(-150%, -50%) scale(.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes img1-r {
    0% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
    100% {
        transform: translate(-150%, -50%) scale(.5);
        opacity: 0;
    }
}

@keyframes img2-r {
    0% {
        transform: translate(50%, -50%) scale(.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.img-view-text {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: fit-content;
    color: var(--root-invert);
    background-color: var(--root);
    padding: 5px;
    border-radius: 4px;
    border-top-right-radius: 10px;
    border: 1px solid var(--fg-2);
}