/* 卡片容器 */
.card-row {
    display: flex;               /* 使用 Flexbox 排列 */
    justify-content: center;     /* 卡片水平居中 */
    gap:10px;   
    flex-wrap: wrap;             /* 若螢幕空間不足，卡片自動換行 */
    margin: 0 auto;              /* 容器置中 */
    padding: 20px;
  }
  
  /* 單個卡片 */
  .card {
    display: flex;
    flex-direction: column;
    width: 400px;
    height: 420px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0px 10px 12px rgba(0, 0, 0, 0.08),
      -4px -4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    box-sizing: border-box;
    padding: 10px;
  }
  
  .card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.1),
      -4px -4px 12px rgba(0, 0, 0, 0.08);
  }
  
  /* 圖片容器 */
  .card-image-container {
    width: 100%;
    height: 64%;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 圖片樣式 */
  .image-icon {
    width: 100%;        /* 圖片寬度填滿容器 */
    height: auto;       /* 保持圖片比例 */
    object-fit: cover;  /* 確保圖片裁剪時保持內容居中 */
  }
  
  /* 卡片標題 */
  .card-title {
    margin: 0;
    font-size: 30px;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
      "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    font-weight: 600;
    color: #1797b8;
    cursor: default;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }
  
  /* 卡片描述 */
  .card-des {
    margin-top: 100px;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    margin: 0;
    font-size: 15px;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
      "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    color: #000000;
    cursor: default;
  }
  .swiper-slide {
    display: flex !important;   
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;           /* 防止超出 */
  }
  
  .slider-img {
    max-width: 600px;          /* 桌機上最多 400px */
    height: auto;
  }
  
  /* 手機斷點(小於等於 576px) */
  @media (max-width: 576px) {
    .slider-img {
      max-width: 100% !important; 
    }
  }
  
  .story-title {
    /* 確保長字能換行 */
    font-size: 22px;
    line-height: 130%;
    margin-bottom: 13px;
    font-weight: bold; /* 加上粗體 */
}

  

  .iframe-container {
    position: relative;
    width: 100%; /* 讓容器寬度適應父元素 */
    max-width: 1200px; /* 可選：限制容器的最大寬度 */
    margin: 0 auto; /* 中置容器 */
    aspect-ratio: 16 / 9; /* 設置比例，現代瀏覽器支持 */
    background: #000; /* 可選：背景顏色 */
    overflow: hidden; /* 確保內容不超出容器 */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* 移除邊框 */
}

h1 {
  height: 100px;
}

h1 span {
  position: relative;
  top: 20px;
  display: inline-block;
  animation: bounce .5s ease infinite alternate;
  font-family: 'Titan One', cursive;
  font-size: 80px;
  color: #ea7777;
  text-shadow: 0 1px 0 #CCC,
               0 2px 0 #CCC,
               0 3px 0 #CCC,
               0 4px 0 #CCC,
               0 5px 0 #CCC,
               0 6px 0 transparent,
               0 7px 0 transparent,
               0 8px 0 transparent,
               0 9px 0 transparent,
               0 10px 10px rgba(0, 0, 0, .4);
}

h1 span:nth-child(2) { animation-delay: .1s; }
h1 span:nth-child(3) { animation-delay: .2s; }
h1 span:nth-child(4) { animation-delay: .3s; }
h1 span:nth-child(5) { animation-delay: .4s; }
h1 span:nth-child(6) { animation-delay: .5s; }
h1 span:nth-child(7) { animation-delay: .6s; }
h1 span:nth-child(8) { animation-delay: .7s; }

@keyframes bounce {
  100% {
    top: -20px;
    text-shadow: 0 1px 0 #CCC,
                 0 2px 0 #CCC,
                 0 3px 0 #CCC,
                 0 4px 0 #CCC,
                 0 5px 0 #CCC,
                 0 6px 0 #CCC,
                 0 7px 0 #CCC,
                 0 8px 0 #CCC,
                 0 9px 0 #CCC,
                 0 50px 25px rgba(0, 0, 0, .2);
  }
}


h5 {
  height: 10px;
  font-size: 30px;
  color: #35445c;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 120px;
  height: 20px;
  border-radius: 20px;
  background:
   repeating-linear-gradient(135deg,#f03355 0 10px,#ffa516 0 20px) 0/0%   no-repeat,
   repeating-linear-gradient(135deg,#ddd    0 10px,#eee    0 20px) 0/100%;
  animation: l3 2s infinite;
}
@keyframes l3 {
    100% {background-size:100%}
}

.switch {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  background-color: #ff6b6b;
  border-radius: 34px;
  transition: background-color 0.3s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.switch input:checked + .slider {
  background-color: #66bb6a;
}

.switch input:checked + .slider:before {
  transform: translateX(26px);
}

.slider:before {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.knob {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.switch input:checked ~ .knob {
  transform: translateX(27px) translateY(-50%);
}


.model-viewer {
  width: 100%;
  height: 400px;
  display: block;
}


/*----------ScoreCard---------*/
.title-wrapper {
  position: relative;
  text-align: center; /* 讓其中文字預設置中 */
  margin-bottom: 1rem; /* 與下方內容間隔，可自行調整 */
  margin-top: 24px;
  margin-bottom: 14px;
  align-items: center;
  padding-top: 20px;
  
}

.title-wrapper .scoreCard {
  position: absolute;
  top: 0;    /* 與外層 .title-wrapper 的頂部對齊 */
  right: 0;  /* 靠右 */
  /* 可自行微調大小、背景、邊距等 */
}
@media (max-width: 768px) {
  .title-wrapper {
    /* 若需要更多空間，可加 padding-top */
    padding-top: 0.5rem;
  }

  .title-wrapper .scoreCard {
    position: static;    /* 取消絕對定位 */
    margin: 1rem auto 0; /* 讓它在小螢幕時移到標題下面並置中 */
  }
}

.scoreCard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.scoreStatsWrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 100px;
  height: 90px;
  border-radius: 20px;
  background-color: rgb(255, 255, 255);
  padding: 15px;
  box-shadow:
    20px 20px 60px #e6e6e6,
    -20px -20px 60px #f3f3f3;
}

.scoreHeading {
  font-size: 0.9em;
  font-weight: 700;
  letter-spacing: 1px;
}

.scoreBottomWrapper {
  width: 100%;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.scoreBottomWrapper .scoreStar {
  width: 30px;
  fill: gold;
}

.scoreBottomWrapper .scoreTag {
  width: 27px;
  fill: rgb(141, 214, 32);
}

.scoreBottomWrapper .scoreThumb {
  width: 27px;
  fill: blueviolet;
}

.scoreBottomWrapper p {
  font-size: 1.2em;
  font-weight: 700;
 
}
@media (max-width: 576px) {
  .scoreStatsWrapper {
    flex-direction: row; /* 改成橫向排列 */
    width: auto;
    height: auto;
    border-radius: 20px; /* 讓它更橢圓 */
    padding: 8px 12px;
  }

  .scoreBottomWrapper {
    justify-content: flex-start; /* 靠左對齊 */
  }

  .scoreHeading {
    margin-right: 5px; /* 讓 Score 和星星有些間距 */
  }
  }