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

html {
  font-family: sans-serif;
  background-color: #fffff2;
  text-align: center;
}

body {
  width: 950px;
  background-color: #ffffe4;
  margin: 20px auto;
  border: 2px solid #777;
  border-radius: 15px;
  padding: 30px;
}

.game {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.grid-lines {
  position: relative;
}

.data {
  border-right: 1px solid black;
  padding: 30px 50px 30px 0;
  width: 350px;
}

.TTT-grid {
  display: table;
  border-top: 5px;
  border-bottom: 5px;
  border-top-color: red;
  border-bottom-color: red;
  height: 450px;
  width: 450px;
  margin: 0 auto;
  margin-top: 15px;
  margin-bottom: 15px;
}

.row {
  display: table-row;
  border-top: 10px;
  border-bottom: 10px;
  border-top-color: red;
  border-bottom-color: red;
}

.spot {
  border: 1px solid black;
  display: table-cell;
  width: 150px;
  height: 150px;
}

.spot[id='0'] {
  border: none;
}

.spot[id='1'] {
  border-top: none;
  border-bottom: none;
}

.spot[id='2'] {
  border: none;
}

.spot[id='3'] {
  border-left: none;
  border-right: none;
}

.spot[id='5'] {
  border-right: none;
  border-left: none;
}

.spot[id='6'] {
  border: none;
}

.spot[id='7'] {
  border-bottom: none;
  border-top: none;
}

.spot[id='8'] {
  border: none;
}

span {
  display: none;
  text-align: center;
  font-size: 100px;
  margin-top: 22%;
}

p {
  font-size: 50px;
  text-align: center;
}

.x-wins {
  margin-top: 10px;
}

.win-line {
  position: absolute;
  display: none;
  width: 450px;
  border: 3px solid #000a;
}

.one {
  top: 95px;
  right: 0px;
}
.two {
  top: 240px;
  right: 0px;
}
.three {
  top: 390px;
  right: 0px;
}
.four {
  transform: rotate(0.25turn);
  top: 239px;
  right: 150px;
}
.five {
  transform: rotate(0.25turn);
  top: 239px;
  right: 0px;
}
.six {
  transform: rotate(0.25turn);
  top: 239px;
  right: -150px;
}
.seven {
  width: 600px;
  transform: rotate(0.125turn);
  top: 235px;
  right: -72px;
}
.eight {
  width: 600px;
  transform: rotate(-0.125turn);
  top: 235px;
  left: -72px;
}

button {
  font-size: 30px;
  padding: 10px 30px;
  border-radius: 10px;
  border: 2px solid black;
  background-color: #fffff2;
}

#reset-button, #change-mode {
  display: none;
}

/*Styles for mobile gaming*/
@media only screen and (max-width: 500px) {
  body {
    width: auto;
    margin: 5px;
    padding: 10px;
  }
  p {
    font-size: 35px;
  }
  .data {
    padding: 0;
  }
  .game {
    flex-direction:  column;
    width: 350px;
    margin: 0 auto;
  }
  .data {
    width: auto;
    border: none;
  }
  .mode-select {
    display: flex;
    flex-direction: column;
  }
  .TTT-grid {
    width: 300px;
    height: 300px;
    margin: 20px auto;
  }
  .spot {
    width: 33%;
    height: 33%;
  }
  span {
    font-size: 80px;
    margin-top: 15%;
  }
  .win-line {
    display: none;
  }
}
