*,
::before,
::after {
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: goldenrod;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: antiquewhite;
}

.game {
  width: 100%;
  height: 100vh;
  display: grid;
  gap: 1rem;
  place-content: center;
}

.game__board {
  position: relative;
  width: 300px;
  height: 300px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  /* agrega 3 cols */
  grid-template-rows: 1fr 1fr 1fr;
  /* agrega 3 rows */
}

.game__turn {
  font-size: 2rem;
}

.score__board {
  position: relative;
  width: auto;
  height: 200px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  /* agrega 6 cols */
  grid-template-rows: 1fr 1fr;
  /* agrega 2 rows */
}

.winning-line {
  position: absolute;
  height: 4px;
  background-color: red;
  z-index: 2;
  /* Asegúrate de que la línea esté encima del tablero pero debajo del mensaje final */
  pointer-events: none;
  /* Evita que la línea interfiera con los clics */
}

.cell {
  width: 100%;
  height: 100%;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  /*crea un área dentro de la celda para crear la O o la X para el juego
    usando las definiciones siguientes para las clases .circle y .cross*/
  grid-template-areas: "draw";
}

.cross::after {
  content: "";
  grid-area: draw;
  display: block;
  width: 10px;
  height: 70px;
  background-color: white;
  transform: rotate(45deg);
  border-radius: 10px;
  animation: show-reverse 0.3s;
  /*llama al keyframe para animar*/
}

.cross::before {
  content: "";
  grid-area: draw;
  display: block;
  width: 10px;
  height: 70px;
  background-color: white;
  transform: rotate(-45deg);
  border-radius: 10px;
  animation: show 0.3s;
  /*llama al keyframe para animar*/
}

.circle::after {
  content: "";
  grid-area: draw;
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 10px solid white;
  animation: show 0.3s;
  /*llama al keyframe para animar*/
}

@keyframes show {
  0% {
    transform: scale(0) rotate(-45deg);
  }

  100% {
    transform: scale(1) rotate(-45deg);
  }
}

@keyframes show-reverse {
  0% {
    transform: scale(0) rotate(45deg);
  }

  100% {
    transform: scale(1) rotate(45deg);
  }
}

.endgame__section {
  background-color: #000000bc;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: grid;
  place-content: center;
  z-index: 10;
}

.endgame__show {
  display: grid;
  gap: 1rem;
  text-align: center;
}

.endgame__button,
.reset_game__button {
  background-color: dodgerblue;
  font-weight: bold;
  color: white;
  padding: 1rem 2rem;
  margin: 0 auto;
  width: max-content;
  border: none;
  border-radius: 100px;
}

.show {
  opacity: 1;
  pointer-events: unset;
}

/* Estilo para la tabla */
.tabla-gato {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  text-align: center;
}

.tabla-gato-titulo {
  font-weight: bold;
  font-size: 20px;
  padding: 10px;
}

.tabla-gato-jugador {
  font-weight: bold;
  padding: 10px;
  border: 1px solid #ddd;
}

.tabla-gato-puntaje {
  padding: 10px;
  border: 1px solid #ddd;
}

/*  */
form {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

label {
  margin-right: 10px;
  /* Espacio entre el label y el input */
}

input {
  flex: 1;
  /* Hace que el input ocupe el espacio restante */
  max-width: 200px;
  /* Puedes ajustar el tamaño máximo del input si lo deseas */
}
