.digit {
  position: relative;
  float: left;
  width: 1.3rem;
  height: 1.3rem;
  background-color: #fff;
  border-radius: 0.25vw;
  text-align: center;
  font-family: Oswald, sans-serif;
  font-size: 15px;
}

.base {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
}

.flap {
  display: none;
  position: absolute;
  width: 100%;
  height: 50%;
  background-color: #fff;
  left: 0;
  top: 0;
  border-radius: 0.25vw 0.25vw 0 0;
  transform-origin: 50% 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
}
.flap::before {
  content: attr(data-content);
  position: absolute;
  left: 50%;
}
.flap.front::before,
.flap.under::before {
  top: 100%;
  transform: translate(-50%, -50%);
}
.flap.back {
  transform: rotateY(180deg);
}
.flap.back::before {
  top: 100%;
  transform: translate(-50%, -50%) rotateZ(180deg);
}
.flap.over {
  z-index: 2;
}
.flap.under {
  z-index: 1;
}
.flap.front {
  -webkit-animation: flip-down-front 300ms ease-in both;
  animation: flip-down-front 300ms ease-in both;
}
.flap.back {
  -webkit-animation: flip-down-back 300ms ease-in both;
  animation: flip-down-back 300ms ease-in both;
}
.flap.under {
  -webkit-animation: fade-under 300ms ease-in both;
  animation: fade-under 300ms ease-in both;
}

@-webkit-keyframes flip-down-front {
  0% {
    transform: rotateX(0deg);
    background-color: #fff;
    color: #333;
  }
  100% {
    transform: rotateX(-180deg);
    background-color: #a6a6a6;
    color: black;
  }
}
@keyframes flip-down-front {
  0% {
    transform: rotateX(0deg);
    background-color: #fff;
    color: #333;
  }
  100% {
    transform: rotateX(-180deg);
    background-color: #a6a6a6;
    color: black;
  }
}
@-webkit-keyframes flip-down-back {
  0% {
    transform: rotateY(180deg) rotateX(0deg);
    background-color: #a6a6a6;
    color: black;
  }
  100% {
    transform: rotateY(180deg) rotateX(180deg);
    background-color: #fff;
    color: #333;
  }
}
@keyframes flip-down-back {
  0% {
    transform: rotateY(180deg) rotateX(0deg);
    background-color: #a6a6a6;
    color: black;
  }
  100% {
    transform: rotateY(180deg) rotateX(180deg);
    background-color: #fff;
    color: #333;
  }
}
@-webkit-keyframes fade-under {
  0% {
    background-color: #a6a6a6;
    color: black;
  }
  100% {
    background-color: #fff;
    color: #333;
  }
}
@keyframes fade-under {
  0% {
    background-color: #a6a6a6;
    color: black;
  }
  100% {
    background-color: #fff;
    color: #333;
  }
}
.clock {
    width: 100%;
  /* position: relative;
  transform: translateY(-50%);
  perspective: 100vw;
  perspective-origin: 50% 50%; */
}
.clock .digit {
  margin-right: 0.2rem;
}
.clock .digit:nth-child(2n + 2) {
  /* margin-right: 0.5em; */
}
.clock .digit:last-child {
  margin-right: 0;
}