@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');

body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
}

#container {
    text-align: center; /* Center the content */
    align-items: center;
    top: 50vw;
}

#board {
    width: 20vw; /* 20% of the viewport width */
    height: 20vw; /* 20% of the viewport width */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 1fr takes up equal space */
    grid-template-rows: repeat(3, 1fr); /* 1fr takes up equal space */
    gap: 5px; /* Adjust the gap as needed */
    max-width: 400px;
    min-width: 343px;
    max-height: 400px;
    min-height: 343px;
    /* Decorations */

    border: 5px solid;
    padding: 10px;
    border-radius: 20px;
    box-shadow: black 3px 3px 7px;

    margin-left: 600px;
}

.cell {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 2px solid #000;
    text-align: center;
    padding: 10px;
    font-size: 78px;
    opacity: 1;
    transition: opacity 0.5s;
    height: 6.4vw;
    max-width: 125px;
    max-height: 125px;
    min-width: 111px;
    min-height: 111px;
}

.cell:empty {
    opacity: 0.5;
}

.cell:hover:empty {
    opacity: 1;
}

#Overlay {
    opacity: 0.8;
    background-color: gray;
    position: fixed;
    width: 200%;
    height: 200%;
}

#Start, #Back {
    position: absolute;
    font-size: 2vw;
    cursor: pointer;
    margin-right: 25%;
    border-radius: 0.4vw;
    border: white 1px solid;
    top: 45.5%;
    width: 5vw;
    overflow: hidden;
    background-color: whitesmoke;
    box-shadow: rgb(0, 0, 0) 3px 3px 7px;
}
#Back {
    margin-top: 75px;
}
#restart, #back2 {
    border-radius: 0.4vw;
    height: 60px;
    font-size: 50px;
    text-align: center;
    border: white 1px solid;
    background-color: whitesmoke;
    box-shadow: rgb(0, 0, 0) 3px 3px 7px;
    cursor: pointer;
}

#res-back-container {
    position: absolute;
    width: 99%;
    display: none;
    align-content: center;
    justify-content: space-between; /* This creates space between the elements */
    top: 92%;
}
.startMenu {
    display: block;
}

#winner {
    position: fixed;
    align-self: center;
    top: 0%;
}

@media screen and (max-width: 700px) {
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 70vh;
    }
    
    #board {
        width: 50vw; /* 20% of the viewport width */
        height: 50vw; /* 20% of the viewport width */
    }
    
    .cell {
        height: 16vw;
        font-size: 78px;
    }
    #Start, #Back {
        position: absolute;
        font-size: 10vw;
        margin-right: 34%;
        top: 41.2%;
        width: 23.2vw;
        overflow: hidden;
        border-radius: 2vw;
    }
    #restart, #back2 {
        border-radius: 3vw;
    }
    #res-back-container {
        width: 98%;
    }
}
@media screen and (max-height: 600px) {
    #res-back-container {
        top: 89%;
    }
    #container {
        position: absolute;
        top: 100px;
    }
}