.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.book {
    position: relative;
    transform: translateX(50%);
    width: 8em;
    height: 6em;
    perspective: 37.5em;
}
.cover {
    position: absolute;
    width: 50%;
    height: 100%;
    background: var(--primary-l);
    box-shadow: 0 0.25em 0.5em hsla(0,0%,0%,0.3),
                0 0 0 0.25em var(--primary) inset;
    transform-style: preserve-3d;
    transform-origin: 100% 50%;
}
.pages {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    transform-style: preserve-3d;
}
.page {
    position: absolute;
    width: 50%;
    height: 100%;
    background: var(--white);
    transform-origin: 0% 50%;
    transform-style: preserve-3d;
    box-shadow: 0 0.25em 0.5em hsla(0,0%,0%,0.3),
                0 0 0 0.25em var(--primary) inset;
    animation: flip 2s infinite ease-in-out;
}
.page:nth-child(2) {
    animation-delay: 0.2s;
}
.page:nth-child(3) {
    animation-delay: 0.4s;
}
.page:nth-child(4) {
    animation-delay: 0.6s;
}
@keyframes flip {
    0%, 100% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(-180deg);
    }
}
/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --white: hsl(0, 0%, 20%);
        --primary-l: hsl(0, 0%, 40%);
    }
}