:root {
  --primary-color: #1d3557;
  --primary-hover: #457b9d;
  --text-color: #333;
  --bg-color: #f4f7fb;
  --widget-bg: #ffffff;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --light-gray-border: #eee;
  --light-bg-gray: #f9f9f9;
  --success-bg: #e6ffe6; /* Light green for success messages */
  --success-border: #a6d9a6;
  --success-text: #2c732c;
  --error-bg: #ffe6e6; /* Light red for error messages */
  --error-border: #d9a6a6;
  --error-text: #8b0000;
}

/* ========== Global Styles for Widget and Test Page ========== */
/* These styles apply to the main test page and will be injected for the widget */
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; /* Added common sans-serif fallbacks */
  background-color: var(--bg-color);
  margin: 0;
  padding: 20px;
  line-height: 1.6;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased; /* Better font rendering on macOS/iOS */
  -moz-osx-font-smoothing: grayscale; /* Better font rendering on macOS/iOS */
}

/* Header & Section (primarily for the test page, but good to have) */
header {
  background-color: var(--primary-color);
  color: #fff;
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 20px; /* Add some space below header */
}

section {
  margin-top: 20px;
  padding: 20px;
  background: var(--widget-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Inputs, Selects, Textareas */
select,
input[type="text"],
input[type="email"],
input[type="file"],
textarea { /* Added textarea for completeness */
  width: 100%;
  padding: 10px 12px; /* Slightly more padding */
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 12px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Add transition for focus */
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.2); /* Light focus ring */
  outline: none; /* Remove default outline */
}

/* Buttons */
button {
  padding: 10px 18px; /* Slightly more padding */
  min-height: 40px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease; /* Add transform for click feedback */
  font-size: 1rem; /* Ensure consistent font size */
  font-weight: 500;
}

button:hover {
  background-color: var(--primary-hover);
}

button:active {
  transform: translateY(1px); /* Slight press effect */
}

button:disabled {
  background-color: #b0c4d9;
  cursor: not-allowed;
}

/* Preformatted Text (for results) */
pre {
  background: #f1f3f5;
  padding: 15px; /* More padding */
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word; /* Ensure long words break */
  overflow-x: auto;
  font-family: "JetBrains Mono", "Courier New", monospace; /* Modern monospace font */
  font-size: 0.9em;
  line-height: 1.5;
  border: 1px solid var(--light-gray-border); /* Consistent border */
}

/* Footer (primarily for the test page) */
footer {
  margin-top: 30px;
  font-size: 0.85em; /* Slightly smaller font */
  color: #888;
  text-align: center;
  padding: 10px 0;
}

/* --- Floating Otter Button --- */
#thinksphere-otter-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25); /* Stronger shadow */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#thinksphere-otter-button:hover {
  transform: translateY(-2px); /* Slight lift on hover */
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

#thinksphere-otter-button img {
  width: 48px; /* Maintain size */
  height: 48px; /* Maintain size */
  border-radius: 50%; /* Makes the image itself circular */
  object-fit: contain;  /* Changed to contain to avoid cropping if image aspect ratio varies */
  overflow: hidden;
  display: block; /* Remove any inline-block spacing issues */
}

/* --- Widget Modal Overlay --- */
.widget-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay */
  display: flex; /* Changed from 'none' as default for visibility during dev, will be 'none' via JS */
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Higher z-index to ensure it's on top */
  backdrop-filter: blur(3px); /* Slightly stronger blur */
}

/* --- Widget Modal Content Box --- */
.widget-modal-content {
  background-color: var(--widget-bg);
  padding: 25px; /* Slightly more padding */
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  max-width: 550px; /* Slightly wider */
  width: 90%;
  max-height: 85vh; /* Allow more height */
  overflow-y: auto;
  position: relative;
  animation: fadeIn 0.3s ease-out;
  display: flex; /* Use flexbox for internal layout (tabs) */
  flex-direction: column;
}

