/* style.css */
@font-face {
    font-family: 'MyCustomFont'; /* 自訂一個名字 */
    src: url(jf-jinxuan-3.0-medium.otf) format('opentype'); /* 指到你的資料夾與字型檔 */
  }
  
  body,h1,h2,h3,h4,h5,h6,p,span {
    font-family: 'MyCustomFont', sans-serif;
    letter-spacing: 0.05em;
    color: #595757;
  }
  h1{
    font-size: 36px;
    text-align: center;
    line-height: 1.2;
  }
  h2{
    font-size: 28px;
    text-align: center;
    line-height: 1.2;
  }
  h3{
    font-size: 24px;
    text-align: center;
    line-height: 1.2;
  }
  h4{
    font-size: 20px;
    text-align: center;
    line-height: 1.2;
  }
  h5{
    font-size: 18px;
    text-align: center;
    line-height: 1.2;
  }
  p {
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
  }
  button{
    background: none;
    border: 1px solid #111;
    font-family: 'MyCustomFont', sans-serif;
    font-size: 18px;
    padding: 8px 16px;
    border-radius: 300px;
}
#username {
  font-family: 'MyCustomFont', sans-serif;
  background: none;
  border: 1px solid #111;
  font-size: 18px;
  padding: 8px 16px;
  border-radius: 4px;
  display: block;
  color: #111;
  text-align: center;
  width: 100%;
  padding: auto 36px;
  max-width: 160px;
}

#username::placeholder {
  color: #aaa;
  opacity: 1;
}
body, html {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: #fff;
  }
  
  section {
    width: 100vw;
    height: 100dvh;
    height: var(--app-height); 
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .quiz-section {
    gap: 12px;
    padding: 36px 24px 12px;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    height: var(--app-height); 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
    pointer-events: none;
  }

  .quiz-section.pre-active {
    transform: translateY(100%);
    opacity: 0;
    z-index: 3;
  }
  
  .quiz-section.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
  }
  
  .quiz-section.exit {
    transform: translateY(-100%);
    opacity: 0;
    z-index: 1;
  }
  .quiz-page .quiz-section:nth-of-type(1) {
    background-image: url(image/q1_bg.png);
    background-size: 100% 100%;
  }
  .quiz-page .quiz-section:nth-of-type(2) {
    background-image: url(image/q2_bg.png);
    background-size: 100% 100%;
  }
  .quiz-page .quiz-section:nth-of-type(3) {
    background-image: url(image/q3_bg.png);
    background-size: 100% 100%;
  }
  .quiz-page .quiz-section:nth-of-type(4) {
    background-image: url(image/q4_bg.png);
    background-size: 100% 100%;
  }
  .quiz-page .quiz-section:nth-of-type(5) {
    background-image: url(image/q5_bg.png);
    background-size: 100% 100%;
  }
  .quiz-page .quiz-section:nth-of-type(6) {
    background-image: url(image/q6_bg.png);
    background-size: 100% 100%;
  }
  .quiz-page .quiz-section:nth-of-type(7) {
    background-image: url(image/q7_bg.png);
    background-size: 100% 100%;
  }
  .q1-front-bg{
    position: absolute;
    background-size: cover;
    opacity: 0.3;
    z-index: 0;
    width: 100%;
    bottom: 0;
  }
  .q2-front-bg{
    top: 120px;
    position: absolute;
    background-size: cover;
    z-index: 0;
    width: 100%;
  }
  .q6-front{
    top: 80px;
    position: absolute;
    background-size: cover;
    z-index: 0;
    width: 100%;
  }
  .option-card .item{
    width: 100%;
  }
  .q1-light{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
  }
  .q2-desk{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
  }
  .q3-ui{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
  }
  .q4-map{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
  }
  .q5-table{
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100vw;
  }
  .q5-window{
    position: absolute;
    top: 0;
    width: 100vw;
  }
/* 所有
/* 所有選項的收納處 */
.option-container{
  margin-top: 24px;
  position: relative;
  width: 100%;
  padding: 0;
}
.q1-option-gp{
  margin-top: 12px;
  height: 500px;
}

.q1-option-gp .option-card{
  display: flex;
  flex-direction: column;
  justify-self: end;
}
.q1-option-gp .option-card .item{
  margin-bottom: 10px;
}
.q2-option-gp{
  height: 570px;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin-top: 0 !important;
}
.q3-option-gp{
  height: 470px;
  width: 360px;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin-top: 0 !important;
}
.q3-option-gp h5{
  font-size: 16px;
}

