/* Variavés de cor */
:root {
  --branco: #ffffff;
  --cinza-escuro: #555555;

  --preto: #000000;
  --preto-suave: #222222;

  --verde-limao: #2ecc71;
  --verde-limao-hover: #27ae60;

  --vitoria: #a3e4d7;
  --empate: #f9e79f;
  --derrota: #f5b7b1;

  --pedra: #7f8c8d;
  --papel: #5dade2;
  --tesoura: #e74c3c;
}

/* Configuração de normalização dos navegadores */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
}

body {
  overflow: hidden;
}

main {
  position: relative;
}

/* CSS da Section (Iniciar) */
section#iniciar {
  background: radial-gradient(#dbdde0 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: radial-gradient(
    ellipse 50% 50% 50% 50%,
    #000 70%,
    transparent 100%
  );
  height: 100dvh;
  width: 100dvw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  transition: transform 1s ease, opacity 1s ease;
  overflow: hidden;
}
/* CSS da Section (Iniciar) HIDEN SAIR DA TELA */
section#iniciar.hiden {
  transform: translateY(-2000px);
  opacity: 0;
}

section#iniciar i {
  font-size: clamp(1.5rem, 2vw, 1.75rem);
}

/*Section(inicio) > (Links)*/
section#iniciar .links {
  position: absolute;
  top: 10px;
  right: 10px;
}
section#iniciar .links a {
  color: var(--preto-suave);
  padding: 5px;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  transition: color 0.4s;
}
section#iniciar .links a:hover {
  color: var(--cinza-escuro);
}

/*Section(inicio) > (Container)*/
section#iniciar .container {
  text-align: center;
}
section#iniciar .container h1 {
  color: var(--preto-suave);
  font-size: clamp(1.5rem, 4vw, 3rem);
}
section#iniciar .container p {
  color: var(--cinza-escuro);
  font-size: clamp(0.75rem, 2vw, 1.5rem);
}
section#iniciar .container button {
  background-color: var(--verde-limao);
  color: var(--preto);
  margin-top: 2rem;
  height: 2.5rem;
  min-width: 65%;
  font-weight: 700;
  border: 2px solid var(--preto);
  cursor: pointer;
  animation: pulse 2s infinite linear;
}
section#iniciar .container button:hover {
  background-color: var(--verde-limao-hover);
  color: var(--preto-suave);
  border: 2px solid var(--preto-suave);
}
/* Key frame do Botão */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
  100% {
    transform: scale(1);
  }
}

/*Section(inicio) > (config)*/
section#iniciar .config {
  position: absolute;
  left: 10px;
  bottom: 10px;
  cursor: pointer;
}
section#iniciar .config button {
  background-color: transparent;
  color: var(--preto-suave);
  padding: 5px;
  all: unset;
  transition: color 0.4s;
}
section#iniciar .config button:hover {
  color: var(--cinza-escuro);
}

/* CSS da Section > (Jogo) */
section#jogo {
  background: linear-gradient(to right, #f0f0f0 1px, transparent 1px),
    linear-gradient(to bottom, #f0f0f0 1px, transparent 1px);
  background-size: 6rem 4rem;
  margin: 0 auto;
  padding: 10px;
  height: 100vh;
  max-height: 1536px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  top: 0;
  transform: translateY(2000px);
  opacity: 0;
  overflow: hidden;
  transition: transform 1s ease, opacity 1s ease;
}
/* CSS da Section > (Jogo)  appeared APARECER NA TELA */
section#jogo.appeared {
  transform: translateY(0);
  opacity: 1;
}

section#jogo .esconde {
  background-color: rgba(0, 0, 0, 0.5);
  height: 100vh;
  width: 100vw;
  position: absolute;
  left: 4500px;
  top: 0;
  z-index: 2;
  transition: opacity 0.5s ease;
}
section#jogo .esconde.appeared {
  left: 0;
  opacity: 1;
}

