* {
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.333rem;
    font-family: Mali, --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol";
    word-wrap: break-word;
    user-select: none;
    margin: 0;
    letter-spacing: -1px;
}

body {
    color: hsl(0, 100%, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem;
    background: hsla(215, 72%, 19%, 1);
}

.game {
    width: 800px;
    height: 600px;
    background: hsl(209, 76%, 66%);
    background-image: linear-gradient(
        180deg,
        hsl(205, 82%, 73%) 0%,
        hsl(212, 72%, 59%) 100%
    );
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0px 5px 20px hsla(210, 90%, 10%, 1);
}

h1 {
    font-size: 3.8rem;
    line-height: 4rem;
    font-weight: 700;
    text-shadow: 0px 1px 2px hsla(210, 60%, 30%, 1);
}

h2,
h3 {
    font-size: 2rem;
    line-height: 3.6rem;
    font-weight: 400;
    color: hsla(0, 100%, 100%, 0.7);
    margin-top: 2rem;
}

h2 span,
h3 span,
.guessed {
    font-size: 2rem;
    font-weight: 700;
    color: hsla(0, 100%, 100%, 1);
    text-transform: uppercase;
    text-shadow: 0px 1px 2px hsla(210, 60%, 30%, 1);
}

.warning {
    color: hsla(210, 60%, 30%, 0.7);
    font-style: italic;
    padding-top: 1rem;
    font-size: 1.25rem;
}

.userInput {
    padding-top: 2rem;
}

.userInput input,
.userInput button {
    font-size: 1.1rem;
    font-weight: 700;
    width: 150px;
    height: 42px;
    border-radius: 5px;
    outline: none;
    border: 2px solid hsla(210, 60%, 30%, 1);
    margin: 0 0.25rem;
    padding: 0 0 0.1rem 0;
    letter-spacing: 1px;
    color: hsla(0, 0%, 0%, 1);
}

.userInput input {
    border-radius: 4px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0px 5px 0px hsla(210, 90%, 10%, 0.2);
    text-transform: uppercase;
}

.userInput input:hover {
    transition: background-color 150ms ease-in;
    background-color: hsl(210, 77%, 90%);
}

.userInput input::placeholder {
    color: hsla(0, 0%, 0%, 0.3);
    text-transform: initial;
}

.userInput input:focus::placeholder {
    color: hsla(0, 0%, 0%, 0);
}

.userInput .guess,
.userInput .restart {
    transition: background-color 150ms ease-in;
    box-shadow: 0px 5px 0px hsla(210, 90%, 10%, 0.2);
}

.userInput .guess,
.userInput .guess:visited {
    background-color: hsl(36, 100%, 50%);
}

.userInput .guess:hover {
    background-color: hsl(0, 100%, 100%);
}

.userInput .restart,
.userInput .restart:visited {
    margin-right: 0;
    background-color: hsl(0, 80%, 60%);
}

.userInput .restart:hover {
    background-color: hsl(0, 100%, 100%);
}

.userInput .guess:active,
.userInput .restart:active {
    position: relative;
    top: 5px;
    box-shadow: none;
}

.randomWord {
    display: flex;
    justify-content: center;
}

.randomWord span {
    font-size: 1.1rem;
    font-weight: 700;
    width: 42px;
    border: 2px solid hsla(210, 60%, 30%, 1);
    border-right-width: 1px;
    border-left-width: 1px;
    border-radius: 0;
    padding: 0.5rem 1rem;
    color: hsl(0, 0%, 0%);
    margin: 0;
    background-color: hsl(0, 100%, 100%);
    text-transform: uppercase;
    transition: background-color 150ms ease-in;
    box-shadow: 0px 5px 0px hsla(210, 90%, 10%, 0.2);
}

.randomWord span.green {
    background-color: hsl(90, 40%, 60%);
}

.randomWord span:first-child {
    position: relative;
    border-left-width: 2px;
    border-radius: 5px 0 0 5px;
}

.randomWord span:last-child {
    position: relative;
    border-right-width: 2px;
    border-radius: 0 5px 5px 0;
}

.win,
.lose {
    width: 600px;
    height: 240px;
    background: hsla(0, 0%, 0%, 1);
    text-align: center;
    padding: 0rem;
    box-shadow: 0px 5px 20px hsla(210, 90%, 10%, 1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.win {
    position: relative;
    opacity: 0;
    top: 0px;
    transition: opacity 1000ms ease-in, top 1000ms ease-out;
}

.lose {
    position: relative;
    opacity: 0;
    top: -240px;
    transition: opacity 1000ms ease-in, top 1000ms ease-out;
}

.move_win {
    opacity: 1;
    top: -240px;
}

.move_lose {
    opacity: 1;
    top: -480px;
}

.win img,
.lose img {
    width: 100%;
}

.win h1 {
    position: relative;
    bottom: 70%;
}

.lose h1 {
    position: relative;
    bottom: 105%;
}

.lose p {
    position: relative;
    display: block;
    bottom: 105%;
    text-shadow: 0px 1px 2px hsla(210, 60%, 30%, 1);
    font-weight: 700;
    letter-spacing: 0px;
}

.lose p span {
    letter-spacing: 0px;
    text-transform: uppercase;
}

@media (max-width: 799px) {
    .game {
        width: 100%;
        height: 100%;
    }
    body {
        margin: 1rem;
    }
    .userInput button {
        margin-bottom: 0.5rem;
    }
}
