/* style.css */
/* —— 色票與變數 —— */
:root {
  --blue-light:     #e0f7fa;
  --blue:           #4dd0e1;
  --blue-dark:      #007c91;
  --gray-light:     #f5f5f5;
  --gray:           #ccc;
  --gray-dark:      #888;
  --text:           #333;
  --text-dark:      #222;
  --btn-blue:       #005f7f;
  --btn-blue-hover: #004f6f;
  --btn-green:      #388e3c;
  --btn-green-hover:#2e7d32;
}

/* —— Reset —— */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* —— 全頁面 —— */
body {
  font-family: "Noto Sans TC","Microsoft JhengHei",sans-serif;
  background: var(--gray-light);
  color: var(--text);
  padding: 1rem;
  line-height: 1.6;
}

/* —— Header —— */
.survey-header {
  background: linear-gradient(90deg, var(--blue-light), var(--blue));
  padding: 1rem 0;
}
.survey-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.survey-logo {
  width: 50px; height: 50px;
}
.survey-header h1 {
  color: #000000;
  font-size: 2rem;
}

/* —— Container —— */
.container {
  max-width: 600px;
  margin: 1.5rem auto;
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* —— Form Group —— */
.form-group {
  margin-bottom: 1.5rem;
}
label, p {
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
input[type="radio"] + span {
  font-size: 1.2rem;
}

/* —— Text Input —— */
input[type="text"], select {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  border: 1.5px solid var(--gray);
  border-radius: 8px;
  background: #fafafa;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--blue-dark);
  box-shadow: 0 0 5px var(--blue-dark);
}

/* —— Info Hint —— */
.form-info-hint {
  font-size: 1rem;
  color: var(--gray-dark);
  margin-top: 0.3rem;
}

/* —— 隱藏 —— */
.hidden { display: none; }

/* —— 問卷卡片 —— */
.question-step {
  display: none;
  background: #fff;
  padding: 1.8rem;
  margin-bottom: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.question-step.active {
  display: block;
}
.question-step p {
  font-size: 1.6rem;
  margin-bottom: 1.4rem;
  color: var(--text-dark);
}

/* —— 進度條 —— */
.progress-container {
  margin-bottom: 1.2rem;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--blue-dark);
  transition: width 0.3s ease;
}
.progress-text {
  text-align: right;
  font-size: 1rem;
  color: var(--text-dark);
  margin-top: 0.4rem;
}

/* —— 大按鈕選項 —— */
.choice-btn {
  width: 100%;
  padding: 1.4rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
  background: var(--btn-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .3s ease;
}
.choice-btn:hover {
  background: var(--btn-blue-hover);
}

/* —— 上一／下一題 按鈕 —— */
.step-nav {
  display: flex;
  gap: 1rem;
  margin-top: 0.8rem;
}
#prev-btn, #next-btn {
  flex: 1;
  padding: 1rem;
  font-size: 1.2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
#prev-btn {
  background: var(--gray-dark);
  color: #fff;
}
#prev-btn:hover {
  background: var(--gray);
}
#next-btn {
  background: var(--blue-dark);
  color: #fff;
}
#next-btn:hover {
  background: var(--text-dark);
}

/* —— 下一步（基本資料）按鈕 —— */
.next-btn {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.3rem;
  font-weight: 600;
  background: var(--btn-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .3s ease;
  margin-top: 1rem;
}
.next-btn:hover {
  background: var(--btn-blue-hover);
}

/* —— 送出問卷 按鈕 —— */
.submit-btn {
  width: 100%;
  padding: 1.2rem;
  margin-top: 1.4rem;
  font-size: 1.4rem;
  font-weight: 600;
  background: var(--btn-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .3s ease;
}
.submit-btn:hover {
  background: var(--btn-green-hover);
}

/* —— 感謝按鈕 —— */
#end-btn {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.3rem;
  background: var(--btn-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .3s ease;
  margin-top: 1.5rem;
}
#end-btn:hover {
  background: var(--btn-green-hover);
}

/* —— 手機響應 —— */
@media (max-width: 480px) {
  body { padding: 0.5rem; }
  .container { padding: 1rem; border-radius: 0; box-shadow: none; }
}
