*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body{
    font-family: Arial, Helvetica, sans-serif;
}

.wrapper{
    max-width: 1440px;
    margin: auto auto;
    height: 100vh;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.restart{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 34px;
    border: 2px solid black;
    border-radius: 50px;
    width: 170px;
    height:50px;
    cursor: pointer;
}

.title h1{
    font-size: 70px;
}

.game{
    display: flex;
    flex-direction: column;
    width: 500px;
    max-width: 500px;
    height: 500px;
}

.header{
    display: flex;
    font-size: 24px;
}

.header .player-x{
    flex: 1;
    border-bottom: 5px solid rgb(218, 218, 218);
    padding-bottom: 8px;
}

.header .player-o{
    flex: 1;
    border-bottom: 5px solid rgb(218, 218, 218);
    padding-bottom: 8px;
}

.player-o.active{
    border-bottom: 8px solid cyan;
    color: cyan;
}

.player-x.active{
    border-bottom: 8px solid rgb(202, 85, 85);
    color: rgb(202, 85, 85);
}
.board{
    /* background-color: aqua; */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-gap: 0;
    flex-grow: 1;
    padding: 10px;
}

.board-tile{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 80px;
    cursor: pointer;
}

.board-tile:hover{
    background-color: #eee;
}

.board-tile:not(:nth-child(3n)){
    border-right: 3px solid gray;
}

.board-tile:not(:nth-last-child(-n + 3)){
    border-bottom: 3px solid gray;
}

.winner{
    color: rgb(42, 212, 42);
}

@media (max-width: 1065px) {
    .wrapper{
        width: 100%;
        height: 100%;
        flex-direction: column;
    }

    .title{
        /* width: 100% */
        text-align: center;
    }

    .restart{
        margin:auto;
        text-align: center;
    }

    .left{
        width: 100%;
        margin-bottom: 5rem;
    }
    .right{
        width: 100%;
    }

    .game{
        width: 100%;
        margin: 0 auto;
    }
    .right .board{
        width: 100%;
    }
}