.q3-option-gp .option-card p{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.q3-option-gp .option-card .item{
 width:280px;
}
.q4-option-gp{
  height: 370px;
  width: 360px;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin-top: 0 !important;
}
.q2-item-gp{
  border-radius: 8px;
  margin: 24px 12px 0px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  background-color: #F3B700;
}
.q2-item-gp >*{
  color: white;
}
.q5-item-gp{
  height: 80px;
  width: 100%;
  border-radius: 8px;
  margin: 24px 12px 0px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0px;
  background-color: #FDF9E9;
}
.q5-item-gp p{
  color: #9F9F9F;
}
.q5-item-gp .q5-title{
  color: #C98658;
}
.q5-option-gp{
  height: 240px;
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin-top: 0 !important;
}

/* 所有選項初始為絕對定位，方便動態控制位置 */
.option-card {
  border: none;
  padding: 0;
  width: 47%;
  position: absolute;
  transition: transform 0.6s ease, opacity 0.6s ease;
  z-index: 1;
}
.q5-option-gp .option-card{
  display: flex;
  width: 50vw;
}
.q3-option-gp .option-card:nth-of-type(1) {
  position: absolute;
  top: 220px;
  left: 50%;
  transform: translateX(-50%);
  width: auto !important;
}
.q3-option-gp .option-card:nth-of-type(2) {
  position: absolute;
  top: 270px;
  left: 50%;
  transform: translateX(-50%);
    width: auto !important;

}
.q3-option-gp .option-card:nth-of-type(3) {
  position: absolute;
  top: 320px;
  left: 50%;
  transform: translateX(-50%);
  width: auto !important;
}
.q3-option-gp .option-card:nth-of-type(4) {
  position: absolute;
  top: 370px;
  left: 50%;
  transform: translateX(-50%);
  width: auto !important;
}

.q4-option-gp .option-card img{
  width: 80px;
}
.q4-option-gp .option-card:nth-of-type(1) {
  position: absolute;
  top: 160px;
  left: 85px;
  transform: translateX(-50%);
  width: 120px !important;
}
.q4-option-gp .option-card:nth-of-type(2) {
  position: absolute;
  top: 70px;
  left: 110px;
  transform: translateX(-50%);
  width: 120px !important;
}
.q4-option-gp .option-card:nth-of-type(3) {
  position: absolute;
  top: 60px;
  right: -10px;
  transform: translateX(-50%);
  width: 120px !important;
}
.q4-option-gp .option-card:nth-of-type(4) {
  position: absolute;
  top: 160px;
  right: -40px;
  transform: translateX(-50%);
  width: 120px !important;
}
.q4-A-path{
  opacity: 0;
  position: absolute;
  width: 90px;
  bottom: 20px;
  left: 115px;
}
.q4-B-path{
  opacity: 0;
  position: absolute;
  width: 90px;
  bottom: 20px;
  left: 115px;
}
.q4-C-path{
  opacity: 0;
  position: absolute;
  width: 90px;
  bottom: 20px;
  right: 124px;
}
.q4-D-path{
  opacity: 0;
  position: absolute;
  width: 90px;
  bottom: 20px;
  right: 90px;
}

.q5-A-drink{
  position: absolute;
  width: 70vmin;
  bottom: -100px;
  left:0vmin;
}
.q5-B-drink{
  position: absolute;
  width: 80vmin;
  bottom: -80px;
  left:20vmin;
}
.q5-C-drink{
  position: absolute;
  width: 70vmin;
  bottom: -90px;
  right: -10vmin;
}
.q5-D-drink{
  position: absolute;
  width: 70vmin;
  bottom: -100px;
  right: -40vmin;
}

.q6-option-gp{
  height: 240px;
  position: absolute;
  bottom: 5vh;
  display: flex;
}

.q6-option-gp .option-card{
  width: 25%;
  position: relative;
}
.option-container.q7-option-gp {
  margin-top: 0;
  height: auto;
  width: 90%;

  border-radius: 8px !important;
}
.q7-option-gp .item{
 width: 100%;
 border-radius: 8px !important;

}
.swiper {
  --swiper-navigation-color: #ffffff;
  --swiper-pagination-color: #ffffff;
  --swiper-scrollbar-bottom: -36px;
  --swiper-navigation-sides-offset:8px;
}
.q7-button{
  margin-top: 12gpx;
  background-color: #717070;
  color: white;
  border: none;
}
.custom-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.custom-pagination .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #9f9f9f32;
  transition: background-color 0.3s;
}

.custom-pagination .dot.active {
  background-color: #ff8787; /* ✅ 或你想要的顏色 */
}



/* 四個角落定位 */
.pos-tl { top: 0%; left: 0%; }
.pos-tr { top: 0%; right: 0%; }
.pos-bl { bottom: 0%; left: 0%; }
.pos-br { bottom: 0%; right: 0%; }
/* ✅ 鎖定位置（避免點擊時馬上跑掉） */
.option-card.locked {
  z-index: 5;
}

