@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap");
:root {
  --color-primary: #2450ff;
  --header-text: #293591;
  --color-primary-light: #edf3ff;
  --color-accent: #f7d83b;
  --color-bg: #fff9f0;
  --color-text: #4B4745;
  --color-muted: #666;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.06);
  --max-width: 1200px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
}

/* =========================================
          Challenge Page Styles (模擬 challenge.scss)
          ========================================= */
.challenge-page {
  background-color: var(--color-bg-blue);
  text-align: center;
  overflow: hidden;
  position: relative;
  /* 防止動畫溢出 */
}
.challenge-page .container {
  position: absolute;
  padding: 2.2% 5% 32px 5%;
  top: 4.5%;
  bottom: 4.5%;
  left: 1.5%;
  right: 1.5%;
  overflow: auto;
  border-radius: 1.5%;
  /* For Internet Explorer and Edge */
  -ms-overflow-style: none;
  /* For Firefox */
  scrollbar-width: none;
}
.challenge-page .container:-webkit-scrollbar {
  display: none;
}

.challenge-page-bg {
  position: relative;
}
.challenge-page-bg img {
  width: 100%;
}
.challenge-page-bg .cover {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

/* 標題與進度 */
.page-title {
  color: #293591;
  font-size: 48px;
  font-weight: bold;
}

.sub-tip {
  color: #ff99cc;
  font-size: 30px;
  margin-bottom: 5px;
}

.progress-section {
  font-size: 30px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 30px;
  width: 100%;
  max-width: 827px;
  margin: 0 auto;
  margin-bottom: 20px;
}

.progress-pill {
  background: #fff;
  color: #A8A4A1;
  padding: 3px 29px 5px 29px;
  border-radius: 50px;
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  font-size: 29px;
  text-align: left;
  line-height: 1;
  letter-spacing: 1px;
  border: 1px solid #494949;
}

/* 題目卡片動畫 */
@-webkit-keyframes slideDown {
  from {
    -webkit-transform: translateY(-30px);
            transform: translateY(-30px);
    opacity: 0;
  }
  to {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideDown {
  from {
    -webkit-transform: translateY(-30px);
            transform: translateY(-30px);
    opacity: 0;
  }
  to {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    opacity: 1;
  }
}
.question-card {
  background: #fff;
  border-radius: 30px;
  padding: 20px 40px;
  max-width: 1256px;
  color: #293591;
  /* 深藍字 */
  margin: 0 auto 20px;
  font-size: 30px;
  line-height: 1.6;
  text-align: left;
  border: 1px solid #111111;
  -webkit-animation: slideDown 0.6s ease-out;
          animation: slideDown 0.6s ease-out;
  min-height: 180px;
}

.answer-container {
  position: relative;
  width: 100%;
  max-width: 1166px;
  margin: 0 auto;
  padding-bottom: 23px;
}

/* 選項文字列表 */
.options-text {
  padding: 0;
  padding-left: 1.45em;
  text-align: left;
  padding-bottom: 35px;
  font-size: 30px;
  line-height: 1.6;
  list-style: none;
  /*  命名自訂標號變數  */
  counter-reset: my-counter;
  /* 以偽元素自訂標號樣式 */
}
.options-text li {
  /*  使用自訂標號  */
  counter-increment: my-counter;
  /* 段落首行縮排 */
  text-indent: -1.45em;
}
.options-text li::before {
  content: "(" counter(my-counter) ")";
}

/* 圓形按鈕區域 */
.options-btns {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 66px;
}

.option-btn {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 6px solid #CAE244;
  background: #293692;
  color: #DEE2EB;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  -webkit-transition: background 0.3s, -webkit-transform 0.2s;
  transition: background 0.3s, -webkit-transform 0.2s;
  transition: transform 0.2s, background 0.3s;
  transition: transform 0.2s, background 0.3s, -webkit-transform 0.2s;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
.option-btn.wrong {
  border-color: yellow;
  background-color: black;
  color: white;
}
.option-btn.correct {
  border-color: #CEEE31;
  background-color: #FF3B99;
  color: #FFE2F0;
}

/* Hover 搖晃動畫 */
@-webkit-keyframes shake {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  25% {
    -webkit-transform: rotate(-5deg);
            transform: rotate(-5deg);
  }
  75% {
    -webkit-transform: rotate(5deg);
            transform: rotate(5deg);
  }
  100% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
}
@keyframes shake {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  25% {
    -webkit-transform: rotate(-5deg);
            transform: rotate(-5deg);
  }
  75% {
    -webkit-transform: rotate(5deg);
            transform: rotate(5deg);
  }
  100% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
}
.option-btn:hover {
  -webkit-animation: shake 0.3s infinite;
          animation: shake 0.3s infinite;
}

/* 熊回饋區域 */
.bear-box {
  position: absolute;
  right: 0%;
  bottom: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
}

.bear-img {
  height: 209px;
  width: 209px;
  display: none;
}

@-webkit-keyframes popIn {
  0% {
    -webkit-transform: scale(0);
            transform: scale(0);
    opacity: 0;
  }
  60% {
    -webkit-transform: scale(1.1);
            transform: scale(1.1);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1);
            transform: scale(1);
    opacity: 1;
  }
}

@keyframes popIn {
  0% {
    -webkit-transform: scale(0);
            transform: scale(0);
    opacity: 0;
  }
  60% {
    -webkit-transform: scale(1.1);
            transform: scale(1.1);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1);
            transform: scale(1);
    opacity: 1;
  }
}
.bear-img.active {
  display: block;
  -webkit-animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
          animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.quiz-modal {
  padding: 30px;
  padding-top: 0;
  border-radius: 20px;
  text-align: center;
  position: relative;
  -webkit-animation: popIn 0.4s ease-out;
          animation: popIn 0.4s ease-out;
  opacity: 1;
  text-align: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}
.quiz-modal div {
  text-align: center;
  width: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.quiz-modal img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.retry-btn {
  background: #2450ff;
  max-width: 256px;
  margin: 0 auto;
  color: #fff;
  font-size: 1.2rem;
  padding: 12px 40px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.retry-btn:hover {
  background: var(--header-text);
}

/* 預設：顯示電腦版，隱藏手機版 */
.img-pc {
  display: block;
  width: 100%;
  height: auto;
}

.img-mb {
  display: none;
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .img-pc {
    display: none;
  }

  .img-mb {
    display: block;
  }

  .options-btns {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: (1fr)[2];
    grid-template-columns: repeat(2, 1fr);
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    margin: 0 auto 30px;
  }

  .bear-box {
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    padding-right: 0;
  }

  .challenge-page {
    padding-top: 10px;
    /* 防止動畫溢出 */
  }
  .challenge-page .container {
    padding: 50px 5% 5% 5%;
    top: 1.5%;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: auto;
    border-radius: 1.5%;
  }

  .page-title {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 20px;
  }

  .sub-tip {
    font-size: 16px;
  }

  .progress-section {
    font-size: 16px;
    gap: 5px;
    max-width: 250px;
    margin: 0 auto;
    margin-bottom: 20px;
  }

  .progress-pill {
    font-size: 12px;
  }

  .challenge-page-bg .cover {
    top: 2%;
  }

  .question-card {
    min-height: 410px;
    padding: 20px;
    padding-top: 15px;
    letter-spacing: 2px;
    font-size: 18px;
    margin-bottom: 30px;
  }

  .answer-container {
    padding: 0 25px;
  }

  .options-text {
    font-size: 18px;
    padding-bottom: 30px;
    /* 以偽元素自訂標號樣式 */
  }
  .options-text li::before {
    content: counter(my-counter) ".";
  }

  .options-btns {
    gap: 30px;
  }

  .bear-box {
    position: relative;
  }

  .bear-img {
    height: 150px;
    width: 150px;
  }
}