@keyframes floating {
    0% {
        transform: translateY(0px);
        animation-timing-function: ease-in-out;
    }

    60% {
        transform: translateY(-20px);
        animation-timing-function: ease-in-out;
    }

    100% {
        transform: translateY(0px);

    }
}

@keyframes rolling-r {
    
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}

@keyframes move-in-l {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes move-in-r {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fade-in {
    to {
        scale: 1;
        opacity: 1;
    }
}

@keyframes view-fade-in {
    to {
        scale: 1;
        opacity: 1;
    }
}

@keyframes view-fade-out {
    to {
        scale: .8;
        opacity: 0;
    }
}

@keyframes down-move {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: .8;
    }
    100%{
        opacity: 0;
        transform: translateY(40px);
    }
}

@keyframes page-transition-left {
    0% {
        margin-left: 0;
    }
    100% {
        margin-left: -100%;
    }
}

@keyframes page-transition-right {
    0% {
        margin-left: 0;
    }
    100% {
        margin-left: 100%;
    }
}



/* Class 設定 */

.ani-rolling-r {
    animation-name: rolling-r;
    animation-duration: 12s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.ani-rolling-l {
    animation-name: rolling-r;
    animation-duration: 12s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-direction: reverse;
}

.ani-move-in-l-quick {
    animation-name: move-in-l;
    animation-duration: 1.5s;
    animation-timing-function: ease-in-out;
    /* animation-timeline: view(50px); */
}

.ani-move-in-r-quick {
    animation-name: move-in-r;
    animation-duration: 1.5s;
    animation-timing-function: ease-in-out;
    /* view-timeline: 100px; */
}

.ani-move-in-l-slow {
    animation-name: move-in-l;
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
}

.ani-move-in-r-slow {
    animation-name: move-in-r;
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
}

.view-fade-in {
    animation-name: view-fade-in;
    animation-timeline: view();
    animation-timing-function: linear;
    animation-range-start: cover;
    animation-range-end: 30%;
    animation-fill-mode: forwards;
    scale: .8;
    opacity: 0;
}

.view-fade-out {
    animation-name: view-fade-out;
    animation-timeline: view();
    animation-timing-function: linear;
    animation-range-start: contain;
    animation-range-end: cover;
    animation-fill-mode: backwards;
    scale: 1;
    opacity: 1;
}

.ani-down-move {
    animation-name: down-move;
    animation-timing-function: ease-in-out;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
}

.page-transition::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    margin-top: calc(50vh + 90px);
    margin-left: 0;
    margin-right: 0;
    background-color: #D0ACF5;
    animation-name: page-transition-right;
    animation-duration: 1s;
    animation-delay: .5s;
    animation-fill-mode: forwards;
}
.page-transition::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    margin-top: calc(-50vh + 90px);
    margin-left: 0;
    margin-right: 0;
    background-color: #D0ACF5;
    animation-name: page-transition-left;
    animation-duration: 1s;
    animation-delay: .5s;
    animation-fill-mode: forwards;
}

.fade-in {
    animation-name: fade-in;
    animation-duration: .6s;
    animation-fill-mode: forwards;
    animation-timing-function: ease;
    scale: .98;
    opacity: .75;
}

@media screen and (max-width: 768px) {
    .view-fade-in {
        animation-range-end: 25%;
    }
}
@media screen and (max-width: 480px) {
    .view-fade-in {
        animation-timeline: none;
        /* animation-range-start: contain; */
    }
    .view-fade-out {
        animation-timeline: none;
        /* animation-range-start: 50%; */
        /* animation-range-end: cover; */
    }
}