/* Modal Close Button */
.widget-modal-close {
  position: absolute;
  top: 15px; /* Adjust position */
  right: 15px; /* Adjust position */
  font-size: 1.8em; /* Larger, more clickable */
  cursor: pointer;
  border: none;
  background: none;
  color: #666; /* Softer color */
  padding: 5px;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.widget-modal-close:hover {
  color: #333;
  transform: rotate(90deg); /* Playful rotation */
}

/* Login Status Block */
#login-status {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 0.95em;
  line-height: 1.5;
  color: var(--success-text);
  word-break: break-word;
}
.widget-hidden {
  display: none !important;
}

/* --- Tab Navigation Area --- */
.tab-nav {
  margin-bottom: 0;
  text-align: left;
  display: flex;
  border-bottom: 1px solid #ddd; /* Lighter border */
  flex-wrap: wrap; /* Allow tabs to wrap on smaller screens */
  margin-top: 10px; /* Add a little space above tabs */
}

.tab-nav button {
  flex-grow: 1;
  text-align: center;
  margin-right: 0px; /* No margin between buttons as they flex */
  padding: 12px 20px; /* More padding */
  font-weight: 600; /* Slightly bolder */
  border: none;
  background-color: var(--light-bg-gray); /* Default tab background */
  color: var(--text-color);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap; /* Prevent tab text from wrapping */
}

.tab-nav button:hover {
  background-color: #e6e6e6; /* Lighter hover */
  color: var(--primary-color);
}

.tab-nav button.active {
  background-color: var(--widget-bg); /* Active tab matches content background */
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  position: relative;
  z-index: 1;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05); /* Subtle shadow on active tab */
}

/* --- Tab Content Area --- */
.tab-content {
  background: var(--widget-bg);
  border: 1px solid #ddd; /* Lighter border */
  border-top: none; /* No top border as tabs cover it */
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
  display: none;
  flex-grow: 1; /* Allow content to fill available space */
  overflow-y: auto; /* Ensure tab content itself scrolls if needed */
}

.tab-content.active {
  display: block; /* Changed from 'block' to 'flex' if internal content uses flex, but 'block' is fine for general stacking */
}

/* Document list container */
#documentsContainer {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--light-gray-border);
    padding: 15px; /* Slightly more padding */
    margin-top: 15px; /* More margin */
    border-radius: var(--border-radius);
    background-color: var(--light-bg-gray); /* Consistent with light background */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* Inner shadow for scrollable area */
}

/* Individual document item in the list */
.document-item {
    border-bottom: 1px dashed var(--light-gray-border);
    padding: 12px 0; /* More vertical padding */
    margin-bottom: 8px;
    background-color: var(--widget-bg); /* White background for individual items */
    border-radius: 8px; /* Slightly rounded corners */
    padding-left: 10px; /* Indent content */
    padding-right: 10px;
}

.document-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.document-item h4 {
    margin: 0;
    font-size: 1.1em;
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space out title and toggle icon */
}

.document-item h4:hover {
    color: var(--primary-hover);
}

.document-item h4 span {
    margin-left: 10px;
    font-size: 0.8em;
    color: #888;
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 2px 6px;
    min-width: 20px; /* Ensure a minimum size for the toggle */
    text-align: center;
}

.document-item p {
    margin: 6px 0 0;
    font-size: 0.85em; /* Slightly smaller for metadata */
    color: #666;
}

/* Container for blocks within a document */
/* Using a general class for block containers, e.g., blocks-container-XYZ */
[id^="blocks-container-"] { /* This targets elements starting with 'blocks-container-' */
    margin-top: 10px;
    padding: 15px;
    background-color: var(--light-bg-gray);
    border: 1px solid var(--light-gray-border);
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

/* Individual block item within the container */
.block-item {
    border: 1px solid #ddd;
    padding: 12px; /* More padding */
    margin-bottom: 10px; /* More margin */
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); /* Slightly stronger shadow */
}

.block-item:last-child {
    margin-bottom: 0;
}

.block-item p {
    margin: 0 0 6px 0;
    font-size: 0.9em;
    line-height: 1.5;
    word-break: break-word;
}

.block-item p:last-child {
    margin-bottom: 0;
}

