* {
    box-sizing: border-box;
}

body {
    font-family: arial, helvetica, sans-serif;
    text-align: center;
    background-color: rgba(207, 207, 207, 1);
    display: grid;
    grid-template-rows: 1fr 4fr;
    grid-template-columns: 1 fr 4fr;
}

#left-head {
    grid-row: 1;
    grid-column: 1;
    background-color: #D64933;
    border-radius: 20px;
}

h1 {
    color: black;
    font-size: 50px;
    margin: 1px;
    font-style: 'teko', sans-serif;
    padding-top:  25px;
}

h3 {
   font-size: 20px;
   margin: -2px;
}

.start {
    margin: 40px;
    border-radius: 20px;
    background-color: rgba(207, 207, 207, 1);
    color: black;
    font-size: 30px;
    line-height: 50px;
    cursor: pointer;
}

h6 {
    font-size: 50px;
    text-indent: 70px;
    grid-row: 2;
    grid-column: 2;
    font-family: sans-serif;
    font-style: italic;
}

.start:hover {
    color: #1C77C3;
}

.reset {
    margin: 38px;
    border-radius: 20px;
    background-color: rgba(207, 207, 207, 1);
    color: black;
    font-size: 30px;
    line-height: 50px;
    cursor: pointer;
    margin-top: 80px;
}

.reset:hover {
    color: #1C77C3;
}

.timer{
    margin: 10px;
    font-weight: bold;
    font-size: 30px;
    color: black;
}

.flips{
    margin: 50px;
    font-size: 30px;
    color: black;
}

.gameboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8%;
}

#cell {
    width: 18%;
    height: 95px;
    display: flex;
    justify-content: center; 
    align-items: center;
    font-size: 35px; 
    border-radius: 10%;
    border: 3px solid white;
    background-color: #1C77C3;
    grid-column: 2 span;
    grid-row: 2 span;
    color: white;
    cursor: pointer;
    transition: 0.5s all ease;
}

#cell:hover {
    background-color: #D64933;
    transform: scale(1.03);
}

#cell:active {
    transform: rotateY(180deg);
    perspective: 1000px;
    transform-style: preserve-3d;
}

#gameboard-wrapper {
    justify-content: center;
    width: 90%;
    grid-row: 1;
    grid-column: 3;
    height : 25%;
    padding: 40px; 
}

.start:focus {
    color: yellow;
}

.reset:focus {
    color: yellow;
}

.flips-box {
    height: 90px;
    width: 90px;
    background-color: black;
    font-size: 80px;
    margin-left: 102px;
    margin-top: -50px;
    border-radius: 20px;
    color: white;
}

  @media (max-width: 844px) {
    #cell, #left-head {
      width: 100%;
    }
  }

  .box_zero, .box_one, .box_two, .box_three, .box_four, .box_five, .box_six, .box_seven, .box_eight, .box_nine, .box_ten, .box_eleven, .box_twelve, .box_thirteen, .box_fourteen, .box_fifteen {
    text-indent: 2000%;
    white-space: no wrap;
    overflow: hidden;
}

#cell.box_zero.flip, #cell.box_one.flip, #cell.box_two.flip, #cell.box_three.flip, #cell.box_four.flip, #cell.box_five.flip, #cell.box_six.flip, #cell.box_seven.flip, #cell.box_eight.flip, #cell.box_nine.flip, #cell.box_ten.flip, #cell.box_eleven.flip, #cell.box_twelve.flip, #cell.box_thirteen.flip, #cell.box_fourteen.flip, #cell.box_fifteen.flip {
    background-color: lightgreen;
}

@media only screen and (max-width: 844px) {
    #left-head {
        width: 375px;
        height: 300px;
    }

    h1 {
        font-size: 20px;
    }

    .gameboard {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
        padding: none;
        margin: 0 0 0 10px;
        justify-content: center;
    }
    
    body {
        font-family: arial, helvetica, sans-serif;
        text-align: center;
        background-color: rgba(207, 207, 207, 1);
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 500px;
    }

    .start {
        margin: 40px;
        border-radius: 20px;
        background-color: rgba(207, 207, 207, 1);
        color: black;
        font-size: 15px;
        line-height: 30px;
        cursor: pointer;
    }

    button.reset {
        border-radius: 20px;
        background-color: rgba(207, 207, 207, 1);
        color: black;
        font-size: 15px;
        line-height: 30px;
        cursor: pointer;
        margin-top: 10px;
    }

    .flips{
        margin: -10px 0 10px 0;
        font-size: 15px;
        color: black;
    }

    .flips-box {
        height: 40px;
        width: 40px;
        background-color: black;
        font-size: 30px;
        border-radius: 0;
        color: white;
    }

    .flips-title {
        margin-left: 20px;

    }

    .reset {
        border-radius: 20px;
        background-color: rgba(207, 207, 207, 1);
        color: black;
        font-size: 20px;
        line-height: 50px;
        cursor: pointer;
    }

    h6 {
        font-size: 16px!important;
        color: blue;
        text-indent: 10px;
        grid-row: 2;
        grid-column: 2;
        margin-top: -110px;
        margin-right: 40px;
        font-family: sans-serif;
        font-style: italic;
    }

    #cell {
        text-indent: 2000%;
        white-space: no wrap;
        overflow: hidden;
        width: 73px;
        width: 73px;
    }
}