:root{
        @media (min-width: 770px){
            --Cuadro: 45px;
            --Fuente: 40px;
        }
        @media (max-width: 769px){
            --Cuadro: 20px;
            --Fuente: 15px;
        }
}

.splitflap {
  position: relative;
  min-width: var(--Cuadro);
  height: var(--Cuadro);
  margin: 1px;
  line-height: var(--Cuadro);
  font-size: var(--Fuente);
  font-family: Monospace;
  text-align: center;
  color: white;
}

.center {
  position: absolute;
  left: 0;
  top: 50%;
  /* margin-top: -50px; */
  width: 100%;
  display: flex;
  justify-content: center;
}

.top {
  position: relative;
  height: 50%;
  width: 100%;
  background-color: #8c714a;
  /* border-radius: 10px 10px 0 0; */
  overflow: hidden;
  z-index: 0;
}

div {
  perspective: 500px;
}

.bottom {
  position: relative;
  height: 100%;
  width: 100%;
  margin-top: -50%;
  /* border-radius: 10px 10px 10px 10px; */
  z-index: -1;
  background-color: black;
  background-image: linear-gradient(rgba(59, 182, 235, 0), #8c714a);
  transform-origin: center;
}

.nextHalf {
  position: relative;
  height: 50%;
  width: 100%;
  margin-top: -100%;
  overflow: hidden;
  /* border-radius: 10px 10px 0 0; */
  z-index: 2;
  background-color: black;
  background-image: linear-gradient(#8c714a, rgba(59, 182, 235, 0));
  transform-origin: bottom;
}

.nextFull {
  position: relative;
  height: 100%;
  width: 100%;
  background-color: #8c714a;
  margin-top: -50%;
  /* border-radius: 10px 10px 10px 10px; */
  z-index: -3;
}

.flip1 {
  animation: flip1 ease-in 1;
  animation-duration: 1s;
}

.flip2 {
  animation: flip2 ease-out 1;
  animation-duration: 1s;
}

@keyframes flip1 {
  0% {
    transform: rotateX(0deg);
    background-color: #8c714a;
  }
  50% {
    transform: rotateX(90deg);
    background-color: black;
  }
  100% {
    transform: rotateX(90deg);
  }
}

@keyframes flip2 {
  0% {
    transform: rotateX(-90deg);
  }
  50% {
    transform: rotateX(-90deg);
  }
  100% {
    transform: rotateX(0deg);
    background-color: #8c714a;
  }
}