html{
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    background-color: #eee;
    font-family: inter, sans-serif;
}

*, *:before, *:after {
    box-sizing: inherit;
    -webkit-box-sizing: inherit;
    -moz-box-sizing: inherit;    
}

body{
    display: grid;
    justify-content: center;
    align-items: center;
    height: 95vh;
    text-align: center;
}

.board{
    display: grid;
    grid-template-columns: repeat(3, auto);
    margin: 30px auto 40px auto;
}

.square{
    width: 100px;
    height: 100px;
    border: 2px solid black;
    transition: 0.2s ease-out;
    cursor: pointer;
    position: relative;
}

.square:hover{
    background-color: rgb(227, 227, 227);
}

.gameOver .square:hover,
.square.X:hover,
.square.O:hover {
  background-color: inherit;
  cursor: default;
}

/* display outline and foreground overlapping and center contents */

.square .outline {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 100px;
  }
  
  .square .foreground {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 100px;
  }
  
  .square.X .outline:before {
    content: "";
    background: #1a1a1a;
    width: 14px;
    height: 58px;
    position: absolute;
    transform: rotate(45deg);
    z-index: 2;
  }
  
  .square.X .outline:after {
    content: "";
    background: #1a1a1a;
    width: 14px;
    height: 58px;
    position: absolute;
    transform: rotate(-45deg);
    z-index: 2;
  }
  
  .square.X .foreground:before {
    content: "";
    background: #f03a17;
    width: 8px;
    height: 52px;
    position: absolute;
    transform: rotate(45deg);
    z-index: 3;
  }
  
  .square.X .foreground:after {
    content: "";
    background: #f03a17;
    width: 8px;
    height: 52px;
    position: absolute;
    transform: rotate(-45deg);
    z-index: 3;
  }

  .square.O .outline:before {
    content: "";
    background: transparent;
    width: 58px;
    height: 58px;
    position: absolute;
    border-radius: 50%;
    border: 14px solid #1a1a1a;
    z-index: 2;
  }
  
  .square.O .foreground:after {
    content: "";
    background: transparent;
    width: 52px;
    height: 52px;
    position: absolute;
    border-radius: 50%;
    border: 8px solid #0082a5;
    z-index: 3;
  }
  
  /* hide outer borders of the squares */
  
  .square:nth-of-type(1),
  .square:nth-of-type(2),
  .square:nth-of-type(3) {
    border-top: none;
  }
  
  .square:nth-of-type(1),
  .square:nth-of-type(4),
  .square:nth-of-type(7) {
    border-left: none;
  }
  
  .square:nth-of-type(3),
  .square:nth-of-type(6),
  .square:nth-of-type(9) {
    border-right: none;
  }
  
  .square:nth-of-type(7),
  .square:nth-of-type(8),
  .square:nth-of-type(9) {
    border-bottom: none;
  }

button{
    background-color: #E05B49;
    border: none;
    color: #fefefe;
    padding: 10px;
    border-radius: .4em;
    box-shadow: 2px 2px 5px rgba(0, 0, 0,.16);
    transition: all 0.3s ease-in-out;
}

button:hover{
    background-color: #c85141;
    box-shadow: 3.5px 3.5px 5.5px rgba(0, 0, 0,.16)
}