.block-item strong {
    color: var(--primary-color);
}

.block-item em {
    color: #888;
    font-style: italic; /* Use italic for emphasis */
}


/* --- New Styles for Multiple Task Progress Display --- */

#tasksProgressContainer {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius);
    background-color: var(--light-bg-gray);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    max-height: 250px; /* Limit height for scrollability */
    overflow-y: auto; /* Enable scrolling if many tasks */
}

.task-progress-item {
    padding: 10px 12px; /* Consistent with input padding */
    margin-bottom: 8px; /* Space between items */
    border-radius: 8px; /* Consistent border-radius */
    font-size: 0.9em;
    line-height: 1.5;
    word-break: break-word;
    
    /* Default/Progress State */
    background-color: #f0f8ff; /* Light blue for processing */
    border: 1px solid #cce0ff;
    color: #4682b4; /* SteelBlue */
    
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-progress-item strong {
    color: var(--primary-color);
}

/* Specific styles for different states if needed */
.task-progress-item.success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.task-progress-item.failure {
    background-color: var(--error-bg); /* Use new error variable */
    border: 1px solid var(--error-border); /* Use new error variable */
    color: var(--error-text); /* Use new error variable */
}

/* Optional: Add an icon or spinner for progress */
.task-progress-item::before {
    content: "🔄"; /* Default spinner/progress icon */
    margin-right: 8px;
    animation: spin 1.5s linear infinite; /* Example spin animation */
}

.task-progress-item.success::before {
    content: "✅"; /* Checkmark for success */
    animation: none;
}

.task-progress-item.failure::before {
    content: "❌"; /* Cross for failure */
    animation: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* --- Animations --- */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px); /* More pronounced slide */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px); /* More pronounced fade-in */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
  .widget-modal-content {
    width: 95%;
    padding: 15px;
  }

  .tab-nav button {
    padding: 10px 10px; /* Reduce padding for smaller screens */
    font-size: 0.9em;
  }
}



#searchResult {
    text-align: left; /* 強制 #searchResult 內部所有文本左對齊 */
    padding: 15px; /* 增加內邊距 */
    border: 1px solid var(--light-gray-border);
    margin-top: 15px;
    background-color: var(--light-bg-gray);
    border-radius: var(--border-radius); /* 使用變數保持一致 */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* 輕微內陰影 */
}

/* 針對 KaTeX 渲染的顯示模式公式塊進行調整，強制左對齊 */
/* .katex-display 是 KaTeX 為獨立公式塊生成的 CSS class */
#searchResult .katex-display {
    text-align: left !important; /* !important 確保覆蓋 KaTeX 的預設置中行為 */
    display: block; /* 確保它作為一個塊級元素 */
    margin-left: 0; /* 移除任何自動邊距，強制左對齊 */
    margin-right: 0; /* 移除任何自動邊距 */
}

/* 確保普通段落和列表也是左對齊的，雖然它們通常默認就是 */
#searchResult p,
#searchResult ul,
#searchResult ol,
#searchResult li {
    text-align: left;
}


/* --- 新增：聯絡客服區塊的樣式 --- */
#contactSupportSection {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray-border);
    text-align: center;
    background-color: var(--widget-bg); /* 與 widget 背景一致 */
    border-radius: var(--border-radius); /* 保持圓角一致 */
    padding: 15px; /* 添加內部間距 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* 輕微陰影 */
    font-size: 0.9em;
    color: var(--text-color);
}

#contactSupportSection p {
    margin-bottom: 10px;
    color: #666; /* 稍微淡一點的文字 */
    line-height: 1.5;
}

/* 將聯絡客服按鈕的樣式與通用按鈕樣式保持一致 */
#contactSupportButton {
    /* 這裡可以繼承上面定義的通用 button 樣式 */
    /* 例如：padding, background-color, color, border, border-radius, cursor, transition, font-size, font-weight */
    /* 如果要特別凸顯，可以考慮改變顏色 */
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
}

#contactSupportButton:hover {
    background-color: var(--primary-hover);
}


