* {
  margin: 0;
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: -50vh -50vw;
  z-index: -1;
  background: conic-gradient(
    from 0deg,
    #7f7bff 0% 10%,
    #ff8fec 30% 40%,
    #5ef1ff 60% 70%,
    #caa4ff 90% 100%
  );
  animation: aurora 20s linear infinite;
  filter: blur(120px) saturate(130%);
  opacity: 0.8;
}

@keyframes aurora {
  0% {
    transform: rotate(0deg) translateX(0);
  }

  50% {
    transform: rotate(120deg) translateX(20%);
  }

  100% {
    transform: rotate(360deg) translateX(0);
  }
}

body {
  font-family: montserrat, arial, verdana;
}

html {
  height: 100%;
}

.chat {
  margin-top: 24px;
  /* margin-bottom: auto; */
}
.card {
  height: 80vh;
  border-radius: 24px !important;
  background-color: rgba(0, 0, 0, 0.4) !important;
}

.msg_card_body {
  height: calc(80vh - 200px);
  max-height: calc(80vh - 200px) !important;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.card-header {
  border-radius: 24px 24px 0 0 !important;
  border-bottom: 0 !important;
}
.card-footer {
  border-radius: 0 0 24px 24px !important;
  border-top: 0 !important;
  background-color: #303e4d;
  padding: 1rem 0.5rem;
}

@media (min-width: 330px) and (max-width: 991.98px) {
  .card {
    height: 80vh;
    max-height: 80vh;
  }
}

.contacts_body {
  padding: 0.75rem 0 !important;
  overflow-y: auto;
  white-space: nowrap;
}

.container {
  align-content: center;
}
.search {
  border-radius: 15px 0 0 15px !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 0 !important;
  color: white !important;
}
.search:focus {
  box-shadow: none !important;
  outline: 0px !important;
}
.type_msg {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border-radius: 15px 0 0 15px !important;
  border: 0 !important;
  color: white !important;
  height: 60px !important;
  overflow-y: auto;
  transition: color 0.3s ease;
}
.type_msg::placeholder {
  color: #ffffff;
  opacity: 1; /* 有些瀏覽器預設 opacity 小於 1，用這行確保全白 */
  transition: color 0.3s ease;
}
/* 獲得焦點時，placeholder 漸變為灰色 */
.type_msg:focus::placeholder {
  color: #cccccc;
}
.type_msg:focus {
  box-shadow: none !important;
  outline: 0px !important;
}
.attach_btn {
  border-radius: 15px 0 0 15px !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 0 !important;
  color: white !important;
  cursor: pointer;
}
.send_btn {
  border-radius: 0 15px 15px 0 !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 0 !important;
  color: white !important;
  cursor: pointer;
  height: 60px;
}
.search_btn {
  border-radius: 0 15px 15px 0 !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 0 !important;
  color: white !important;
  cursor: pointer;
}
.contacts {
  list-style: none;
  padding: 0;
}
.contacts li {
  width: 100% !important;
  padding: 5px 10px;
  margin-bottom: 15px !important;
}
.active {
  background-color: rgba(0, 0, 0, 0.3);
}
.user_img {
  height: 70px;
  width: 70px;
  border: 1.5px solid #f5f6fa;
}
.user_img_msg {
  height: 40px;
  width: 40px;
  border: 1.5px solid #f5f6fa;
}
.img_cont {
  position: relative;
  height: 70px;
  width: 70px;
}
.img_cont_msg {
  height: 40px;
  width: 40px;
}
.online_icon {
  position: absolute;
  height: 15px;
  width: 15px;
  background-color: #4cd137;
  border-radius: 50%;
  bottom: 0.2em;
  right: 0.4em;
  border: 1.5px solid white;
}
.offline {
  background-color: #c23616 !important;
}
.user_info {
  margin-top: auto;
  margin-bottom: auto;
  margin-left: 15px;
}
.user_info span {
  font-size: 20px;
  color: white;
}
.user_info p {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}
.video_cam {
  margin-left: 50px;
  margin-top: 5px;
}
.video_cam span {
  color: white;
  font-size: 20px;
  cursor: pointer;
  margin-right: 20px;
}
.msg_cotainer {
  margin-top: auto;
  margin-bottom: auto;
  margin-left: 10px;
  border-radius: 25px;
  background-color: #82ccdd;
  padding: 10px;
  position: relative;
  width: auto;
  max-width: 75%;
}
.msg_cotainer_send {
  margin-top: auto;
  margin-bottom: auto;
  margin-right: 10px;
  border-radius: 25px;
  background-color: #78e08f;
  padding: 10px;
  position: relative;
  max-width: 75%;
}
.msg_head {
  position: relative;
}

@media (max-width: 576px) {
  .contacts_card {
    margin-bottom: 15px !important;
  }
}
/* 打字動畫相關樣式 */
.typing-cursor {
  display: inline-block;
  width: 2px;
  background-color: #000;
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.typing-dots {
  display: inline-block;
}

.typing-dots span {
  animation: dotFade 1.5s infinite;
  opacity: 0;
  font-size: 30px;
  margin-right: 3px;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.5s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 1s;
}

@keyframes dotFade {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* 美化原生滾動條 */
.msg_card_body::-webkit-scrollbar {
  width: 5px;
}

.msg_card_body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.msg_card_body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.msg_card_body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 原有樣式保持不變 */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: currentColor;
  animation: blink 1s step-end infinite;
  margin-left: 1px;
  vertical-align: text-bottom;
}

@keyframes blink {
  from,
  to {
    background-color: transparent;
  }

  50% {
    background-color: currentColor;
  }
}

/* ✅ 新增：結構化內容樣式 */
.structured-content {
  line-height: 1.6;
  font-size: 14px;
}

/* 段落樣式 */
.paragraph {
  margin-bottom: 12px;
  padding: 0;
  color: #333;
}

/* 數字列表項目 */
.numbered-item {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid #007bff;
  padding: 10px 15px;
  margin: 8px 0;
  border-radius: 0 8px 8px 0;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 項目符號列表 */
.bullet-item {
  padding: 6px 0 6px 1px;
  margin: 4px 0;
  position: relative;
  color: #495057;
}

.num-item {
  margin-left: -16px;
}

/* 高亮文字 */
.highlight-text {
  background: linear-gradient(120deg, #a8e6cf 0%, #dcedc1 100%);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: #2d5016;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 步驟項目 */
.step-item {
  background: #f1f8ff;
  border: 1px solid #c3d9ff;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 0;
  display: flex;
  align-items: flex-start;
}

.step-label {
  background: #007bff;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 12px;
  white-space: nowrap;
  min-width: fit-content;
}

.step-content {
  flex: 1;
  color: #495057;
  line-height: 1.5;
}

/* 問答對話 */
.qa-pair {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 15px;
  margin: 12px 0;
}

.question {
  font-weight: 600;
  color: #856404;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.question:before {
  content: "Q";
  background: #ffc107;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 2px;
}

.answer {
  color: #495057;
  padding-left: 20px;
  position: relative;
}

.answer:before {
  content: "A";
  background: #28a745;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 2px;
}

/* 重要提醒 */
.notice-item {
  background: linear-gradient(135deg, #fff5f5, #fed7d7);
  border-left: 4px solid #e53e3e;
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(229, 62, 62, 0.15);
}

.notice-type {
  font-weight: 700;
  color: #c53030;
  margin-right: 8px;
}

.notice-content {
  color: #2d3748;
  line-height: 1.5;
}

/* 情感格式化樣式 */
.urgent-info {
  background: linear-gradient(135deg, #fed7d7, #feb2b2);
  border-left: 4px solid #e53e3e;
  padding: 10px 15px;
  margin: 8px 0;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
  color: #742a2a;
  animation: urgentPulse 2s ease-in-out infinite;
}

.explanation {
  background: linear-gradient(135deg, #e6fffa, #b2f5ea);
  border-left: 4px solid #38b2ac;
  padding: 10px 15px;
  margin: 8px 0;
  border-radius: 0 8px 8px 0;
  color: #234e52;
}

.solution {
  background: linear-gradient(135deg, #f0fff4, #c6f6d5);
  border-left: 4px solid #38a169;
  padding: 10px 15px;
  margin: 8px 0;
  border-radius: 0 8px 8px 0;
  color: #22543d;
}

/* 意圖導向樣式 */
.process-step {
  background: linear-gradient(135deg, #ebf8ff, #bee3f8);
  border-left: 4px solid #3182ce;
  padding: 10px 15px;
  margin: 8px 0;
  border-radius: 0 8px 8px 0;
  color: #2a4365;
}

.problem-solving {
  background: linear-gradient(135deg, #fef5e7, #fbd38d);
  border-left: 4px solid #ed8936;
  padding: 10px 15px;
  margin: 8px 0;
  border-radius: 0 8px 8px 0;
  color: #7b341e;
}

/* 打字動畫增強 */
.typing-animation {
  overflow: hidden;
}

.typing-segment {
  opacity: 0;
  animation: fadeInText 0.3s ease-in-out forwards;
}

@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes urgentPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.15);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(229, 62, 62, 0.25);
  }
}

/* 其他原有樣式保持不變 */
#suggested-questions-container {
  background-color: #f8f9fa;
  padding: 15px;
  margin-top: 15px;
  border-radius: 0.25rem;
  width: 100%;
  display: none;
  flex-direction: column;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid #dee2e6;
}

.suggested-questions-title {
  font-size: 1rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.suggested-questions-title i {
  margin-right: 8px;
  color: #495057;
}

.questions-list {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.suggested-question-btn {
  background-color: transparent;
  color: #212529;
  border: none;
  border-bottom: 1px solid #e9ecef;
  padding: 10px 5px;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.suggested-question-btn:last-child {
  border-bottom: none;
}

.suggested-question-btn:hover {
  background-color: #e9ecef;
  color: #0056b3;
}

.suggested-question-btn:hover .plus-icon {
  color: #0056b3;
}

.suggested-question-btn .question-text {
  flex-grow: 1;
  margin-right: 10px;
}

.suggested-question-btn .plus-icon {
  color: #007bff;
  font-size: 0.9em;
}

.type_msg {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.type_msg::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.send_btn {
  background-color: #4a90e2 !important;
  border-color: #4a90e2 !important;
}

.send_btn i {
  color: #ffffff;
}

.msg_cotainer,
.msg_cotainer_send {
  word-break: break-word;
}

/* 思考中動畫樣式 */
.thinking-message {
  padding-inline: 8px;
  border-radius: 0 8px 8px 0;
  color: #495057;
  font-style: italic;
  position: relative;
  overflow: hidden;
}

.thinking-dots {
  display: inline-block;
  margin-left: 5px;
}

.thinking-dots::after {
  content: "";
  animation: thinkingDots 1.5s infinite;
}

@keyframes thinkingDots {
  0%,
  20% {
    content: "";
  }

  40% {
    content: ".";
  }

  60% {
    content: "..";
  }

  80%,
  100% {
    content: "...";
  }
}

.thinking-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #007bff, #28a745);
  animation: thinkingProgress 8s linear;
  border-radius: 0 0 8px 0;
}

@keyframes thinkingProgress {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

.thinking-time {
  font-size: 11px;
  color: #6c757d;
  margin-left: 8px;
}

/* 以下都是固定免責聲明樣式 */
.disclaimer-footer {
  padding: 8px 8px 0px 8px;
  font-size: 11px;
  color: #7c858d;
  line-height: 1.3;
}

.disclaimer-icon {
  font-size: 10px;
  color: #007bff;
  opacity: 0.8;
  margin-right: 4px;
}

.disclaimer-text {
  font-weight: 400;
  letter-spacing: 0.2px;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .disclaimer-footer {
    font-size: 10px;
  }
}

/* ✅ 剩餘次數顯示器 */
.usage-indicator {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.usage-indicator:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.usage-icon {
  font-size: 11px;
  opacity: 0.8;
}

.usage-text {
  font-size: 11px;
  opacity: 0.9;
}

.usage-number {
  font-weight: 700;
  font-size: 14px;
  color: #ffd700;
  /* 金色突出數字 */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.usage-unit {
  font-size: 11px;
  opacity: 0.9;
}

/* ✅ 不同狀態的顏色變化 */
.usage-indicator.low-usage {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.3);
}

.usage-indicator.low-usage .usage-number {
  color: #ffc107;
  animation: lowUsagePulse 2s ease-in-out infinite;
}

.usage-indicator.critical-usage {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.3);
}

.usage-indicator.critical-usage .usage-number {
  color: #ff6b6b;
  animation: criticalUsagePulse 1.5s ease-in-out infinite;
}

.usage-indicator.exhausted {
  background: rgba(108, 117, 125, 0.2);
  border-color: rgba(108, 117, 125, 0.3);
  opacity: 0.7;
}

.usage-indicator.exhausted .usage-number {
  color: #6c757d;
}

/* ✅ 載入狀態樣式 */
.usage-indicator.loading {
  background: rgba(108, 117, 125, 0.2);
  border-color: rgba(108, 117, 125, 0.3);
}

.usage-indicator.loading .usage-number {
  color: #6c757d;
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ✅ 錯誤狀態樣式 */
.usage-indicator.error {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.2);
}

.usage-indicator.error .usage-number {
  color: #dc3545;
}

/* 🎯 延伸問題固定高度＆轉場 */
#suggested-questions-container {
  min-height: 200px;
  max-height: 260px;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  position: relative;
  margin-bottom: 24px;
}

.suggestions-fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.suggestions-fade-in {
  opacity: 1;
  transform: translateY(0);
}

.suggestions-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.suggestions-loading.show {
  opacity: 1;
}

.suggestions-content {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  opacity: 1;
  transform: translateY(0);
}

.suggestions-content.hide {
  opacity: 0;
  transform: translateY(10px);
}

@media (max-width: 768px) {
  #suggested-questions-container {
    min-height: 250px;
    max-height: 300px;
  }
}

.response-container {
  font-size: 15px;
  line-height: 1.8;
  padding-inline: 15px;
  transition: all 0.3s ease;
  min-height: 25px;
}

.response-container .highlight {
  background: linear-gradient(120deg, #a8e6cf 0%, #dcedc1 100%);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: #2d5016;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 保留舊的 .ai-title 樣式，並新增 .title-* 以支援後端原生 class */
.response-container .ai-title,
.response-container .title-1,
.response-container .title-2,
.response-container .title-3,
.response-container .title-4,
.response-container .title-5,
.response-container .title-6 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 10px 0 10px -16px;
  font-weight: 700;
}

.response-container .ai-title.level-1,
.response-container .title-1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.response-container .ai-title.level-2,
.response-container .title-2 {
  font-size: 1.12rem;
  line-height: 1.5;
}

.response-container .ai-title.level-3,
.response-container .title-3 {
  font-size: 1.02rem;
  line-height: 1.45;
}

.response-container .ai-title.level-4,
.response-container .title-4 {
  font-size: 1rem;
  color: #334155;
}

.response-container .ai-title.level-5,
.response-container .title-5 {
  font-size: 0.95rem;
  color: #475569;
}

.response-container .ai-title.level-6,
.response-container .title-6 {
  font-size: 0.9rem;
  color: #64748b;
}

.response-container strong {
  font-weight: 700;
  color: #111827;
}

/* 清單樣式（保留 ai-list/ai-olist，若後端直接輸出 ul/ol 同樣會正常顯示） */
.response-container ul.ai-list {
  list-style: none;
  padding-left: 1rem;
  margin: 0.35rem 0 0.85rem;
}

.response-container ul.ai-list > li {
  position: relative;
  padding-left: 0;
  margin: 0.28rem 0;
  line-height: 1.7;
}

.response-container ul.ai-list ul {
  margin: 0.25rem 0 0.4rem;
  padding-left: 1rem;
}

.response-container ul.ai-list ul > li {
  padding-left: 0.9rem;
}

.response-container ul.ai-list ul > li::before {
  width: 0.32rem;
  height: 0.32rem;
  background: #94a3b8;
  box-shadow: none;
}

.response-container ul.ai-list.actionable > li::before {
  background: transparent;
  border: 2px solid #0d6efd;
  box-shadow: none;
}

.response-container ol.ai-olist {
  padding-left: 1.2rem;
  margin: 0.35rem 0 0.85rem;
  counter-reset: item;
}

.response-container ol.ai-olist > li {
  margin: 0.28rem 0;
  line-height: 1.7;
}

/* 提示盒 */
.response-container .notice-item {
  border-left: 4px solid #f59e0b;
  background: #fff7ed;
  padding: 0.6rem 0.75rem;
  border-radius: 0.25rem;
  margin: 0.6rem 0;
}

.response-container .notice-item .notice-label {
  font-weight: 700;
  color: #b45309;
  margin-right: 0.35rem;
}

/* 步驟樣式（若後端輸出 .steps-wrapper/.step-item） */
.response-container .steps-wrapper {
  margin: 0.75rem 0 0.4rem;
  padding-left: 0.6rem;
  border-left: 3px solid #e5e7eb;
}

.response-container .steps-wrapper .step-item {
  position: relative;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border-left: none;
}

.response-container .steps-wrapper .step-item + .step-item {
  border-top: 1px dashed #e5e7eb;
}

.response-container .steps-wrapper .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  height: 1.6rem;
  padding: 0 0.5rem;
  margin-right: 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4a90e2;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.response-container .steps-wrapper .step-content {
  display: inline;
  color: #334155;
}

.response-container .steps-wrapper .step-item.is-done {
  background: #f8fffb;
  border-radius: 0.35rem;
}

.response-container .steps-wrapper .step-item.is-done .step-number {
  background: #e7f6ee;
  color: #0a7a48;
}

.response-container .steps-wrapper .step-item.is-done .step-number::after {
  content: "✓";
  font-size: 0.85em;
  margin-left: 0.25rem;
}

/* 表格 */
.response-container table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0.75rem 0;
  font-size: 0.96em;
  overflow: hidden;
  border-radius: 0.35rem;
}

.response-container table thead th {
  background: #f5f7fb;
  font-weight: 700;
  color: #334155;
}

.response-container table th,
.response-container table td {
  border: 1px solid #e5e7eb;
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.response-container table tbody tr:nth-child(even) {
  background: #fafbff;
}

.response-container table tbody tr:hover {
  background: #f0f4ff;
}

.response-container table tbody td:first-child {
  font-weight: 600;
  color: #111827;
}

.response-container table td.num,
.response-container table th.num {
  text-align: right;
}

/* 程式碼區塊 */
.response-container code {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.3rem;
  padding: 0.08rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  letter-spacing: 0.003em;
}

.response-container pre {
  background: #0b1220;
  color: #e2e8f0;
  padding: 1rem;
  margin: 0.9rem 0;
  border-radius: 0.5rem;
  overflow: auto;
  position: relative;
  padding-right: 2.25rem;
}

.response-container pre code {
  white-space: pre;
}

.response-container pre::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.response-container pre::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 8px;
}

.response-container pre::-webkit-scrollbar-track {
  background: #0b1220;
}

/* ✅ 動畫效果 */
@keyframes lowUsagePulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes criticalUsagePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* ✅ 響應式設計 */
@media (max-width: 768px) {
  .usage-indicator {
    padding: 4px 8px;
    font-size: 11px;
  }

  .usage-text {
    display: none;
    /* 手機版隱藏文字，只顯示數字 */
  }

  .usage-number {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .usage-indicator {
    padding: 3px 6px;
    font-size: 10px;
  }

  .usage-number {
    font-size: 12px;
  }
}

/* 響應式設計 */
@media (max-width: 768px) {
  .steps-wrapper {
    padding-left: 25px;
    margin: 15px 0;
  }

  .steps-wrapper::before {
    left: 12px;
  }

  .step-item {
    padding: 12px 15px;
    margin: 12px 0;
    margin-left: -12px;
  }

  .step-item::before {
    left: -15px;
    top: 15px;
    width: 6px;
    height: 6px;
  }

  .step-number {
    padding: 3px 6px;
    font-size: 0.8em;
    margin-right: 8px;
  }

  .step-content {
    font-size: 0.9em;
  }

  .main-title,
  .sub-title,
  .numbered-item,
  .notice-item {
    padding: 8px 12px;
    margin: 8px 0;
  }
}
