* {
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
@font-face {
  font-family: "frightMaiden";
  src: url(../fonts/fright_maiden/Fright\ Maiden\ Demo.ttf);
}

h1 {
  font-family: frightMaiden;
  font-size: 3rem;
  text-shadow: 8px 8px 18px rgb(34, 32, 32);
  text-align: center;
}
#audio {
  display: none;
}

.container {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
}

.titles {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

body {
  width: 100%;
  height: 100vh;
  color: white;
  background-image: linear-gradient(
      rgba(26, 240, 11, 0.492),
      rgba(79, 6, 143, 0.492),
      rgba(5, 5, 5, 0.492)
    ),
    url("../img/imagenBackground.png");
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.container_play {
  width: 440px;
  height: 440px;
  perspective: 1000px; /* Añadido para perspectiva 3D */
}

#imagenGameOver {
  display: flex;
  position: absolute;
  z-index: 2;
}

#gameBoard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

#fails,
#fin {
  font-size: 1.5rem;
  font-family: frightMaiden;
}

#animationEnd {
  position: fixed;
  animation: animationEnd 1s infinite;
  transform-origin: center;
  font-size: 1.5rem;
  font-family: frightMaiden;
}
.back{
  font-size: 8rem;
}
@keyframes animationEnd {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

button {
  border: solid white 2px;
  border-radius: 1.2rem;
  background-color: rgb(173, 115, 7);
  padding: 3px 15px;
  margin: 10px;
  position: absolute;
  top: 10px;
  left: 10px;
}
button:hover {
  background-color: orange;
  border: solid rgb(92, 6, 150);
}

#contenedorBoton {
  border: solid white 2px;
  border-radius: 20px;
  background-color: rgb(173, 115, 7);
  width: 200px;
  display: none;
  justify-content: center;
  align-items: center;
}

#contenedorBoton:hover {
  background-color: orange;
  border: solid rgb(92, 6, 150);
}

a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  width: 100%;
  height: 100%;
  text-align: center;
}

.container_play {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.scoretable {
  display: flex;
  justify-content: space-evenly;
  gap: 15px;
}

.card {
  width: 100px;
  height: 100px;
  perspective: 200px;
}

.content {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: transform 1s;
  transform-style: preserve-3d;
}

.front,
.back {
  position: absolute;
  height: 100%;
  width: 100%;
  background-color: #26173f;
  border: inset 3px #8aa538;
  display: grid;
  place-content: center;
  font-size: 5rem;
  border-radius: 1rem;
  backface-visibility: hidden;
  user-select: none;
}

.back {
  background: linear-gradient(rgb(145, 89, 6), rgb(146, 59, 1));
  transform: rotateY(180deg);
    font-size: 5rem;
  }

.flipped {
  transform: rotateY(180deg);
  transition: transform 0.3s;
}

@media (max-width: 479px) {
  /* Ajusta para el ancho del iPhone 12 */

  body {
    width: 100%;
    height: 960px;
    color: white;
    background-image: linear-gradient(
        rgba(26, 240, 11, 0.492),
        rgba(79, 6, 143, 0.492),
        rgba(5, 5, 5, 0.492)
      ),
      url(../img/imagenBackground.png);
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
  }

  .card {
  
    width: 70px;
    height: 70px;
    
  }

  #gameBoard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    justify-items: center;
    margin-right: 15px;
    
   
  }

  .container_play {
    width: 370px;
    height: 170px;
    perspective: 1000px;
    font-size: 2rem;
  }

  .front,
  .back {
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: #26173f;
    border: inset 3px #8aa538;
    display: grid;
    place-content: center;
    font-size: 4rem;
    border-radius: 0.5rem;
    backface-visibility: hidden;
    user-select: none;
  }
  
  #animationEnd {
    text-align: center;
    position: fixed;
    animation: animationEnd 1s infinite;
    transform-origin: center;
    font-size: 0.9rem;
    font-family: frightMaiden;
  }
}

@media (max-height: 730px) {
  body {
    width: 100%;
    height: 100vh;
    color: white;
    background-image: linear-gradient(
        rgba(26, 240, 11, 0.492),
        rgba(79, 6, 143, 0.492),
        rgba(5, 5, 5, 0.492)
      ),
      url(../img/imagenBackground.png);
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
  }

  #confetti {
    display: none;
  }
}

/* Start https://www.cursors-4u.com */
* {
  cursor: url(https://cur.cursors-4u.net/holidays/hol-1/hol66.ani),
    url(https://cur.cursors-4u.net/holidays/hol-1/hol66.png), auto !important;
} /* End https://www.cursors-4u.com */
