body {
  font-family: "Courier New", Courier, monospace;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #dfdfdf;
}
header {
  background-color: black;
  color: white;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
#game-container {
  display: flex;
  background-color: #dfdfdf;
  justify-content: center;
  padding: 15px;
  align-items: center;
}
#container {
  display: grid;
  background-color: white;
  padding: 20px;
  grid-template-rows: repeat(3, 180px);
  grid-template-columns: repeat(3, 180px);
  border-radius: 15px;
  margin: 50px;
}
#box1,
#box2,
#box3,
#box4,
#box5,
#box6,
#box7,
#box8,
#box9 {
  border: 2px solid #bcbcbc;
  font-size: 180px;
  font-weight: bold;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.hover:hover {
  background-color: rgb(159, 159, 159);
}
#box1,
#box2,
#box3 {
  border-top: 0;
}
#box1,
#box4,
#box7 {
  border-left: 0;
}
#box7,
#box8,
#box9 {
  border-bottom: 0;
}
#box3,
#box6,
#box9 {
  border-right: 0;
}
.game-info {
  display: flex;
  font-size: 20px;
  min-height: 400px;
  gap: 30px;
  background-color: white;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  margin: 50px;
  border-radius: 15px;
}
.reset-btn {
  display: flex;
  gap: 10px;
}
#board {
  position: absolute;
  color: white;
  min-width: 40%;
  min-height: 300px;
  background-color: black;
  font-size: 30px;
  font-weight: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  padding: 20px;
  visibility: hidden;
}
#top {
  background-color: white;
  color: black;
  padding: 10px;
}
#bottom {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
}
#cross img {
  position: absolute;
  background-color: black;
  cursor: pointer;
  width: 5%;
  top: 0;
  right: 0;
  padding: 10px;
}
#prescoreX,
#prescoreO,
#prescoreTie,
#roundTime {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
#preX span {
  color: white;
}
#preO span {
  color: white;
}
#preTie span {
  color: white;
}
#reset_pre_score {
  padding: 5px 10px;
  font-size: 20px;
  border-radius: 10px;
  margin-top: 20px;
}
#reset_pre_score:hover {
  background-color: black;
  color: rgb(209, 209, 209);
  border: 2px solid silver;
}

.welcome {
  display: flex;
  gap: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.welcome h2 {
  background-color: black;
  font-size: 20px;
  color: white;
  padding: 5px 50px;
}
.score-board {
  display: flex;
  gap: 30px;
}
h1,
h2,
h3 {
  margin: 0;
}
.player-X,
.player-O,
.tie {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  /* font-size: 0px; */
  font-weight: bold;
  font-size: 30px;
}
#score-X,
#score-O,
#score-tie {
  border: 1px solid black;
  background-color: rgb(209, 209, 209);
  padding: 10px;
  font-size: 25px;
  font-weight: bolder;
}
#reset,
#View_previous {
  padding: 5px 15px;
  font-weight: 600;
  font-size: 15px;
  background-color: black;
  color: white;
}

#reset:hover {
  background-color: rgb(209, 209, 209);
  color: black;
  border: 2px solid silver;
}
#View_previous:hover {
  background-color: rgb(209, 209, 209);
  color: black;
  border: 2px solid silver;
}

/* //enter name css */

#popup {
  position: absolute;

  background-color: black;

  padding: 30px;
  border-radius: 20px;
  font-size: 20px;
}
.input {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  gap: 20px;
}
.input input {
  padding: 8px 20px;
  font-size: 20px;
  border-radius: 10px;
  border: none;
}
.input button {
  padding: 5px 10px;
  font-size: 20px;
  border-radius: 10px;
  margin-top: 20px;
}
#submit-name:hover {
  background-color: black;
  color: rgb(209, 209, 209);
  border: 2px solid silver;
}
#timer {
  background-color: black;
  color: white;
  padding: 5px 10px;
  font-weight: bold;
}

/* .
.
. */
.if {
  position: absolute;
}

/* media query */
@media only screen and (max-width: 1000px) {
  #game-container {
    flex-direction: column;
  }
}
@media only screen and (max-width: 700px) {
  #container {
    /* padding: 20px; */
    grid-template-rows: repeat(3, 100px);
    grid-template-columns: repeat(3, 100px);
    margin: 10px;
  }
  .game-info {
    margin: 10px;
  }
  #board {
    font-size: 20px;
  }
  #box1,
  #box2,
  #box3,
  #box4,
  #box5,
  #box6,
  #box7,
  #box8,
  #box9 {
    font-size: 90px;
  }
}
@media only screen and (max-width: 500px) {
  #container {
    /* padding: 20px; */
    grid-template-rows: repeat(3, 80px);
    grid-template-columns: repeat(3, 80px);
    margin: 10px;
  }
  .game-info {
    margin: 10px;
    font-size: 20px;
    gap: 10px;
    padding: 0px 28px;
  }
  .game-info h2 {
    font-size: 15px;
    padding: 5px 10px;
  }
  #board {
    font-size: 15px;
    min-height: 200px;
  }

  #box1,
  #box2,
  #box3,
  #box4,
  #box5,
  #box6,
  #box7,
  #box8,
  #box9 {
    font-size: 70px;
  }
  #popup {
    top: 100px;
  }
  #board {
    top: 200px;
  }
  #reset,
  #View_previous {
    font-size: 10px;
    margin-top: 15px;
  }
}
