body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: rgb(24, 24, 24);
  --text-orange-200: rgb(255, 204, 137);
  --text-orange-300: rgb(255, 181, 85);
  --text-orange-500: rgb(204, 116, 0);
  --text-orange-900: rgb(149, 84, 0);
  --text-black: rgb(19,19,19);
  margin: 0;
  padding: 0;
}
header {
  text-align: center;
  color: var(--text-black);
  background-color: var(--text-orange-200);
  margin: 0;
}
header p {
  font-size: 1rem;
  padding-bottom: 1rem;
}
header h1 {
  margin-top: 0;
  padding: 2rem;
}
main, footer {
  display: flex;
  flex-direction: column;
  align-items: center;
}
main button {
  background-color: var(--text-orange-500);
  border: none;
  border-radius: 5px;
  padding: 0.5rem 2rem;
  font-size: 1.1rem;
  margin: 1rem auto;
}
section.player {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  background-color: antiquewhite;
  border-radius: 5px;
  width: 50vw;
  padding: 1rem;
  margin: 1rem auto;
}
section span {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.5rem;
  color: var(--text-orange-900);
  text-align: center;
}
.player button {
  color: var(--text-orange-900);
  background-color: transparent;
}
span.player-tag-X {
  margin: 2rem;
  font-size: 2rem;
  color: rgb(19, 19, 19);
}
span.player-tag-O {
  margin: 2rem;
  font-size: 2rem;
  color: rgb(19, 19, 19);
}
main button:hover {
  background-color: var(--text-orange-300);
  box-shadow: 0 0 3px rgb(87, 87, 87);
  color: var(--text-black);
}
.control {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
}
#overlay {
  /* test smooth transition on visibility */
  z-index: 2;
  visibility: hidden; 
  background-color: whitesmoke;
  position: fixed;
  text-align: center;
  top: 20vh;
  left: 10%;
  right: 10%;
  border-radius: 5px;
  filter: initial !important;
}
#overlay label, #overlay input {
  display: block;
  margin: 0.5rem auto;
}
#overlay input {
  border: 1px solid grey;
  border-radius: 1px;
  padding: 0.3rem;
  max-width: 8rem;
  font-family: Arial, Helvetica, sans-serif;
}
#overlay label {
  font-weight: 700;
}
#cancel-name {
  background-color: transparent;
  color: var(--text-orange);
}
#overlay-background {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  visibility: hidden;
  background-color: rgba(19,19,19,0.4);
}

#win-award {
  display: none;
  text-align: center;
  width: 100%; /* overwriting width from section */
  max-width: 40rem; /* actual setting of custom width */
  padding: 3rem 0;
  background-color: var(--text-orange-300);
  font-size: 2rem;
  color: var(--text-black);
}
#win-award span {
  text-transform: capitalize;
  padding: 2rem 0;
}
#turn-notice {
  display: none;
  font-size: 1.3rem;
  color: var(--text-orange-300);
  text-align: center;
}
#game {
  /* for inner line crossing fields */
  position: relative; 
  margin: 2rem auto;
  background-color: transparent;
  width: 27rem;
  height: 27rem;
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  row-gap: 1rem;
  column-gap: 1rem;
  padding: 0;
}
#game span {
  background-color: rgb(251, 212, 160);
  color: var(--text-black);
  border-radius: 6px;
  width: 8rem;
  height: 8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
#game span:hover {
  background-color: var(--text-orange-900);
}
main > button {
  display: none;
}
footer {
  text-align: center;
  color: var(--text-orange-300);
  position: relative;
  z-index: 0;
}
footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
@media only screen and (min-width: 320px){
  #game {
    width: 14rem;
    height: 14rem;
  }
  #game span {
    width: 4rem;
    height: 4rem;
  }
  .player span.player-tag-O {
    margin: 1rem;
  }
  .player span.player-tag-X {
    margin: 1rem;
  }
  .player h3 {
    margin-top: 0.2rem;
  }
}
@media only screen and (min-width: 720px) {
  #overlay {
    left: 18%;
    right: 18%;
  }
  #game {
    width: 20rem;
    height: 20rem;
  }
  #game span {
    width: 6rem;
    height: 6rem;
  }
  .player span.player-tag-O {
    margin: 2rem;
  }
  .player span.player-tag-X {
    margin: 2rem;
  }
  .player h3 {
    margin-top: 1rem;
  }
}
@media only screen and (min-width: 1080px)  {
  .control {
    display: flex;
    flex-flow: row nowrap;
    gap: 1rem;
    justify-content: center;
  }
  section.player {
    width: 30vw;
    margin: 1rem 0;
  }
  #overlay {
    left: 25%;
    right: 25%;
  }
  #overlay input {
    width: 17rem;
  }
  #game {
    width: 28rem;
    height: 28rem;
  }
  #game span {
    width: 8rem;
    height: 8rem;
  }
}