/* ===== 全頁基本設定（延續轉盤的暖色調） ===== */
body {
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", sans-serif;
  background: #faf7f2;
  color: #3d3a34;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h1 {
  font-size: 26px;
  text-align: center;
  margin: 8px 0 4px;
}

.subtitle {
  color: #8a857c;
  text-align: center;
  margin: 0 0 20px;
  font-size: 14px;
}

/* ===== 畫面一：貼 JD ===== */
#jd-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #d5cfc5;
  border-radius: 12px;
  resize: vertical;
}

#start-btn {
  display: block;
  margin: 16px auto 0;
  padding: 12px 48px;
  font-size: 18px;
  border: none;
  border-radius: 999px;
  background: #185fa5;
  color: #fff;
  cursor: pointer;
}

/* ===== 畫面二：對話區 ===== */
#messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

/* 對話泡泡：面試官靠左、你靠右（跟通訊軟體一樣的慣例） */
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;      /* 保留 AI 回應裡的換行 */
}

.msg.interviewer {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e8e3da;
}

.msg.me {
  align-self: flex-end;
  background: #185fa5;
  color: #fff;
}

/* AI 思考中的提示 */
.msg.thinking {
  align-self: flex-start;
  color: #a09a8f;
  background: none;
  font-size: 14px;
}

/* ===== 輸入列 ===== */
.input-row {
  display: flex;
  gap: 8px;
}

#answer-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #d5cfc5;
  border-radius: 12px;
  resize: none;
}

.btn-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#send-btn, #finish-btn {
  padding: 10px 18px;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#send-btn {
  background: #185fa5;
  color: #fff;
}

#finish-btn {
  background: #f1ece4;
  color: #3d3a34;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
