html, body{
    margin: 0;
    padding: 0;
    font-family: sans-serif;   
}

header {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 1.5rem;
}

main {
    font-size: 2rem;

    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 70vh;
    justify-content: space-evenly;

}

.game-settings {
    display: flex;
    flex-direction: row;
    gap: 2em;
}

.game-settings > div {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1.5rem;
}


.board {
    --num-of-cols: 3;
    --num-of-rows: 3;

    --block-width: 100px;
    --block-height: 100px;

    --top-offset: 0;
    --left-offset: 0;
    --rotation: 0;

    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--num-of-cols), auto);
}

.line-container {
    position: absolute;
    width: 100%;
    height: 0.2em;
    border-radius: 1em;
    overflow: hidden;

    pointer-events: none;

    top: var(--top-offset);
    left: var(--left-offset);
    transform: rotate(var(--rotation));

    display: flex;
    align-items: center;
    justify-content: center;
}

.line-container .line {
    width: 0%;
    height: 100%;
    background-color: rgb(113, 70, 211);

    animation: line-in 0.5s forwards;

}

.modal-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100svw;
    height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    display: none;
}

.modal-container .modal {
    background-color: rgba(105, 194, 17, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1em;
    width: 15em;
    min-height: 6em;
    position: relative;
    color: white;
}
.modal #close-button {
    background-color: rgb(215, 51, 51);
    outline: none;
    border: none;
    padding: 0.8em;
    border-radius: 0.4em;
    cursor: pointer;
    color: white;
    position: absolute;
    top: 0;
    right: 0;
    margin: 0.8em;
}
.modal #reset-button {
    outline: none;
    background-color: rgb(0, 119, 255);
    border: none;
    transform: skewX(-10deg);
    width: 10em;
    height: 3em;
    cursor: pointer;
    color: white;
}

@keyframes line-in {
    0% {
        width: 0%;
    }
    100% {
        width: 90%;
    }
}

.block {
    display: flex;
    width: var(--block-width);
    height: var(--block-height);
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    border: 3px solid black;
    cursor: pointer;
    user-select: none;
}
