/**
 *  Copyright (c) 2024 孫培倫
 */

/* 整體設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  user-select: none;
}

/* 超出隱藏 */
body{
  overflow: hidden;
}

/* 旋轉控制 */
.auto_flip{
  animation: rotate_auto 6s 1 cubic-bezier(0.39, -0.23, 0.36, 1.47);
}

.loop_flip{
  animation: rotate_front 15s infinite linear;/* 持續旋轉 */
}

.loop_flip_back{
  animation: rotate_back 15s infinite linear;/* 持續旋轉 */
}

/* 旋轉關鍵影格 */
@keyframes rotate_auto {
  0% {
      transform: rotateY(0deg);
  }
  99% {
      transform: rotateY(360deg); 
  }
  100% {
      transform: rotateY(361deg); /* 完整旋轉 */
  }
  }

@keyframes rotate_front {
  from {
      transform: rotateY(0deg);
  }
  to {
      transform: rotateY(360deg); /* 完整旋轉 */
  }
  }

@keyframes rotate_back {
  from {
      transform: rotateY(180deg);
  }
  to {
      transform: rotateY(540deg); /* 完整旋轉 */
  }
  }

/* 頁面容器 */
section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e3ba69;
  perspective: 1000px;
  flex-direction: column;
}

/* 主體容器 */
.container {
  position: relative;
  height: 450px;
  width: 750px;
  z-index: 100;
  transition: 0.6s;
  transform-style: preserve-3d;
}

/* 主體容器-移動端 */
@media (max-width: 768px) {
  .container {
    position: relative;
    height: 225px;
    width: 375px;
    z-index: 100;
    transition: 0.6s;
    transform-style: preserve-3d;
  }
}

/* 卡片本體 */
.container .card {
  position: absolute;
  height: 100%;
  width: 100%;
  padding: 25px;
  border-radius: 25px;
  backdrop-filter: blur(25px);
  background: #f5f5f5;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.25);
  border: 1px solid #d7dcd8;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* 卡片反面 */
.card.front-face{
  background-image: url(images/final_front.png);
  background-size: contain;
}

/* 卡片反面 */
.card.back-face {
  transform: rotateY(180deg);
  backface-visibility: hidden;
  background-image: url(images/final_back.png);
  background-size: contain;
}