@import url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Basic&display=swap');

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

:root {
  font-size: 62.5%;
  --pri-color: #556844;
  --sec-color: #65a037;
  --natural-color-1: #f3fcea;
  --natural-color-2: #f6edd9;
  --tittle-font: 'Lilita One', cursive;
  --text-font: 'Basic', sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-size: 1.6rem;
  background-color: var(--pri-color);

  overflow: overlay;
}

header {
  padding-block: 5rem;
}

header .header-div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

header img {
  width: 5rem;
}

header h1 {
  text-align: center;
  font-family: var(--text-font);
  font-size: 5rem;
  color: var(--natural-color-1);
  text-transform: uppercase;
}

.wrapper {
  width: min(50rem, 100%);
  margin-left: auto;
  margin-right: auto;

  padding-inline: 1.5rem;

  /* background-color: aquamarine; */
}
/* ----------------------------------------- */

#gameconfigs .playerview {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

#gameconfigs .playerview .playertag {
  width: 50%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;

  padding-bottom: 1rem;
}
#gameconfigs .playerview .playertag img {
  width: 3rem;
}

input[type='text']:focus {
  outline: none;
}
#gameconfigs .playerview input[type='text'] {
  width: 100%;
  height: 3rem;

  background-color: var(--pri-color);

  border: none;
  border-bottom: 0.2rem solid var(--sec-color);

  text-align: center;
  font-size: 3rem;
  font-family: var(--text-font);
  line-height: 100%;
  color: var(--natural-color-2);

  padding-inline: 0.5rem;

  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;

  overflow: hidden;
}

#gameconfigs .controls {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 2rem;
}

#gameconfigs .controls input[type='button'] {
  padding-inline: 5rem;
  border: 0.5rem solid transparent;
  border-radius: 0.5rem;
  background-color: var(--natural-color-1);

  padding-block: 0.5rem;

  font-size: 1.6rem;
  font-family: var(--text-font);
  color: var(--pri-color);

  transition: all 0.2s;
}
#gameconfigs .controls input[type='button']:hover {
  padding-inline: 6rem;
}

/* ------------------- */
#game {
  padding-block: 0.5rem;
}

#game .stage {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  gap: 0.5rem;
}

#game .stage .row {
  width: 100%;

  display: flex;
  justify-content: center;

  gap: 0.5rem;
}

#game .stage .row .square {
  width: 5rem;
  height: 5rem;

  padding: 5rem;

  background-color: var(--sec-color);

  transition: transform 0.2s;
}
#game .stage .row .square:hover {
  transform: scale(1.1);
  box-shadow: 0px 0px 2px 1px var(--pri-color);
}

/* ------------------- */

.player1 {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background-image: url('../assets/icon-x.png');
  background-repeat: no-repeat;
  background-size: 6rem;
  background-position: center;

  opacity: 1;
}
/* .player1::after {
  content: 'X';
  font-size: 2rem;
  line-height: 5rem;
} */

.player2 {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background-image: url('../assets/icon-o.png');
  background-repeat: no-repeat;
  background-size: 6rem;
  background-position: center;
}
/* .player2::after {
  content: 'O';
  font-size: 2rem;
  line-height: 5rem;
} */

/* ----------------------- */

#game .playertime {
  padding-block: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game .playertime span {
  text-align: center;
  font-size: 1.6rem;
  line-height: 100%;
  font-family: var(--text-font);
  color: var(--natural-color-2);
}

#game .playerplacar {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;

  padding-block: 2rem;
}

#game .playerplacar .pplacar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

#game .playerplacar .pplacar span {
  font-size: 1.6rem;
  font-family: var(--text-font);
  line-height: 100%;
  color: var(--natural-color-2);
}

#game .playerplacar .pplacar #p1placar,
#game .playerplacar .pplacar #p2placar {
  font-size: 3rem;
  color: var(--sec-color);
}

/* ------- */

.win-message {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 5rem;

  background-color: rgba(0, 0, 0, 0.9);

  animation-duration: 1s;
  animation-fill-mode: forwards;

  animation-timing-function: ease-out;
}

#winMessageText {
  background-color: var(--natural-color-1);
  padding-block: 5rem;
  padding-inline: 8rem;
  border-radius: 5px;

  font-size: 2rem;
  font-family: var(--text-font);
  line-height: 100%;
}

#btnReinicia {
  background-color: var(--natural-color-2);
  font-size: 1.6rem;
  font-family: var(--text-font);
  color: var(--pri-color);
  border: 1px solid transparent;
  border-radius: 2px;

  padding-block: 1.5rem;
  padding-inline: 4rem;

  transition: transform 0.2s;
}
#btnReinicia:hover {
  transform: scale(1.1);
}

.show {
  display: flex;
}

@keyframes moveElem {
  0% {
    top: 100vh;
    height: 0;
  }
  100% {
    top: 0;
    height: 100vh;
  }
}
