body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background-color: #f4f4f8;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.chat-container {
  width: 90%;
  height: 80vh;
  max-height: 800px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 16px;
  background-color: #6a5af9;
  color: white;
  text-align: center;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.chat-messages {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 20px;
  line-height: 1.5;
  word-wrap: break-word;
}

.bot-message {
  background-color: #e5e5ea;
  color: #000;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.user-message {
  background-color: #6a5af9;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.feedback-section {
  background-color: #f0f0f0;
  padding: 15px;
  border-radius: 12px;
  margin-top: 10px;
}

.feedback-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.feedback-buttons button {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  background-color: #fff;
  font-size: 1em;
  transition: all 0.2s ease;
}

/* 新增的 class，用於取代行內樣式 */
.feedback-buttons button.selected-good {
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.feedback-buttons button.selected-normal {
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.feedback-buttons button.selected-bad {
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

#comment {
  box-sizing: border-box;
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
  margin-bottom: 10px;
}

#submitBtn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #6a5af9;
  color: white;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#submitBtn:hover {
  background-color: #5849e0;
}
#submitBtn:disabled {
  background-color: #b5b5b5;
  cursor: not-allowed;
}
#submitBtn.success {
  background-color: #28a745;
}
#submitBtn.error {
  background-color: #dc3545;
}

.chat-input {
  padding: 20px;
  border-top: 1px solid #eee;
  background-color: #f9f9f9;
  display: flex;
}

.chat-input input {
  flex-grow: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  margin-right: 10px;
}

.chat-input button {
  padding: 12px 20px;
  border: none;
  background-color: #6a5af9;
  color: white;
  border-radius: 20px;
  cursor: pointer;
}
.chat-input button:disabled {
  background-color: #b5b5b5;
}

@media (max-width: 820px) {
  .chat-container {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-header {
    border-radius: 0;
  }
}
