@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@620&display=swap&family=Telex&display=swap');

body, html {
    padding: 0px;
    margin: 0px;

    display: flex;
    flex-direction: row;
    justify-content: center;

    scroll-behavior: smooth;
}

.warning-noscript {
    display: none;
}

#main {
    width: 70%;
}

#unity-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 10px;
    margin: 10px;

    z-index: 0;

    box-sizing: border-box;
    background-color: #ededed;
}

#unity-container::before {
    content: '';

    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;

    background: linear-gradient(315deg, #A8FFFF 0%, #B8EDE9 63%, #9AFCC0 100%);
    border-radius: 15px;
    box-sizing: border-box;

    z-index: -1;
    padding: 5px;

    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out; /* pour Chrome/Safari */
}

#unity-main {
    width: 100%;
    position: relative;
}

.game-dimension {
    aspect-ratio: 960 / 600;
    width: 100%;
    height: auto;

    border-radius: 10px;
    border: 3px solid #bebebe;
    box-sizing: border-box;
}

#unity-overlay {
    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(45deg, #3e64a9, #8dd8f8);
    border: none;
    position: absolute;

    z-index: 1;
}

#play-logo {
    -webkit-mask-image: url(./play_circle.svg);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;

    mask-image: url(./play_circle.svg);
    mask-repeat: no-repeat;
    mask-size: contain;

    width: 150px;
    height: 150px;
    cursor: pointer;

    background-color: white;
}

#unity-canvas {
    background: #231F20;
}

#unity-canvas:fullscreen {
    border: none;
    border-radius: 0px;
}

#unity-loading-bar {
    position: absolute;
    top: 0;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: none;
}

#unity-logo {
    height: 25%;
    aspect-ratio: 1 / 1;
    background: url('./unity-logo-dark.png') no-repeat center;
    background-size: contain;
}

#unity-progress-bar-text {
    font-family: "Baloo 2", sans-serif;
    font-weight: 620;
    margin: 10px;
    color: white;
    width: 80%;
}

#unity-progress-bar-label {
    float: left;
    margin: 0px 15px;
}

#unity-progress-bar-percent {
    float: right;
    margin: 0px 15px;
}


#unity-progress-bar-empty {
    width: 85%;
    height: 15px;

    margin-bottom: 10px;
    border: 4px solid white;
    border-radius: 18px;
    background-color: transparent;
    overflow: hidden;
}

#unity-progress-bar-full {
    height: 100%;

    background: linear-gradient(to right, #00ff55, #00ff90);
    border-radius: 8px;
}

#unity-footer {
    position: relative;
    display: block;
    width: 100%;
}

#uf-volume-system {
    float: left;
    display: flex;
    align-items: center;
    text-align: center;
    height: 48px;
}

#uf-desc-content {
    float: right;
    display: flex;
    align-items: center;
    text-align: center;
}

#unity-webgl-logo {
    width: 204px;
    height: 38px;
    margin: 5px;
    background: url('./webgl-logo.png') no-repeat center;
}

#unity-build-title {
    margin-right: 10px;
    line-height: 38px;
    font-family: arial;
    font-size: 18px;
}

#unity-fullscreen-button {
    cursor: pointer;
    width: 38px;
    height: 38px;
    background-color: #d1d1d1;
    border-radius: 5px;
    margin: 5px;
}

#unity-fullscreen-button::before {
    content: '';
    display: block;
    background: url('./fullscreen-button.svg') no-repeat center;

    width: 35px;
    height: 35px;

    margin: 1.5px;
}

input#mute + label {
    cursor: pointer;
    width: 30px;
    height: 30px;
    background: #202020;
    margin: 5px;

    -webkit-mask: url(./volume_up.svg);
    -webkit-mask-size: contain;
    mask: url(./volume_up.svg);
    mask-size: contain;
}

input#mute:checked + label {
    -webkit-mask: url(./mute.svg);
    -webkit-mask-size: contain;
    mask: url(./mute.svg);
    mask-size: contain;
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translate(-50%);
    background: white;
    padding: 10px;
    display: none;
}

#bottom-content {
    width: 80%;
    margin: 25px 0px;
    font-family: sans-serif;
}

.date {
    font-family: 'Telex', sans-serif;
    font-weight: bold;
    background: linear-gradient(45deg, #001bff, #a400e3);
    color: white;
    padding: 2px 5px 2px 8px;
    border-radius: 20px;
    margin-right: 5px;
}

.date::before {
    content: '# - ';
    font-style: italic;
    font-weight: bold;
}

.desc-maj {
    margin: 10px 0px;
    line-height: 23px;
}

.desc-maj::marker {
    color: transparent;
}

#nav-container {
    width: 20%;
    position: sticky;
    top: 5vh;
    height: 90vh;
    background: linear-gradient(45deg, #5163ff, #bd66ff);
    margin-left: 15px;
    border-radius: 20px;
    padding: 5px;
    box-sizing: border-box;
    transition: width 0.8s, height 0.8s, margin  0.8s, padding 0.8s, border-radius 0.8s;
    overflow: hidden;
}

#nav-container nav {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background-color: #e8e8ff;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#nav-container nav a {
    color: black;
    text-align: center;
    font-family: 'Telex';
    font-weight: bold;
    font-size: 1.6em;
    text-decoration: none;
    margin: 10px 0px;
}

#nav-container nav a::after {
    display: block;
    content: '';
    height: 3px;
    width: 100%;
    background-color: currentColor;
    transform-origin: right;
    transform: scaleX(0);
    transition: transform 0.3s;
}

#nav-container nav a:hover::after {
    transform-origin: left;
    transform: scaleX(1);
    transition: transform 0.4s;
}

#nav-button label {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: flex-end;
    cursor: pointer;
}

#nav-button label span {
    display: block;
    width: 85%;
    height: 15%;
    background-color: white;
    border-radius: 5px;
}

#nav-button label span:nth-child(2) {
    width: 55%;
}

@media screen and (max-width: 600px) {
    #main {
        width: 100%;
    }

    #nav-container {
        position: fixed;
        right: 0;
        top: 0;

        max-width: 100vw;
        height: 85vh;
        width: 200px;

        background: linear-gradient(45deg, #5163ff50, #bd66ff90);
        backdrop-filter: blur(45px);
        border-radius: 20px 0px 0px 20px;
        
    }

    #nav-container:has(#nav-toggle:not(:checked)) {
        width: 50px;
        height: 50px;
        margin: 10px;
        padding: 5px;
        border-radius: 10px;
    }

    #nav-container nav {
        background-color: #e8e8ff44;
    }

    #nav-container:has(#nav-toggle:not(:checked)) nav {
        display: none;
    }
    
    #nav-container #nav-button {
        width: 40px;
        height: 40px;
        position: absolute;
        top: 10px;
        right: 10px;
        transition: top 0.8s, right 0.8s;
    }

    #nav-container:has(#nav-toggle:not(:checked)) #nav-button {
        top: 5px;
        right: 5px;
    }
}