/* 翻页版：上下两格共用一个数字、数字折半，翻页为上下折叠 */
.flip-page {
  padding-top: 100px;
  background: #1c1c1e;
}

.flip-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 24px;
}

.flip-unit {
  perspective: 280px;
}

.flip-card {
  position: relative;
  width: 72px;
  height: 96px;
  background: #2c2c2e;
  border-radius: 10px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* 上格：只显示数字的上半部分，中间一条横线 */
.flip-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50%;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

/* 下格：只显示数字的下半部分 */
.flip-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* 数字：一个数字占满整卡高度，用 200% 高度 + 裁切实现上下折半 */
.flip-digit {
  font-size: 5.8rem;
  font-weight: 700;
  line-height: 1;
  color: #e5e5ea;
  display: block;
  width: 100%;
  text-align: center;
}

/* 上格内（含折叠片）：显示同一数字的上半部分 */
.flip-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: center bottom;
}

.flip-flap-front,
.flip-flap-back {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-flap-front {
  z-index: 2;
}

.flip-flap-back {
  transform: rotateX(180deg);
}

/* 上格里的数字：wrap 为 200% 高度，数字底对齐，只露出上半 */
.flip-flap-front .flip-digit-wrap,
.flip-flap-back .flip-digit-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 200%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
  background: #2c2c2e;
}

.flip-flap-front .flip-digit,
.flip-flap-back .flip-digit {
  font-size: 5.8rem;
  font-weight: 700;
  line-height: 1;
  color: #e5e5ea;
}

/* 下格里的数字：wrap 200% 高度、top -100%，数字顶对齐，只露出下半 */
.flip-bottom .flip-digit-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 200%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0;
  background: #2c2c2e;
}

.flip-bottom .flip-digit {
  font-size: 5.8rem;
  font-weight: 700;
  line-height: 1;
  color: #e5e5ea;
}

/* 折叠动画：上片绕底边向下折 */
.flip-card.flip .flip-flap {
  animation: flapFoldDown 0.38s ease-in forwards;
}

@keyframes flapFoldDown {
  to {
    transform: rotateX(-90deg);
  }
}

/* 冒号 */
.flip-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 2px;
  width: 24px;
  height: 96px;
}

.flip-sep i {
  display: block;
  width: 8px;
  height: 8px;
  background: #8e8e93;
  border-radius: 2px;
}

.flip-date {
  font-size: 1.25rem;
  color: #e5e5ea;
  text-align: center;
  margin-bottom: 12px;
  font-weight: 400;
}

.flip-label {
  font-size: 0.95rem;
  color: #8e8e93;
  letter-spacing: 0.2em;
  margin: 0;
}

@media (max-width: 560px) {
  .flip-card {
    width: 52px;
    height: 72px;
  }
  .flip-digit,
  .flip-flap-front .flip-digit,
  .flip-flap-back .flip-digit,
  .flip-bottom .flip-digit {
    font-size: 4.2rem;
  }
  .flip-sep {
    height: 72px;
    width: 20px;
    gap: 6px;
  }
  .flip-sep i {
    width: 6px;
    height: 6px;
  }
  .flip-date {
    font-size: 1.05rem;
  }
}
