/*Font*/
@font-face {
  font-family: "Noto Sans KR";
  font-weight: 400;
  src: url("https://cdn2.munpia.com/asset/font/NotoSansKR-Regular.woff2") format("woff2"), url("https://cdn2.munpia.com/asset/font/NotoSansKR-Regular.woff") format("woff");
}
@font-face {
  font-family: "Pretendard";
  font-weight: 700;
  font-display: swap;
  src: local("Pretendard Bold"), url(https://cdn1.munpia.com/v2/assets/fonts/Pretendard-Bold.woff2) format("woff2");
}

#timer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flip-clock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  justify-content: center;
  align-items: center;
  text-align: center;

  *,
  *:before,
  *:after {
    box-sizing: border-box;
  }
}

.flip-clock__piece {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.flip-clock__piece:nth-last-child(1) {
  gap: 10px;
}

.flip-clock__slot {
  display: flex;
  align-items: center;
  height: 40px;
  color: var(--txt--neu--300) !important;
  text-align: center;
  font-family: "Noto Sans KR";
  font-size: 13px;
  font-weight: 400;
}

.card {
  display: block;
  position: relative;
  line-height: 1;
  height: 40px;
  padding-bottom: 20px;
  border: 1px solid #ebebeb;
  border-radius: 4px;
  overflow: hidden;
}

.card__top,
.card__bottom,
.card__back::before,
.card__back::after {
  display: block;
  width: 36px;
  height: 20px;
  color: var(--txt--neu--300);
  text-align: center;
  font-family: Pretendard;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transform-style: preserve-3d;
  transform: translateZ(0);
}

.card__top {
  position: relative;
  z-index: 0;
  padding-top: 0.72em;
  background: linear-gradient(180deg, #f5f5f5 0%, #fff 100%);
}

.card__bottom {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0;
  background: linear-gradient(180deg, #f5f5f5 0%, #fff 100%);
  pointer-events: none;
  overflow: hidden;
}

.card__bottom::after {
  display: block;
  margin-top: -0.47em;
}

.card__back::before,
.card__bottom::after {
  content: attr(data-value);
}

.card__back {
  position: absolute;
  top: 0;
  height: 100%;
  left: 0%;
  pointer-events: none;
}

.card__back::before {
  position: relative;
  z-index: -1;
  overflow: hidden;
  padding-top: 0.72em;
  background: linear-gradient(180deg, #f5f5f5 0%, #fff 100%);
}

.flip .card__back::before {
  animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
  animation-fill-mode: both;
  transform-origin: center bottom;
}

.flip .card__back .card__bottom {
  transform-origin: center top;
  animation-fill-mode: both;
  animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
}

@keyframes flipTop {
  0% {
    transform: rotateX(0deg);
    z-index: 2;
  }
  0%,
  99% {
    opacity: 0.99;
  }
  100% {
    transform: rotateX(-90deg);
    opacity: 0;
  }
}

@keyframes flipBottom {
  0%,
  50% {
    z-index: -1;
    transform: rotateX(90deg);
    opacity: 0;
  }
  51% {
    opacity: 0.99;
  }
  100% {
    opacity: 0.99;
    transform: rotateX(0deg);
    z-index: 5;
  }
}