section#jogo .aviso {
  background-color: var(--tesoura);
  padding: 20px;
  width: 80%;
  max-width: 600px;
  text-align: center;
  position: absolute;
  left: -50%;
  top: 50%;
  transform: translateX(2000px);
  font-style: italic;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  opacity: 0;
  transition: left 1s ease, opacity 1s ease;
  z-index: 3;
}
section#jogo .aviso.appeared {
  left: 50%;
  opacity: 1;
}
section#jogo .aviso button {
  background-color: var(--branco);
  margin-top: 20px;
  padding: 4px 10px;
  font-size: 14px;
}

section#jogo h1 {
  color: var(--preto-suave);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
}

section#jogo .arrow {
  color: var(--preto-suave);
  padding: 5px;
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  cursor: pointer;
  transition: color 0.4s;
}
section#jogo .arrow:hover {
  color: var(--cinza-escuro);
}

section#jogo .placar {
  margin: 30px 0px 10px 0px;
  max-width: 1018px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
section#jogo .placar div {
  padding: 4px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  border-radius: 5px;
}
section#jogo .placar .vitorias {
  background-color: var(--vitoria);
}
section#jogo .placar .empate {
  background-color: var(--empate);
}
section#jogo .placar .derrotas {
  background-color: var(--derrota);
}

section#jogo .view-jogo {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(0, 0, 0, 0.2)
  );
  backdrop-filter: blur(1px);
  height: 400px;
  width: 90%;
  max-width: 1018px;
  border: 1px solid var(--pedra);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
}
section#jogo .view-jogo .imagem1,
.imagem2 {
  display: flex;
  align-items: center;
  justify-content: center;
}
section#jogo .view-jogo img {
  height: 30%;
}

section#jogo .resultado {
  background-color: var(--empate);
  padding: 20px;
  width: 80%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 2000px;
  top: 50%;
  transform: translateX(2000px);
  font-size: clamp(1.3rem, 3vw, 2.5rem);
  font-style: italic;
  text-shadow: 3px 5px 2px rgba(41, 41, 41, 0.2);
  transform: translate(-50%, -50%);
  border-radius: 8px;
  opacity: 0;
  z-index: 3;
  transition: left 1s ease, opacity 1s ease;
}
section#jogo .resultado.appeared {
  left: 50%;
  opacity: 1;
}

section#jogo .escolhas button {
  margin: 20px 10px;
  padding: 10px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}
section#jogo .escolhas button img {
  height: 50px;
}
section#jogo .escolhas button:nth-child(1) {
  background-color: var(--pedra);
}
section#jogo .escolhas button:nth-child(2) {
  background-color: var(--papel);
}
section#jogo .escolhas button:nth-child(3) {
  background-color: var(--tesoura);
}
section#jogo .escolhas .troca {
  background-color: var(--preto-suave);
  color: var(--branco);
  margin-left: 20px;
  font-size: 0.9rem;
}

/* Mobile */
@media screen and (max-width: 1000px) {
  section#iniciar i {
    font-size: clamp(2rem, 4vw, 1.75rem);
  }

  section#iniciar .container h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
  }
  section#iniciar .container p {
    font-size: clamp(0.9rem, 4vw, 3rem);
  }

  /*Links*/
  section#iniciar .links {
    top: 20px;
    right: 10px;
  }
  section#iniciar .links a {
    padding: 10px;
  }

  /*Buttom*/
  section#iniciar .container button {
    margin-top: 2rem;
    height: 3rem;
    font-size: 1.25rem;
  }

  section#iniciar .config {
    left: 10px;
    bottom: 10px;
  }
  section#iniciar .config button {
    padding: 10px;
  }

  /* SECTION JOGO */
  section#jogo .arrow {
    padding: 5px;
    top: 10px;
    left: 20px;
    font-size: clamp(2rem, 2vw, 1.75rem);
  }

  section#jogo h1 {
    font-size: clamp(2.75rem, 3.5vw, 2.8rem);
  }

  section#jogo .aviso button {
    padding: 8px 14px;
    font-size: 16px;
  }

  section#jogo .placar {
    margin: 30px 0px 20px 0px;
  }
  section#jogo .placar div {
    padding: 6px 20px;
    font-size: clamp(1.2rem, 2vw, 1.75rem);
  }
}
