/* =========================================
   全域
   ========================================= */

* {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
}


body {
  margin: 0;

  padding: 40px 20px;

  font-family:
    "Noto Sans TC",
    "Microsoft JhengHei",
    Arial,
    sans-serif;

  background: #f3f6f9;

  color: #2d3748;

  line-height: 1.8;
}


/* =========================================
   問卷主容器
   ========================================= */

.container {
  width: 100%;

  max-width: 900px;

  margin: 0 auto;

  padding: 44px 56px 56px;

  background: #ffffff;

  border-radius: 18px;

  box-shadow:
    0 8px 28px
    rgba(15, 23, 42, 0.08);
}


/* =========================================
   Page
   ========================================= */

.page {
  animation:
    fadeIn 0.3s ease;
}


.hidden {
  display: none !important;
}


@keyframes fadeIn {

  from {
    opacity: 0;

    transform:
      translateY(6px);
  }


  to {
    opacity: 1;

    transform:
      translateY(0);
  }

}


/* =========================================
   Typography
   ========================================= */

h1 {
  margin-top: 0;

  margin-bottom: 30px;

  font-size: 30px;

  font-weight: 700;

  text-align: center;

  color: #1f2937;
}


h2 {
  margin-top: 32px;

  margin-bottom: 18px;

  font-size: 22px;

  font-weight: 700;

  color: #293849;
}


h3 {
  margin-top: 28px;

  margin-bottom: 14px;

  font-size: 18px;

  font-weight: 600;

  color: #475569;
}


p {
  margin-top: 0;

  margin-bottom: 18px;

  font-size: 16px;
}


strong {
  color: #1f2937;

  font-weight: 700;
}


ul {
  margin-top: 10px;

  margin-bottom: 18px;

  padding-left: 24px;
}


/* =========================================
   HR
   ========================================= */

hr {
  border: none;

  border-top:
    1px solid #e2e8f0;

  margin: 38px 0;
}


/* =========================================
   問卷進度
   ========================================= */

.survey-progress {
  margin-bottom: 38px;

  padding-bottom: 24px;

  border-bottom:
    1px solid #e2e8f0;
}


.progress-info {
  display: flex;

  justify-content:
    space-between;

  align-items: center;

  margin-bottom: 10px;

  font-size: 14px;

  font-weight: 600;

  color: #64748b;
}


#page-indicator {
  color: #4f6f8f;
}


.progress-track {
  width: 100%;

  height: 9px;

  overflow: hidden;

  background: #e8edf2;

  border-radius: 999px;
}


.progress-bar {
  height: 100%;

  width: 0;

  background: #4f6f8f;

  border-radius: 999px;

  transition:
    width 0.4s ease;
}


.progress-percent {
  margin-top: 7px;

  text-align: right;

  font-size: 13px;

  color: #94a3b8;
}


/* =========================================
   研究資訊
   ========================================= */

.research-info {
  margin-top: 28px;

  padding: 20px 24px;

  background: #f8fafc;

  border-left:
    4px solid #4f6f8f;

  border-radius: 8px;
}


.research-info p {
  margin: 0;
}


/* =========================================
   首頁抽獎說明
   ========================================= */

.lottery-notice {
  margin:
    28px 0;

  padding:
    22px 26px;

  background:
    #fffaf0;

  border:
    1px solid #ead9ad;

  border-left:
    4px solid #b58a35;

  border-radius:
    10px;
}


.lottery-notice h3 {
  margin-top: 0;

  color: #725b29;
}


.lottery-notice p:last-child {
  margin-bottom: 0;
}


.lottery-notice li {
  margin-bottom: 6px;
}


/* =========================================
   情境說明
   ========================================= */

.scenario-intro {
  margin-bottom: 32px;

  padding: 28px 30px;

  background: #f8fafc;

  border:
    1px solid #e2e8f0;

  border-radius: 14px;
}


.scenario-intro h2 {
  margin-top: 0;
}


/* =========================================
   Page Instructions
   ========================================= */

.page-instruction,
.likert-instruction {
  margin-bottom: 30px;

  padding: 21px 24px;

  background: #f8fafc;

  border:
    1px solid #e2e8f0;

  border-left:
    4px solid #7c91a6;

  border-radius: 10px;
}


.page-instruction p,
.likert-instruction p {
  margin-bottom: 7px;
}


.page-instruction p:last-child,
.likert-instruction p:last-child {
  margin-bottom: 0;
}


.scale-note {
  font-size: 14px;

  color: #64748b;
}


/* =========================================
   實驗材料
   ========================================= */

.scenario-box {
  width: 100%;

  margin:
    30px auto 42px;
}


.stimulus-image {
  display: block;

  width: 100%;

  max-width: 800px;

  height: auto;

  margin:
    0 auto 28px;

  border:
    1px solid #e5e7eb;

  border-radius: 12px;

  box-shadow:
    0 4px 18px
    rgba(15, 23, 42, 0.07);
}


