
@keyframes spawn {
    to{
        left: 150px;
    }
}
@keyframes rise-up{
    to{
        transform: scaleY(1);
    }
}
body{
    background: #73BDA8;
    color: #ECE6C2;
}
main{
    background: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: fit-content;
    margin-inline: auto;
    max-width: 1000px;
    transition: all 0.5s;
    position: relative;
}
main.hidden{
    opacity: 0;
}
main h1{
    font-size: 10rem;
    margin-bottom: 3rem;
    margin-top: 0;
}
main h2{
    margin: 0;
    margin-bottom: 1rem;
    font-size: 3rem;
    font-family: Roboto, monospace;
}
main p{
    position: absolute;
    left: 50%;
    bottom: 0;
    font-size: 1.5rem;
    translate: -50% 0;
}
main a, #result #register .choice a{
    color: inherit;
    text-decoration: none;
    font-size: 3rem;
    display: block;
    margin-top: 5rem;
    color: black;
    width: fit-content;
    margin-inline: auto;
    background-color: #ECE6C2;
    padding: 1rem 3rem;
    box-shadow: 8px 5px #D2A24C;
    border-radius: 30px;
    margin-inline: 1rem;
}
#result{
    position: fixed;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    backdrop-filter: brightness(0.2);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    transform-origin: top;
    transform: translateY(-100%);
    
}
#result.active{
    transform: translateY(0);
}
#result #register{
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-basis: 50%;
}
#result #leaderboard{
    flex-basis: 50%;
    height: auto;
}

#result #leaderboard .window.table{
    width: 80%;
    display: flex;
    flex-direction: column;
    margin-inline: auto;
    overflow: hidden;
    background-color: #D2A24C;
    border: solid black 3px;
    border-radius: 30px;
    box-shadow: 15px 15px black;
}

#result #leaderboard .window.table .windowHead{
    width: 100%;
    height: 50px;
    background-color: #ECE6C2;
    border-bottom: solid black 3px;
}

#result #leaderboard .window.table .windowBody{
    background-color: #ECE6C2;
    margin-top: 5rem;
    border-top: solid black 3px;
    overflow-y: scroll;
    overflow-x: hidden;
    position: relative;
    flex-grow: 1;
    color: black;
}
#result #leaderboard .window.table .windowBody table{
    width: 100%;
    font-size: 2rem;
    text-align: center;
    padding: 2rem;
    border-collapse: collapse;
}
#result #leaderboard .window.table .windowBody table tr{
    border-bottom: solid black 3px;

}
#result #leaderboard .window.table .windowBody table td, #result #leaderboard .window.table .windowBody table th{
    width: 33%;
    font-size: 2rem;
    padding-block: 1rem;
}
#result #leaderboard .window.table .windowBody table thead th{
    font-size: 2.5rem;
}
#result #leaderboard .window.table .windowBody table td:nth-child(even), #result #leaderboard .window.table .windowBody table th:nth-child(even){
    border-inline: solid black 3px;
}
#result #register input{
    font-size: 4rem;
    text-align: center;
    background: none;
    border: none;
    outline: none;
    color: #ECE6C2;
    border-bottom: solid #ECE6C2 3px;
    padding-block: 1rem;
    width: 100%;
}
#result #register h1{
    font-size: 3rem;
    margin-bottom: 5rem;
}
#result #register .choice{
    display: flex;
    justify-content: center;
    align-items: center;
}
#result #register .choice > *{
    margin-inline: 1rem;
}

#result #register button{
    color: inherit;
    text-decoration: none;
    font-size: 3rem;
    display: block;
    margin-top: 5rem;
    width: fit-content;
    margin-inline: auto;
    background-color: #73BDA8;
    padding: 1rem 3rem;
    box-shadow: 8px 5px #D2A24C;
    border-radius: 30px;
    border: none;

}

#result #register button:last-child{
    background-color: #D2A24C;
    box-shadow: 8px 5px #73BDA8;
}

#game{
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: none;
}
#game #character{
    position: absolute;
    width: fit-content;
    top: calc(75% - 200px);
    left: -200px;
    animation: spawn 1s 1s forwards;
    transition: height 200ms, top 200ms, translate 0.5s;
    height: 200px;
}
#game #character img{
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: none;
}

#game #ground{
    position: absolute;
    height: 25%;
    width: 100%;
    bottom: 0;
    left: 0;
    border-top: solid #ECE6C2 3px;
    transform: scaleY(0);
    transform-origin: bottom;
    animation: rise-up 1s forwards;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game #ground h3{
    font-size: 3rem;
    margin-inline: 3rem;
}
#game #score{
    display: flex;
    width: fit-content;
    position: absolute;
    right: 100px;
    top: 100px;
    font-size: 3rem;
    font-weight: bold;
}
#game #score #best{
    margin-right: 1rem;
}
#game #spawner{
    position: absolute;
    height: 400px;
    width: 100%;
    right: 0;
    bottom: 25%;
}
#game #spawner img{
    width: 100px;
    height: 100px;
    object-fit: contain;
    position: absolute;
    left: 100%;
    top: 0;
}

@media screen and (max-width: 900px) {
    #result{
        display: none;
    }
    #game{
        display: none;
    }
    main p{
        display: none;
    }
    main{
        align-items: center;
        text-align: center;
        padding-inline: 3rem;
    }
    main h2{
        font-size: 2.5rem;
    }
    
}