 body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    background-image: url("/static/pics/banner.png");
    background-color: #2c3e50;
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
    color: white;
    padding: 10px 20px;
    text-align: center;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

.version {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    color: #bdc3c7; /* 淺灰色版本號，避免搶走標題焦點 */
    border: 1px solid #7f8c8d;
    padding: 2px 10px;
    border-radius: 20px;
}

.container {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.w_container {
    max-width: 850px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

section {
    margin-bottom: 30px;
}

h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #0077b6;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    margin-top: 15px;
    color: #3e87af;
}

input[type="text"],
input[type="file"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd1d9;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 1.1em;
    background-color: #fdfdfd;
}

input[type="number"] {
    padding: 6px 12px;
    border: 1px solid #ccd1d9;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 1.1em;
    background-color: #fdfdfd;    
}

textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.note {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

button {
    background-color: transparent;
    color: #0077b6; 
    border: 2px solid #0077b6;
    padding: 10px 10px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    font-family: "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    letter-spacing: 0.5px;
}

button:hover {
    background-color: #0077b6;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.chat-box {
    height: 500px;              
    overflow-y: auto;           
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    padding: 1em;
    margin-top: 1em;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.chat-box-2 {
    height: 200px;              
    overflow-y: auto;           
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    padding: 1em;
    margin-top: 1em;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.chat-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.chat-entry.user {
    flex-direction: row-reverse;
}

.chat-entry .avatar {
    margin: 0 0.5rem;
    font-size: 1.5rem;
    border-radius: 50%;
    background-color: #ccc;

}

.chat-message {
    background-color: #f1f1f1;
    border-radius: 10px;
    padding: 10px 14px;
    max-width: 80%;
    font-size: 0.95em;
}

.chat-entry.user .chat-message {
    background-color: #e3f2fd;
    margin-left: auto;
}

.chat-entry.bot .chat-message {
    background-color: #e8f5e9;
}

.form-buttons {
    margin-top: 20px;
}

.logout {
    color: white;
    font-size: 1.2em;
    text-decoration: none;
    position: absolute;
    top: 10px;
    right: 20px;
}  

.menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.menu-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem; 
}

.menu-link {
  text-decoration: none;
  color: #0077b6;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: 2px solid #0077b6;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.menu-link:hover {
  background-color: #0077b6;
  color: white;
}

.footer {
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
  background-color: #eceff1;
  font-size: 0.9rem;
  color: #555;
}

.checkbox-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
}
.checkbox-row label {
    margin: 0;
    font-weight: normal;
}

.checkbox-group {
    margin-top: 1em;
}

.left-link {
    color: white;
    font-size: 1.2em;
    text-decoration: none;
    position: absolute;
    top: 10px;
    left: 20px;;
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.question-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.question-meta {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.domain {
    font-weight: bold;
}

.status {
    color: green;
}

.status.pending {
    color: #e67e22;
}

.question-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 0.75rem;
}

.question-actions {
    text-align: right;
}

.view-button {
    background-color: #007bff;
    color: white;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.view-button:hover {
    background-color: #0056b3;
}

.best-answer-btn {
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.9em;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color 0.2s ease;
}

.best-answer-btn:hover {
    background-color: #0056b3;
}

.operations {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;  
    color: #0077b6;          
    padding: 2px 6px;
}
.icon-button:hover {
    background-color: #0077b6;
    color: white;
    border-radius: 4px;
}

.btn-link {
    display: inline-block;
    padding: 2px 6px;             
    border: 2px solid #0077b6;
    border-radius: 6px;            
    color: #0077b6;
    text-decoration: none;
    font-size: 14px;              
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-link:hover {
    background-color: #0077b6;
    color: white;
}

#drop-area {
    border: 2px dashed #bbb;
    border-radius: 8px;
    padding: 20px;
    background-color: #fefefe;
    text-align: center;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}
#drop-area.dragover {
    background-color: #e3f2fd;
}
#file-list {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}
thead {
    background-color: #f5f5f5;
    color: #0077b6
}
th, td {
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 6px;
    vertical-align: middle;
    text-align: left;
    color: #0077b6
}
tr:hover {
    background-color: #f9f9f9;
}  

.inline-form {
    display: inline-block;
    margin: 0;
}
.section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

input[type="text"], input[type="password"], textarea {
    width: 100%;
    box-sizing: border-box;
}  

select {
    width: 100%;
    box-sizing: border-box;
    color: #0077b6
}  

input[type="date"] {
    width: 95%;
    padding: 12px;
    border: 1px solid #ccd1d9;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 1.2em;
    background-color: #fdfdfd;
    color: #015786
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.answer-preview .collapsed {
    cursor: pointer;
    color: #333;
    padding: 4px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.answer-preview .more {
    color: #007BFF;
    font-size: 12px;
    margin-left: 6px;
}

.full-text {
    white-space: pre-wrap;
    background-color: #f9f9f9;
    padding: 0.5em;
    border-radius: 5px;
    line-height: 1.4;
    text-align: left;
}

.toggle-link {
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.95em;
}
.toggle-link:hover {
    color: #0056b3;
}

.hint-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
}

pre.code-block {
    background-color: #f9f9f9;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    overflow-x: auto;
    max-width: 100%;
}

.form-wrapper {
  display: flex;
  align-items: center;      
  justify-content: center;   
  height: 100vh;             
}

canvas { max-width: 100%; height: auto; }

.chart-container { width: 100%; margin-top: 40px; }

.chart-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;  
    align-items: center;       
}

.chart-item {
    width: 320px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

pre.code-block {
    background-color: #272822;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 0 0 5px 5px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 0.9em;
    flex: 1;
    overflow-y: auto;
}

pre.description-block {
    background-color: #f8f8f2;
    color: #272822;
    padding: 10px;
    border-radius: 0 0 5px 5px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 0.9em;
    flex: 1;
    overflow-y: auto;
}

.listbox h3 {
    margin: 0;
    font-size: 1.1em;
    padding: 8px 10px;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    position: sticky;  
    top: 0;
    z-index: 10;
}

.section-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: #888;   /* 較淺的灰色 */
    margin-top: 0;
    margin-bottom: 20px;
}

.agent-hint {
    font-size: 0.85em;
    color: #555;
    margin-top: 6px;
    padding: 8px;
    background-color: #f0f7ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}
.optgroup-label { font-weight: bold; color: #333; }

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    border-bottom: 1px solid #e5e5e5;
    background-color: #ffffff;
}

.preview-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}
.preview-img {
    width: 150px; 
    height: 150px;           
    object-fit: contain;             
    background-color: #eee; 
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
}
.upload-group {
    flex-grow: 1;
}
.upload-group h3 {
    margin-top: 0;
    color: #333;
}

.icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 6px;
}

.download-btn .icon {
    vertical-align: middle;
    color: inherit;
    transition: all 0.2s ease;
}

.download-btn:hover .icon {
    background-color: #0077b6;
    color: #ffffff;
    border-radius: 4px;
}

.cy-context-menus {
    z-index: 9999;
    font-family: sans-serif;
}

.highlight {
    background-color: #ffeaa7 !important;
    transition: background-color 0.5s ease;
}

.error {
    color: #b00020;
    background-color: #fbe9e7;
    padding: 10px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 1em;
}  

.filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.filter-group input,
.filter-group select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    box-sizing: border-box;
    width: 100%;
}
.no-data {
    color: #57606f;
    background-color: #f1f2f6;
    padding: 12px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 1em;
    border-left: 5px solid #ced6e0;
}

.result-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1em;
    margin-bottom: 1.5em;
    background-color: #f9f9f9;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
}

