@font-face {
    font-family: happy;
    src: url("files/pop_happiness.woff") format("woff");
}

:root {
    cursor: none;
}

#mouseDiv {
    pointer-events: none;
    background-image: url(./res/cursor.webp);
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    z-index: 17;
    background-size: contain;
    background-repeat: no-repeat;
    animation: cursor 1s linear infinite;
}

#mouseDiv.toggle, #mouseDiv.toggle2 {
    background-image: url(./res/cursor2.webp);
    animation: none;
    width: 64px;
    height: 64px;
}

#trail {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 16;
    opacity: 0.5;
}

#obj {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 5;
}

.happy {
    font-family: happy, monospace;
    font-weight: bold;
    font-size: 4vh;
    color: black;
    text-align: left;
}

body {
    margin: 0;
    touch-action: none;
    overflow: hidden;
}

canvas {
    width: 100%;
    height: 100%;
}

.texte {
    position: absolute;
    margin-left: 42vw;
    margin-top: 5vh;
    font-size: 4vh;
}

.centre {
    width: 70vmin;
    height: 70vmin;
}

#progress {
    font-family: monospace;
    font-weight: bold;
    color: white;
    font-size: 6vh;
}

.vert {
    position: absolute;
    margin-top: 15vh;
}

.curtain {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: absolute;
    height: 100vh;
    width: 100vw;
    background-color: black;
}

.easteregg {
    position: absolute;
    font-family: happy;
    font-weight: lighter;
    font-size: 3vh;
    top: 10vh;
    left: 95vw;
}

.slide {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.slide1 {
    animation: ani1 reverse 25s linear infinite;
}

.slide2 {
    animation: ani1 reverse 35s linear infinite;
}

.slide3 {
    animation: ani1 45s linear infinite;
}

.text {
    display: flex;
    flex-direction: row;
    position: absolute;
    right: 0;
    z-index: 14;
}

.align {
    display: flex;
    flex-direction: column;
    position: relative;
    top: -100vh;
    right: 0;
    margin-left: -0.1vw;
}

.desc_image {
    background-size: 100% auto;
    width: 4vh;
    height: 87.5vh;
    background-image: url("res/DF_desc1_ver.png");
    background-color: white;
}

.main_image {
    background-size: 100% auto;
    width: 15vh;
    height: 150vh;
    background-image: url("res/DF_main_ver.png");
    background-color: white;
}

#menu {
    position: absolute;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 13;
    transition-duration: 500ms;
    transition-property: background-color;
}

#menu.toggle {
    background-color: rgba(0, 0, 0, 0.4);
    transition-duration: 500ms;
    transition-property: background-color;
}

#menu_button {
    margin-bottom: -8vh;
    position: relative;
    top: 5vh;
    left: 5vh;
    opacity: 1;
    z-index: 12;
    width: 8vh;
    height: 8vh;
    background-image: url(./res/menu.svg);
    background-size: cover;
    transform: rotate(0deg);
    transition-duration: 500ms;
    transition-property: transform, margin-bottom, opacity;
}

#menu_button.toggle {
    margin-bottom: 5vh;
    transform: rotate(180deg);
    transition-duration: 500ms;
    transition-property: transform, margin-bottom;
}
#menu_button.toggle2 {
    opacity: 0;
}

.buttons_bg {
    z-index: 11;
    margin-bottom: -8vh;
    padding: 0.5vw;
    border-radius: 100vw;
    width: fit-content;
    position: relative;
    top: 5vh;
    left: 5vh;
    background: linear-gradient(
        0deg,
        rgba(0, 100, 177, 1) 0%,
        rgba(11, 246, 253, 1) 100%
    );
    opacity: 0;
    transition-duration: 500ms;
    transition-property: margin-bottom, opacity;
}

.buttons_bg.toggle:hover {
    background: linear-gradient(
        180deg,
        rgba(0, 100, 177, 1) 0%,
        rgba(11, 246, 253, 1) 100%
    );
}

.buttons_bg:hover > .nav_button {
    background: linear-gradient(
        180deg,
        rgb(129, 143, 146) 0%,
        #c8f9fd 60%,
        rgb(239, 252, 255) 100%
    );
}

.buttons_bg.toggle {
    margin-bottom: 5vh;
    opacity: 1;
    transition-duration: 500ms;
    transition-property: margin-bottom, opacity;
}

.nav_button {
    pointer-events: none;
    display: table;
    opacity: 0;
    padding: 1vw 2vw;
    transition-duration: 500ms;
    transition-property: margin-bottom, opacity;
    border-radius: 1000px;
    background: rgb(176, 194, 198);
    background: linear-gradient(
        0deg,
        rgba(176, 194, 198, 1) 0%,
        #c8f9fd 60%,
        rgb(239, 252, 255) 100%
    );
}

.nav_button.toggle {
    pointer-events: all;
    position: relative;
    opacity: 1;
    transition-duration: 500ms;
    transition-property: margin-bottom, opacity;
}

@keyframes cursor {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes ani1 {
    0% {
        transform: translate(0%, -100%);
    }
    100% {
        transform: translate(0%, 0%);
    }
}

@keyframes ani2 {
    0% {
        transform: translate(-100%, 0%);
    }
    100% {
        transform: translate(0%, 0%);
    }
}

@media (max-aspect-ratio: 6/5) {
    .happy {
        font-size: 5vw;
    }
    .easteregg {
        top: 90vh;
        left: 10vw;
        height: 1em;
    }
    .text {
        flex-direction: column;
        left: 0;
        bottom: 0;
    }
    .align {
        flex-direction: row;
        flex-wrap: nowrap;
        top: 0;
        overflow: hidden;
    }
    .desc_image {
        background-size: auto 100%;
        background-image: url("./res/DF_desc1_hor.png");
        height: 3vh;
        width: 75vh;
    }
    .main_image {
        background-size: auto 100%;
        background-image: url("./res/DF_main_hor.png");
        width: 100vh;
        height: 10vh;
    }
    .slide {
        display: flex;
        flex-direction: row;
        position: relative;
        overflow: visible;
    }
    .slide1 {
        animation: ani2 reverse 50s linear infinite;
        margin-bottom: -0.1vh;
    }
    .slide2 {
        animation: ani2 reverse 50s linear infinite;
    }
    .slide3 {
        animation: ani2 35s linear infinite;
    }
    .code {
        font-size: 10vw;
    }
    #menu_button {
        width: 10vw;
        height: 10vw;
    }
    .buttons_bg {
        padding: 1.5vw;
    }
}
