*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

body {
    background-color: hsl(0, 0%, 0%);
    font-family: sans-serif, Helvetica, Arial;
}

#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 20px auto;
    width: 500px;
    color: hsl(0, 0%, 100%);
    font-size: 1.5em;
}

#panel {
    display: flex;
    margin: 40px 0;
}

#legend {
    display: flex;
    flex-direction: column;
    width: 250px;
    font-size: .8em;
}

#game-control {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    font-size: .8em;
}

#control {
    color: hsl(0, 0%, 100%);
    background-color: hsl(240, 100%, 50%);
    height: 80px;
    width: 80px;
    border: none;
    border-radius: 50%;
    font-size: 1em;
    font-weight: bold;
}

#control:hover {
    background-color: hsl(240, 100%, 40%);
}

#score-board {
    text-align: center;
    margin: 0 0 20px;
}

#board {   
    height: 600px;
    width: 400px;
}

.win {
    color: hsl(120, 100%, 40%);
}

.lose {
    color: hsl(0, 100%, 50%);
}

.invalid {
    color: hsl(0, 100%, 50%);
}

#section-1 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 40px;
    gap: 20px;
    margin: 20px 0;
}

#direction {
    margin-top: 50px;
    text-align: center;
}

#section-2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 40px;
    gap: 20px;
}

.tile {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 80px;
    background-color: hsl(0, 0%, 0%);
    border: 1px solid hsl(0, 0%, 50%);
    border-radius: 5px;
    color: hsl(0, 0%, 100%);
    text-align: center;
    font-size: 1em;
}

#timer {
        border: none;
}

button {
    background-color: hsl(0, 0%, 0%);
}

button:hover {
    cursor: pointer;
}