@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  list-style: none;
  font-family: "Montserrat", sans-serif;
}

@media only screen and (max-width: 576px) {
  body {
    /* Adjust body styles for smaller screens */
    font-size: 14px;
    background-color: #f5f5f5;
    padding: 10px;
  }

  main {
    /* Adjust main styles for smaller screens */
    width: 90%;
    height: auto;
    padding: 7%;
  }

  /* Add additional styles or override existing styles as needed */

  .top {
    padding: 0 25px;
  }

  .top > * {
    width: 100px;
  }

  .top > div .fa-x,
  .fa-x,
  .top > div .fa-o,
  .fa-o {
    font-size: 24px;
  }

  h3 {
    font-size: 16px;
    padding: 3px 12px;
  }

  .middle ul {
    height: 400px;
  }

  .middle > ul li {
    width: 100px;
    height: 100px;
    font-size: 2rem;
  }

  .bottom ul li {
    width: 100px;
    height: 50px;
    font-size: 14px;
  }

  .restart-after-win {
    padding: 1.5rem 2rem;
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  background-color: #1a2a32;
  display: grid;
  /* place-content: center;: This property aligns the content within the grid container both horizontally and vertically, placing it in the center of the grid. It is a shorthand property that combines the justify-content and align-content properties.  */
  place-content: center;
}

main {
  width: 550px;
  height: 600px;
  position: relative;
  z-index: 1;
}

/* Top area */

/* The given CSS code applies styles to all immediate child elements (*) of the elements with a class of "top" (top > *) */

.top > * {
  width: 130px;
  display: flex;
  justify-content: center;
}

.top {
  height: 50px;
  padding: 0 45px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.top > div .fa-x,
.fa-x {
  color: #05ece5;
  padding-right: 5px;
  font-size: 30px;
}

.top > div .fa-o,
.fa-o {
  color: #f72630;
  font-size: 30px;
}

h3 {
  color: #25d4cf;
  padding: 5px 20px;
  border: none;
  background-color: #063f63;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.clearScore {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;

  color: rgb(7, 7, 7);
  background-color: #61aed4;
  font-weight: 700;
  font-size: 15px;
}

.clearScore:hover {
  cursor: pointer;
  background-color: #54bb90;
}

/* middle area */

.middle {
  width: 100%;
}

.middle ul {
  background-color: rgb(90, 90, 95);
  width: 100%;
  height: 500px;
  padding: 20px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
}

.middle > ul li {
  width: 130px;
  height: 130px;
  border-radius: 10px;
  background-color: #2e4756;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

/* bottom area */

.bottom {
  width: 100%;
  height: 50px;
  margin: 7px 0 5px 0;
}

.bottom ul {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 20px 0 20px;
}

.bottom ul li {
  width: 130px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.player-one-score {
  background-color: #2a5388;
  font-size: 20px;
}

.tie-score {
  background-color: lightgrey;
  font-size: 20px;
}

.player-two-score {
  background-color: #3ead92;
  font-size: 20px;
}

/* winner area */
.winner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  font-size: 2rem;
  z-index: 5;
  background-color: #1a2a3278;
}

.restart-after-win {
  padding: 2rem 3rem;
  border-radius: 20px;
  font-size: 20px;
  background-color: #2e4756;
}

.restart-after-win:hover {
  cursor: pointer;
}

.winner.show-winner {
  visibility: hidden;
}