/* --- 新增：郵件確認彈窗的樣式 --- */
#emailConfirmationModal {
    display: none; /* 預設隱藏，由 JS 控制顯示 */
    position: fixed;
    z-index: 10000; /* 確保在最上層，與 widget-modal-overlay 同級或更高 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* 半透明背景 */
    display: flex; /* 使用 flexbox 居中內容 */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out; /* 使用現有的 fadeIn 動畫 */
}

#emailConfirmationModal > div { /* 彈窗內容框 */
    background-color: var(--widget-bg);
    margin: auto;
    padding: 25px;
    border: 1px solid var(--light-gray-border);
    width: 90%;
    max-width: 600px; /* 最大寬度 */
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* 限制最大高度，允許滾動 */
    overflow-y: auto; /* 內容過多時允許滾動 */
}

#emailConfirmationModal h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.4em;
    margin-bottom: 15px;
}

#emailConfirmationModal p {
    font-size: 0.95em;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.6;
}

#emailConfirmationModal #closeEmailModal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2em; /* 更大，更易點擊 */
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

#emailConfirmationModal #closeEmailModal:hover {
    color: #333;
    transform: rotate(90deg); /* 與 widget-modal-close 效果一致 */
}

#emailConfirmationModal div[style*="background-color: #f9f9f9"] { /* 郵件內容預覽區 */
    background-color: var(--light-bg-gray);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--light-gray-border);
}

#emailConfirmationModal #emailSubjectPreview,
#emailConfirmationModal #emailBodyPreview {
    font-family: "Segoe UI", sans-serif; /* 使用常用字體 */
    font-size: 0.9em;
    color: #555;
    white-space: pre-wrap; /* 保留換行和空白符 */
    word-break: break-word; /* 長單詞換行 */
    padding: 5px 0;
}

#emailConfirmationModal div[style*="display: flex; justify-content: flex-end;"] { /* 按鈕容器 */
    display: flex;
    justify-content: flex-end;
    gap: 10px; /* 按鈕間距 */
    margin-top: 10px; /* 與內容區的間距 */
}

#emailConfirmationModal #cancelEmailSend {
    background-color: #f4f4f4;
    color: #333;
    border: 1px solid #ddd;
    /* 繼承通用 button 樣式 */
}

#emailConfirmationModal #cancelEmailSend:hover {
    background-color: #e6e6e6;
}

#emailConfirmationModal #confirmEmailSend {
    background-color: var(--primary-color); /* 與主題色保持一致 */
    color: white;
    /* 繼承通用 button 樣式 */
}

#emailConfirmationModal #confirmEmailSend:hover {
    background-color: var(--primary-hover);
}

/* --- 響應式調整 for Modal --- */
@media (max-width: 600px) {
    #emailConfirmationModal > div {
        width: 95%;
        padding: 20px;
    }
    #emailConfirmationModal h3 {
        font-size: 1.2em;
    }
    #emailConfirmationModal #closeEmailModal {
        font-size: 1.8em;
    }
}

/* static/widget/style.css */

#thinksphere-widget-modal #searchResultPlaceholder {
    text-align: center;
    padding: 20px;
    color: #666;
}

#thinksphere-widget-modal #searchResultPlaceholder img {
    max-width: 150px;
    margin-bottom: 15px;
    opacity: 0.7;
}

#thinksphere-widget-modal #searchResultPlaceholder p {
    font-size: 0.9em;
    line-height: 1.5;
}

#thinksphere-widget-modal #searchResultPlaceholder p:first-of-type { /* 針對 "準備好體驗智慧查詢了嗎？" */
    font-size: 1.1em;
    font-weight: bold;
}

#thinksphere-widget-modal #goToUploadTabButton {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ✅ 強制字型（但不要套 color） */
/* #thinksphere-widget-modal,
#thinksphere-widget-modal * {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: normal;
  font-style: normal;
  line-height: 1.6;
} */

