* {
    font-family: sans-serif;
}
html {
    margin: 0;
    padding: 0;
    color: white;
    background-image: url(img/dot.svg);
    background-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
body, html {
    overscroll-behavior: none;
}
html, canvas, input, button {
    background-color: rgb(32, 32, 32);
}
canvas {
    background-repeat: repeat;
    margin: 0;
    padding: 0;
    position: relative;
}
canvas, .canvas {
    width: min(100vw, 70vh);
    height: min(100vw, 70vh);
}
.container {
    display: none;
}
.container.open{
    display: flex;
}
.playerInfos {
    display: flex;
    justify-content: space-between;
    font-size: 200%;
}
#leaderboard .active {
    font-weight: bold;
}
#leaderboard {
    margin: auto;
    overflow-y: scroll;
    max-height: 150px;
    display: inline-block;
    padding: 0 100px;
}
.leaderboard {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.username_logout {
    display: flex;
    gap: 10px;
    align-items: center;
}
#logout {
    text-decoration: none;
    color: red;
}
.canvas{
    margin: 20px 0;
    box-shadow: 0px 0px 20px 0px #0dce749f;
    border-radius: 20px;
    position: relative;
    display: inline-block;
    padding: 0;
    overflow: hidden;
}
#login img {
    width: 100px;
    margin: 50px;
    animation: logo 10s ease-out 3s infinite forwards;
}
#login {
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    font-size: 120%;
    border-radius: 30px;
    overflow: hidden;
}
#login button {
    background-color: inherit;
    border-radius: 0 30px 30px 0;
    color: inherit;
    border: none;
    font-weight: bold;
    font-size: inherit;
    cursor: pointer;
    padding: 10px;
}
#login button:hover {
    background-color: #303030;
}
#login .input {
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px 0px #0dce749f;
    margin: 10px;
    border-radius: 30px;
    background-color: inherit;
}
#login input {
    border: none;
    color: inherit;
    font-size: inherit;
    text-align: center;
    padding: 10px;
    border-radius: 30px 0 0 30px;
}
#login input:focus {
    outline: none;
}

button.button {
    box-shadow: 0 0 10px 0px #0dce749f;
    padding: 10px 20px;
    border-radius: 30px;
    background-color: inherit;
    color: inherit;
    border: none;
    text-decoration: none;
    margin: 10px;
    font-size: 170%;
    cursor: pointer;
    transition: transform 10ms;
}
button.button.primary {
    background-color: #0dce74;
    font-weight: bold;
}
button.button:hover {
    transform: scale(1.1);
}

@keyframes bluring {
    0% {
        backdrop-filter: blur(0px);
    }
    100% {
        backdrop-filter: blur(10px); 
    }
}
#retry.open {
    display: flex;
    animation: bluring 4s ease-in 0s 1;
}
#retry {
    display: none;
    gap: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(10px); 
}
#retry-table {
    border-spacing: 10px;
}
#retry .title {
    text-align: center;
    font-size: 200%;
}
#retry .title span {
    color: #0dce74;
    font-weight: bold;
    text-transform: uppercase;
}

#game {
    flex-direction: column;
}

@media screen and (max-width: 600px) {
    #login {
        font-size: 200%;
    }
    #login input {
        width: 70vw;
    }
}

@keyframes zoomStart {
    0% {
        transform: scale(10);
    }
    100% {
        transform: scale(0);
    }
}


.canvas::after{
    content: "";
    position: absolute;
    display: block;
    z-index: 10;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    background-image: url(./img/logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    transform: scale(0);
}
.canvas.animate::after {
    animation: zoomStart 1s cubic-bezier(0.01, 1.26, 0.55, 0.68);
}

.error {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    font-size: 150%;
    margin: 0;
    max-width: 100vh;
    border-radius: 0 0 30px 30px;
    background-color: rgba(255, 0, 0, 0.39);
    color: white;
    text-align: center;
    padding: 10px 30px;
    transition: transform 1s;
}
.error.open {
    transform: translateX(-50%) translateY(0);
}

footer {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 20px 50px;
}
footer a {
    color: white;
    font-weight: bold;
    position: relative;
    display: inline-block;
}
footer :nth-child(1) {
    animation: footer 10s ease-in-out 5s infinite;
}
footer :nth-child(2) {
    animation: footer 10s ease-in-out 5.1s infinite;
}

@keyframes footer {
    0% {
        transform: scale(1);
    }
    2% {
        transform: scale(1.5);
    }
    4% {
        transform: scale(1);
    }
}
@keyframes logo {
    0% {
        transform: rotate(0);
    }
    1% {
        transform: rotate(-10deg);
    }
    2% {
        transform: rotate(10deg);
    }
    3% {
        transform: rotate(-10deg);
    }
    4% {
        transform: rotate(10deg);
    }
    5% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(0);
    }
}