.test {
    background-color: rgb(143, 158, 184);
    background-color: rgb(100, 75, 43);
}

.main-space {
    display: flex;
    width: 100%;
    height: 95%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 40px;
}

.stats {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 60%;
}

.profile img {
    width: 60px;
}

.player-name {
    margin: 0 10px;
    font-size: 34px;
}

.row {
    display: flex;
    flex-direction: row;
}

.player-time {
    width: 160px;
    height: 60px;
    background-color: #ffffff;
    color: black;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    margin-top: 15px;
}

#black-time {
    background-color: #1D1C1A;
    color: #ffffff;
}

.flip-btn-container {
    font-size: 30px;
}

.flip-btn-container button {
    all: unset;
    font-size: 20px;
    background-color: red;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    margin-left: 10px;
}

.flip-btn-container button:hover {
    background-color: rgb(159, 0, 0);
}

#grey {
    background-color: grey;
}

#grey:hover {
    background-color: rgb(110, 110, 110);
}

.board {
    margin-left: 200px;
}

.board div {
    list-style: none;
    display: flex;
    margin: 0;
}

.box {
    cursor: pointer;
}

li {
    width: 11vh;
    height: 11vh;
    display: grid;
    place-items: center;
    font-size: 0;
    border: 0.1px solid #C3CDDC;
    transition: background-color 300ms;
}

.allimg {
    width: 100%;
}

.winner-screen-container {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    scale: 0;
    transition: scale 300ms;
}

.winner-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #454241;
    padding: 80px 100px;
    font-size: 20px;
    border-radius: 30px;

}

.winner-name {
    font-weight: 700;
    font-size: 50px;
    padding-bottom: 30px;
    display: flex;
}

.winner-screen-container p {
    margin-top: 0;
    font-weight: 400;
    font-size: 30px;
}

.rematch {
    margin-top: 30px;
}

.rematch button {
    all: unset;
    text-align: center;
    background-color: #64863a;
    padding: 20px;
    font-size: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 300ms;
    box-shadow: 0px 0px 31px -7px rgb(0 0 0 / 75%);
    width: 100px;
    height: 20px;
}

.rematch button:hover {
    background-color: rgb(82, 109, 50);
}

.rematch a {
    margin-left: 20px;
}

.X {
    position: absolute;
    right: 20;
    top: 20;
    font-size: 30px;
    cursor: pointer;
}



@media only screen and (orientation:portrait) and (max-width:600px) {
    li {
        width: 50px;
        height: 50px;
    }
    .absolute {
        position: absolute;
        top: 80px;
        left: 20px;
    }

    .main-space {
        flex-direction: column-reverse;
        padding-top: 60px;
    }

    .board {
        margin-left: 0;
    }

    .player-name {
        font-size: 20px;
    }

    #black-player-name {
        margin-right: 40px;
        background-color: #8F9EB8;
    }

    .profile img {
        width: 40px;
    }

    .stats {
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 100px;
        height: auto;
        padding: 20px;
    }
    .flip-btn-container {
        font-size: 20px;
        padding: 10px;
    }

    .flip-btn-container button {
        padding: 5px 10px;
        font-size: 20px;
        margin-top: 10px;
    }

    .player-time {
        width: 120px;
        height: 50px;
        font-size: 24px;
    }
}

@media only screen and (orientation:portrait) and (max-width:415px) {
    li {
        width: 45px;
        height: 45px;
    }
}

@media only screen and (orientation:portrait) and (max-width:375px) {
    li {
        width: 40px;
        height: 40px;
    }
}

@media only screen and (max-width:600px) {
    .winner-screen {
        padding: 70px 80px;
        height: 180px;
        width: 50vw;
        font-size: 10px;
    }

    .winner-screen-container p {
        font-size: 25px;
        margin: 0;
    }

    .winner-name {
        font-size: 30px;
        font-weight: 600;
    }

    .rematch {
        display: flex;
        padding-bottom: 20px;
    }
}