/* === Base 字級與樣式設定 === */
#thinksphere-widget-modal,
#thinksphere-widget-modal * {
  font-size: 0.875rem; /* = 14px if root is 16px */
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* === 標題樣式（比內文大一點）=== */
#thinksphere-widget-modal h3 {
  font-size: 1.5rem; /* = 24px */
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* === 按鈕樣式（比內文略大）=== */
#thinksphere-widget-modal button {
  font-size: 1rem;  /* = 16px */
  padding: 10px 18px;
  font-weight: 500;
}

/* === 手機響應式調整 === */
@media (max-width: 600px) {
  #thinksphere-widget-modal,
  #thinksphere-widget-modal * {
    font-size: 0.8125rem; /* = 13px */
  }

  #thinksphere-widget-modal h3 {
    font-size: 1.25rem; /* = 20px */
  }

  #thinksphere-widget-modal button {
    font-size: 0.9375rem; /* = 15px */
  }
}

/* --- 新增：卡片式任務進度顯示樣式 --- */

/* 假設這是你的 CSS */
.document-list-item {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    border: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.document-list-item:hover {
    background-color: #f0f0f0;
}

.document-list-item.selected {
    background-color: #e6f7ff; /* 選取時的背景色 */
    border-color: #91d5ff; /* 選取時的邊框色 */
    font-weight: bold;
}

/* 任務進度區塊的容器 */
#progressSection {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-bg-gray);
    border: 1px solid var(--light-gray-border);
    border-radius: var(--border-radius);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

#progressSection h3 {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 1.25em; /* 與您的 h3 樣式更貼近 */
    font-weight: 600;
    color: var(--primary-color);
}

/* 任務進度卡片的父容器 */
#tasksProgressContainer {
    display: flex;
    flex-direction: column; /* 垂直排列卡片 */
    gap: 12px; /* 每個卡片之間的間距 */
    max-height: 250px; /* 限制高度，當檔案多時可滾動 */
    overflow-y: auto;
    padding-right: 5px; /* 為滾動條預留空間 */
}

/* 每個任務進度卡片的樣式 */
.task-progress-card {
    background-color: var(--widget-bg);
    border: 1px solid var(--light-gray-border);
    border-radius: 8px; /* 圓角效果 */
    padding: 12px 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); /* 輕微的陰影，與 document-item 一致 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-break: break-word; /* 確保長檔名不會溢出 */
}

.task-progress-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* 任務資訊區塊 (檔名和狀態) */
.task-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px; /* 檔名與進度條間的間距 */
    gap: 10px; /* 避免檔名和狀態文字太靠近 */
}

/* 檔名樣式 */
.task-filename {
    font-weight: bold;
    font-size: 1em;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis; /* 當檔名過長時顯示 ... */
    white-space: nowrap; /* 避免檔名換行 */
    flex-grow: 1; /* 佔據大部分空間 */
}

/* 狀態文字樣式 */
.task-status {
    font-weight: 600;
    font-size: 0.95em;
    flex-shrink: 0; /* 不壓縮狀態文字 */
}

/* 進度條外層容器 */
.task-progress-bar-container {
    background-color: #eee;
    height: 6px; /* 進度條高度 */
    border-radius: 5px;
}

/* 進度條內層樣式 */
.task-progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease-in-out; /* 讓進度條更新時有平滑的動畫效果 */
}

/* 任務 ID 樣式 */
.task-id-text {
    font-size: 0.75em;
    color: #888;
    margin-top: 8px;
    text-align: right;
    font-family: monospace; /* 使用等寬字體讓 ID 更易讀 */
}

/* 在你的 CSS 檔案中 */

.prompt-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.prompt-card:hover {
    background-color: #f0f0f0;
}

.prompt-icon {
    font-size: 24px;
    margin-right: 15px;
    /* 這裡可以根據圖示類型給予不同顏色 */
}

.prompt-text p {
    margin: 0;
    font-weight: bold;
}

.prompt-text small {
    color: #666;
}

.parsed-info-grid {
    display: grid;
    grid-template-columns: 1fr; /* 小螢幕時一欄 */
    gap: 15px;
}
@media (min-width: 600px) {
    .parsed-info-grid {
        grid-template-columns: 1fr 1fr; /* 寬螢幕時兩欄 */
    }
}