/* ✅ 淡出其他選項 */
/* .option-card.fade-out {
  opacity: 0;
  pointer-events: none;
} */


  /* Desktop blocker */
  .rwd-desktop {
    background: #fff;
    color: #111;
    font-size: 2rem;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
  }
  .question-result {
    position: fixed;
    background-image: url(image/result_image/Anthurium-bg.png);
    background-size: 100% 100%;
    z-index: 100;
    width: 100vw;
    height: 100dvh;
    height: var(--app-height); 
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }
  .question-wrapper{
    position: relative;
    max-width: 480px;
  }
  .result-main{
    width: 100%;
    display: block;
  }
  .result-gp{
    display: flex;
  }
  .result-section{
    width: 100%;
  }
  .result-sub-gp{
    display: flex;
    padding-left: 12px;
    padding-right: 12px;
  }
  .result-subgp{
    padding-top: 28px;
    flex: 1 1 0;
    position: relative;
  } 
  .reult-subtitle-adj{
    transform: translateX(-50%);

    left: 50%;
    position: absolute;
    bottom: 8px;
    padding-bottom: 2px;
    border-bottom: solid 1px #ffffff;
    display: flex;
    gap: 4px;
  }
  .reult-subtitle-adj img{
    width: 12px;
  }
  .reult-subtitle-adj p{
    color: #808080;
    min-width: 52px;
    font-size: 12px;
  }
  .result-subtitle{
    min-width: 42px;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    left: 50%;
    padding: 2px 4px;
    background-color: #808080;
    border-radius: 1200px;
  }
  .result-subtitle p{
    white-space: nowrap;
    display: block;
    color: #ffffff;
    font-size: 12px;
  }
  .result-subflower{
    position: absolute;
    width: 50%;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .result-subflower-bg{
    width: 100%;
    height: 120px;
  }
  .result-nameBG {
    padding-right: 16px;
  }
  .result-nameBG-sgp{
    
    position: relative;
  }
  .result-nameBG img{
    height: 300px; 
    width: 42px; 
  }
  .result-nameBG p{
    position: absolute;
    writing-mode: vertical-rl;
    transform: translateX(-50%);
    left: 50%;
    top: 100px;
  }
  
  .question-result.visible {
    display: flex;
  }
  .pre-result.visible{
    display: flex;
  }
  
  .result-wrapper h2 {
    margin-bottom: 1rem;
  }
  
  .result-wrapper ul {
    list-style: none;
    padding: 0;
  }
  .result-ad{
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(image/reult-ad-bg.png);
    background-size: 100% 100%;
  }
  .page-section{
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
  }
  .question-funtion-gp{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-image: url(image/reult-ad-bg.png);
    background-size: 100% 100%;
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
  }
  
  .section-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .cover-page{
    background-image: url(image/bg.jpg);
    background-size: 100% 100%;
    display: flex;
    padding: 24px;
    flex-direction: column;
    gap: 24px;
  }
  .inform-page{
    background-image: url(image/bg.jpg);
    background-size: 100% 100%;
    display: flex;
    padding: 24px;
    flex-direction: column;
    gap: 18px;
  }
  .quiz-page{
    background-image: url(image/bg.jpg);
    background-size: 100% 100%;
  }
  .fade-in {
    opacity: 0;
  }
  
  .fade-in.animate {
    animation: fadeInUp 0.6s ease forwards;
  }
  
  @keyframes fadeInUp {
    0% {
      opacity: 0;    }
    100% {
      opacity: 1;
    }
  }

  .cover-page,.inform-page,.quiz-page{
    z-index: 1;
  }
  
  @media screen and (min-width: 576px) {
    .rwd-desktop {
      display: flex;
      justify-content: center;
      align-items: center;
    }
  
    #quiz-container {
      display: none;
    }
  }
  
  /* Loading screen */
  .loading-screen {
    position: fixed;
    background-image: url(image/bg.jpg);
    background-size: 100% 100%;
    color: #fff;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.5s ease;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100dvh;
    height: var(--app-height); 
    flex-direction: column;
    gap: 24px;
  }
  .pre-result{
    position: fixed;
    background-image: url(image/bg.jpg);
    background-size: 100% 100%;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.5s ease;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100dvh;
    height: var(--app-height); 
    display: none;
    flex-direction: column;
    gap: 24px;
  }
  .pre-result h4{
    color: #DD9867;
  }
  .ShowResult{
    color: #898989 !important;
  }
  
  .loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
  }
  
  .loading-text {
    font-size: 1.5rem;
    animation: pulse 1s infinite;
    color: #666666;
  }
  
  @keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
  }
  