body {
    background-image: none;
    background-color: transparent;
}

body::-webkit-scrollbar {
    display: none;
}

.bookwrapper {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 90vh;
    max-width: 100vw;
    align-items: center;
    text-align: center;
    background-image: none;
    filter: none;
}

.controls {
    position: relative;
    display: flex;
    justify-content: center;
    z-index: 3000;
    top: 0px;
    transition: all 1s ease;
}
button {
    padding: 10px 16px;
    margin-right: 6px;
    cursor: pointer;
    font-family: 'My Handwriting', 'Comic Sans MS';
    font-size: 16px;
    color: #5a4174;
    background-color: #f8c5e1;
    border-radius: 13px;
    border-color: #e8c5f8;
    transition: 0.3s ease;
}

button:hover{
    scale: 1.2;
    background-color: #fff6a5;
}

input[type="number"] {
    width: 80px;
    padding: 8px;
    margin-right: 6px;
    font-family: 'My Handwriting', 'Comic Sans MS';
    font-size: 18px;
    border-radius: 13px;
    border-color: #e8c5f8;
}

.book {
    position: relative;
    width: 450px;
    height: 600px;
    perspective: 1500px;
    margin: 27px;
    pointer-events: none;
    filter: drop-shadow(20px 20px 3px rgba(56, 61, 108, 0.17));

    touch-action: pan-y;

    --book-x: 0px;
    transform: translateX(var(--book-x));
    transition: all 0.7s ease;
}

.BookPage.drag-active {
    pointer-events: none;
    will-change: transform;
}

.book, .BookPage {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.BookPage {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transform-origin: left;

    --stack-x: 0px;
    transform: translateX(var(--stack-x));

    transition: transform 0.7s;
}
.BookPage.flipped {
    transform: translateX(var(--stack-x)) rotateY(-180deg);
}
.page {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    overflow: clip;

    filter: drop-shadow(-2px 0px 1px rgba(56, 61, 108, 0.17)) drop-shadow(2px 0px 1px rgba(56, 61, 108, 0.17));
}

.page img{
    pointer-events: none;
}

.page div{
    position: absolute;
}

.frontpage {
    background-image: url(../../assets/images/art/page_1.webp);
    background-repeat: no-repeat;
    background-size: contain;
}
.backpage {
    background-image: url(../../assets/images/art/page_1_bp.webp);
    background-repeat: no-repeat;
    background-size: contain;

    transform: rotateY(180deg);
}

.desktopOnly{
    opacity: 1;
    transition: all 0.7s ease;
    
    
}

@media (max-width: 1290px) {
    .book {
        scale: 0.8;
    }

    .controls {
        top: -68px;
    }
}

@media (max-width: 1021px) {
    .book {
        scale: 0.7;
    }

    .controls {
        top: -96px;
    }
}

@media (max-width: 756px) {
    .book::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 50%;
        height: 100%;
        background: transparent;
        z-index: 999;
        pointer-events: none;
    }

    /* echtes Flip bleibt */
    .BookPage {
        transform-origin: center;
    }

    .BookPage.animating-out {
        transition: transform 0.6s ease-out;
    }

    .BookPage.animating-out {
        transform: translateX(749px) scale(0.9);
    }
    
    .book {
        scale: 1;
    }
    
    .controls {
        top: -15px;
    }
        .desktopOnly{
    opacity: 0;
}
}



@media (max-width: 636px) {
    .desktopOnly{
    opacity: 0;
}
    .book {
        scale: 0.8;
    }

    .controls {
        scale: 0.8;
        top: -68px;
    }
}