.result-content {
    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: flex-start;
}

.result-text {
    flex: 2;
}

.result-thumbnail {
    flex: 1;
    max-width: 300px;
    display: flex;
    align-items: center;     
    justify-content: center; 
    height: 300px;           
    overflow: hidden;
}

.result-thumbnail iframe {
    width: 100%;
    height: 250px;           
    border: 1px solid #ccc;
    border-radius: 4px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}
.video-card {
    border: 1px solid #eee; border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); background: #fff;
    display: flex; flex-direction: column;
}
.video-player-container {
    width: 100%; aspect-ratio: 16 / 9; background: #000;
}
video { width: 100%; height: 100%; }
.video-info { padding: 15px; flex-grow: 1; }
.video-info h3 { margin: 0 0 10px 0; font-size: 1.1em; color: #333; }
.video-info p { margin: 5px 0; font-size: 0.9em; color: #666; }
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 12px;
    font-size: 0.8em; background: #e1f5fe; color: #0288d1;
}

.textarea-container {
    position: relative;
    margin-bottom: 10px;
}
.voice-btn {
    position: absolute;
    right: 10px;
    bottom: 15px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.voice-btn:hover {
    background: #e0e0e0;
}
.voice-btn.recording {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 10px rgba(255,77,77,0.5); }
    100% { transform: scale(1); }
}