/* =========================================
   構面區塊
   ========================================= */

.construct-block {
  margin:
    0 0 42px;

  overflow: hidden;

  background:
    #fbfcfd;

  border:
    1px solid #d8e1e9;

  border-radius:
    15px;

  box-shadow:
    0 3px 12px
    rgba(15, 23, 42, 0.04);
}


.construct-header {
  padding:
    18px 24px;

  background:
    #eaf0f5;

  border-bottom:
    1px solid #d8e1e9;
}


.construct-title {
  margin: 0;

  font-size: 20px;

  font-weight: 700;

  color:
    #36536d;
}


.construct-questions {
  padding:
    25px 24px 4px;
}


.construct-questions .question {
  background:
    #ffffff;
}


.construct-questions .question:last-child {
  margin-bottom:
    20px;
}


/* =========================================
   Question
   ========================================= */

.question {
  margin-bottom: 24px;

  padding: 22px 24px;

  background: #ffffff;

  border:
    1px solid #e2e8f0;

  border-radius: 12px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}


.question:hover {
  border-color: #c1ccd7;

  box-shadow:
    0 3px 10px
    rgba(15, 23, 42, 0.04);
}


.question-text {
  margin-bottom: 16px;

  font-size: 16px;

  font-weight: 500;

  line-height: 1.7;
}


/* =========================================
   Likert endpoints
   ========================================= */

.scale-endpoints {
  display: flex;

  justify-content:
    space-between;

  margin:
    4px 3px 8px;

  font-size: 13px;

  color: #64748b;
}


/* =========================================
   Likert
   ========================================= */

.likert-scale {
  display: flex;

  justify-content:
    space-between;

  align-items: stretch;

  gap: 9px;

  width: 100%;
}


.likert-scale label {
  display: flex;

  flex: 1;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  min-height: 62px;

  padding: 8px 5px;

  background: #f8fafc;

  border:
    1px solid #e2e8f0;

  border-radius: 9px;

  cursor: pointer;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}


.likert-scale label:hover {
  background: #eef3f8;

  border-color: #9fb0c1;

  transform:
    translateY(-1px);
}


.likert-scale label:has(
  input:checked
) {
  background: #eaf1f7;

  border-color: #4f6f8f;

  box-shadow:
    0 0 0 1px #4f6f8f;
}


.likert-scale input[
  type="radio"
] {
  width: 17px;

  height: 17px;

  margin:
    0 0 6px;

  accent-color: #4f6f8f;

  cursor: pointer;
}


.likert-scale label span {
  font-size: 15px;

  font-weight: 600;
}


/* =========================================
   Choice Questions
   ========================================= */

.choice-list {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-top: 14px;
}


.choice-option {
  display: flex;

  align-items: center;

  gap: 11px;

  min-height: 52px;

  padding: 13px 16px;

  background: #f8fafc;

  border:
    1px solid #e2e8f0;

  border-radius: 9px;

  cursor: pointer;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}


.choice-option:hover {
  background: #eef3f8;

  border-color: #9fb0c1;
}


.choice-option:has(
  input:checked
) {
  background: #eaf1f7;

  border-color: #4f6f8f;

  box-shadow:
    0 0 0 1px #4f6f8f;
}


.choice-option input[
  type="radio"
] {
  flex-shrink: 0;

  width: 18px;

  height: 18px;

  margin: 0;

  accent-color: #4f6f8f;

  cursor: pointer;
}


.choice-option span {
  font-size: 15.5px;
}


/* =========================================
   Error
   ========================================= */

.error-message {
  display: none;

  margin-top: 13px;

  font-size: 14px;

  font-weight: 600;

  color: #b42318;
}


.question-error {
  background: #fffafa;

  border-color: #e6a2a2;
}


.question-error .error-message {
  display: block;
}


/* =========================================
   Buttons
   ========================================= */

button {
  display: block;

  min-width: 190px;

  margin:
    38px auto 0;

  padding:
    14px 30px;

  font-size: 16px;

  font-weight: 600;

  color: #ffffff;

  background: #4f6f8f;

  border: none;

  border-radius: 10px;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}


button:hover:not(
  :disabled
) {
  background: #3f5d78;

  transform:
    translateY(-1px);

  box-shadow:
    0 5px 14px
    rgba(15, 23, 42, 0.13);
}


button:disabled {
  opacity: 0.62;

  cursor: not-allowed;

  transform: none;

  box-shadow: none;
}


.secondary-button {
  background: #586f83;
}


.secondary-button:hover:not(
  :disabled
) {
  background: #43596c;
}


/* =========================================
   Completion
   ========================================= */

#completion-view {
  animation:
    fadeIn 0.35s ease;
}


.completion-card {
  padding: 34px 32px;

  text-align: center;

  background: #f8fafc;

  border:
    1px solid #dbe4ec;

  border-radius: 14px;
}


.completion-card h2 {
  margin-top: 0;

  color: #3f5d78;
}


