@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Montserrat&display=swap');

.creepster {
    font-family: "Creepster", system-ui;
    font-weight: 400;
    font-style: normal;
}

body {
    box-sizing: border-box;
    display: grid;
    place-content: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    margin: 0;
    min-width: 100vw;
}

.hide {
    display: none;
}

@keyframes gameover {
    to {
        width: 3000px;
    }
}

@keyframes gameover-curtain {
    to {
        height: 100vh;
    }
}

@keyframes gameover-text {
    to {
        opacity: 1;
    }
}

.player, .word, .boardgame {
    transition: 1s;
}

.initial {
    .player, .word, .boardgame {
        opacity: 0;
        transition: 0s;
    }

    h1 {
        display: block;
    }
}

.win {
    .curtain {
        .start {
            opacity: 1;
            font-size: 3rem;
        }
    }
}

.gameover {
    .player svg {
        animation: gameover .3s;
    }

    .player, .word, .boardgame {
        opacity: 0;
    }

    .curtain {
        animation: gameover-curtain 0s .3s forwards;

        h2 {
            animation: gameover-text 3s .3s forwards;
        }

        .start {
            animation: gameover-text 3s .3s forwards;
        }
    }
}

.curtain {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100vw;
    height: 0vh;
    background: #000;
    position: absolute;
    z-index: 2;

    h2 {
        position: relative;
        opacity: 0;
        z-index: 3;
        font-size: 3.5rem;
        text-align: center;
        color: red;
    }

    .start {
        font-size: 2rem;
        opacity: 0;
        font-family: "Creepster", system-ui;
        color: red;
        position: relative;
        cursor: pointer;

        &::after {
            content: '';
            display: block;
            position: absolute;
            width: 0%;
            height: 3px;
            bottom: 0;
            left: 50%;
            background: #fff;
            transition: 0.5s;
        }

        &:hover {
            &::after {
                width: 100%;
                left: 0;
            }
        }
    }
}

h1 {
    font-size: 5rem;
    margin: 100px auto;
    text-align: center;
    display: none;
}

.startScreen {
    width: 100%;
    margin-bottom: 60px;

    label {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

#wordToGuess {
    width: 50%;

    label {
        width: 100%;
    }
}

.player {
    width: 35vw;
    height: 35vw;
    min-width: 200px;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.player .tries {
    position: relative;
    font-size: 5rem;
    color: #fff;
    margin-top: 5rem;
}
svg {
    fill: url(#Gradient1);
    width: 35vw;
    min-width: 200px;
    transform: scaleX(-1);
    position: absolute;
}

.stop1 {
    stop-color: red;
}

.stop2 {
    stop-color: white;
}

.word {
    width: 100%;
    background: #333;
    margin: 1.5rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

span {
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
}

span.match {
    font-family: "Creepster", system-ui;
}

.boardgame {
    display: flex;
    gap: 10px;
    place-content: center;
    flex-wrap: wrap;
}

input[type=checkbox] {
    display: none;
}

input[type=checkbox]:checked+label {
    background: #666;
}

.boardgame label {
    width: 50px;
    height: 50px;
    outline: 2px solid greenyellow;
    display: grid;
    place-content: center;
    font-size: 1.5rem;
    font-family: monospace;
}