body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.viewer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #2c2c2c;
}

.leftPage {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;

    border-right: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
}

.rightPage {
    position: relative;
    overflow: hidden;
    display: flex;
    width: 100%;
    height: 100%;
}

.leftPage>img {
    display: none;
    width: 100%;
    height: auto;
}

.rightPage>img {
    display: none;
    width: 100%;
    height: auto;
}

.previousPageArrow,
.nextPageArrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    z-index: 100;
}

.previousPageArrow>img,
.nextPageArrow>img {
    width: 100%;
    height: 100%;

    /* Invert color */
    filter: invert(1);
}

.previousPageArrow {
    left: 1rem;
}

.nextPageArrow {
    right: 1rem;
}

.loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    width: 100vw;
    z-index: 90;

    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#loading {
    height: 5rem;
    width: 5rem;
}

.hidden {
    display: none;
}

.page {
    /* Fit image to container */
    width: auto;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .viewer {
        grid-template-columns: 1fr;
    }

    .previousPageArrow {
        left: 0.5rem;
    }

    .nextPageArrow {
        right: 0.5rem;
    }

    .rightPage {
        display: none;
    }
}