.completion-card p {
  max-width: 650px;

  margin-left: auto;

  margin-right: auto;
}


.completion-signature {
  margin-top: 28px;

  color: #64748b;
}


.completion-icon {
  display: flex;

  align-items: center;

  justify-content: center;

  width: 58px;

  height: 58px;

  margin:
    0 auto 18px;

  font-size: 28px;

  font-weight: 700;

  color: #ffffff;

  background: #4f6f8f;

  border-radius: 50%;
}


/* =========================================
   Lottery Section
   ========================================= */

.lottery-section {
  margin-top: 34px;

  padding: 30px;

  background: #ffffff;

  border:
    1px solid #d8e0e8;

  border-radius: 14px;

  box-shadow:
    0 4px 14px
    rgba(15, 23, 42, 0.05);
}


.lottery-section h2 {
  margin-top: 0;

  text-align: center;

  color: #354e66;
}


.lottery-prizes {
  margin:
    22px 0;

  padding:
    18px 22px;

  background:
    #fffaf0;

  border:
    1px solid #ead9ad;

  border-radius:
    10px;
}


.lottery-prizes p {
  margin-bottom: 8px;
}


.lottery-prizes ul {
  margin-bottom: 0;
}


.lottery-privacy-note {
  margin:
    22px 0;

  padding:
    18px 20px;

  background:
    #f8fafc;

  border-left:
    4px solid #8095aa;

  border-radius:
    8px;

  color:
    #526273;
}


.lottery-privacy-note p {
  font-size: 14px;

  margin-bottom: 8px;
}


.lottery-privacy-note p:last-child {
  margin-bottom: 0;
}


/* =========================================
   Email
   ========================================= */

.email-field {
  margin-top: 26px;
}


.email-field label {
  display: block;

  margin-bottom: 8px;

  font-size: 16px;

  font-weight: 600;

  color: #334155;
}


.optional-text {
  margin-left: 4px;

  font-size: 14px;

  font-weight: 400;

  color: #64748b;
}


input[type="email"] {
  width: 100%;

  padding: 13px 15px;

  font-size: 16px;

  font-family: inherit;

  color: #2d3748;

  background: #ffffff;

  border:
    1px solid #cbd5e1;

  border-radius: 9px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


input[type="email"]:focus {
  border-color: #647f9b;

  box-shadow:
    0 0 0 3px
    rgba(100, 127, 155, 0.13);
}


input[type="email"]:disabled {
  background: #f1f5f9;

  color: #64748b;
}


.email-error {
  margin-top: 8px;

  font-size: 14px;

  font-weight: 600;

  color: #b42318;
}


/* =========================================
   Lottery Success
   ========================================= */

.lottery-success {
  margin-top: 24px;

  padding: 20px 22px;

  text-align: center;

  background: #f0f7f3;

  border:
    1px solid #bdd8c8;

  border-radius: 10px;

  color: #365a46;
}


.lottery-success p {
  margin:
    8px 0 0;

  font-size: 15px;
}


/* =========================================
   System Error
   ========================================= */

.system-error {
  padding: 18px 20px;

  background: #fff4f4;

  border:
    1px solid #e5a3a3;

  border-radius: 10px;

  color: #9b1c1c;

  text-align: center;
}


/* =========================================
   Tablet
   ========================================= */

@media (
  max-width: 768px
) {


  body {
    padding:
      20px 12px;
  }


  .container {
    padding:
      30px 20px 40px;

    border-radius: 12px;
  }


  h1 {
    font-size: 25px;
  }


  h2 {
    font-size: 20px;
  }


  p {
    font-size: 15px;
  }


  .scenario-intro {
    padding:
      22px 20px;
  }


  .construct-header {
    padding:
      16px 18px;
  }


  .construct-title {
    font-size:
      18px;
  }


  .construct-questions {
    padding:
      18px 14px 1px;
  }


  .question {
    padding:
      18px 16px;
  }


  .likert-scale {
    gap: 5px;
  }


  .likert-scale label {
    min-width: 0;

    padding:
      7px 2px;
  }


  .scale-endpoints {
    font-size: 12px;
  }


  button {
    width: 100%;
  }


  .lottery-section {
    padding:
      24px 20px;
  }

}


/* =========================================
   Mobile
   ========================================= */

@media (
  max-width: 600px
) {


  .choice-list {
    grid-template-columns:
      1fr;
  }


  .construct-block {
    margin-bottom:
      32px;
  }


  .likert-scale {
    gap: 3px;
  }


  .likert-scale label {
    padding:
      7px 1px;
  }


  .likert-scale label span {
    font-size: 13px;
  }


  .likert-scale input[
    type="radio"
  ] {
    width: 16px;

    height: 16px;
  }


  .question-text {
    font-size: 15px;
  }


  .progress-info {
    font-size: 13px;
  }


  .lottery-notice,
  .lottery-prizes,
  .lottery-privacy-note {
    padding:
      16px 18px;
  }

}
