@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400;500&family=Share+Tech+Mono&family=Rajdhani:wght@300;400;500;600&family=Play&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

body {
    font-family: 
        'Play', 
        'Rajdhani', 
        'Noto Sans SC', /* 谷歌提供的中文字体 */
        'Source Sans 3', 
        'Microsoft YaHei', /* 微软雅黑 */
        'PingFang SC', /* 苹方 - 苹果设备 */
        'Hiragino Sans GB', /* 冬青黑体 - 苹果设备 */
        'STHeiti', /* 华文黑体 */
        'SimHei', /* 中易黑体 */
        'WenQuanYi Micro Hei', /* 文泉驿微米黑 - Linux */
        sans-serif; /* 最终回退到系统无衬线字体 */
    background-color: #030308;
    color: #e0e0e0;
    position: relative;
    background-attachment: fixed;
}

/* 替换噪点背景为数字矩阵效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(3, 3, 8, 0.96), rgba(3, 3, 8, 0.96)),
        linear-gradient(90deg, rgba(0, 220, 230, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(0, 220, 230, 0.07) 1px, transparent 1px);
    background-size: 100%, 20px 20px, 20px 20px;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2300d8e6' fill-opacity='0.1'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
    background-size: 200px 200px;
    animation: bg-scroll 60s linear infinite;
}

@keyframes bg-scroll {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

/* 添加数字矩阵效果 */
.matrix-code {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -3;
    overflow: hidden;
    opacity: 0.03;
}

.matrix-code::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300%;
    background-image: linear-gradient(0deg, transparent 24%, rgba(0, 220, 230, 0.7) 25%, rgba(0, 220, 230, 0.7) 26%, transparent 27%, transparent 74%, rgba(0, 220, 230, 0.7) 75%, rgba(0, 220, 230, 0.7) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(0, 220, 230, 0.7) 25%, rgba(0, 220, 230, 0.7) 26%, transparent 27%, transparent 74%, rgba(0, 220, 230, 0.7) 75%, rgba(0, 220, 230, 0.7) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    animation: matrix-scroll 20s linear infinite;
}

@keyframes matrix-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-500px); }
}

/* Sci-fi cyber grid background */
.dark-bg {
    background-color: #030308;
    position: relative;
    overflow: hidden;
}

.dark-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg, rgba(0, 10, 20, 0.9), rgba(5, 0, 20, 0.9));
    z-index: -1;
}

.darker-bg {
    background-color: #020205;
}

.title-font {
    font-family: 
        'Orbitron', 
        'Noto Sans SC',
        'Microsoft YaHei',
        'PingFang SC',
        'Hiragino Sans GB',
        'STHeiti',
        'SimHei',
        'WenQuanYi Micro Hei',
        sans-serif;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 220, 230, 0.5);
}

.message-bubble {
    position: relative;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    max-width: 85%;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    word-break: break-word;
    hyphens: auto;
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.15;
}

.message-bubble .copy-all-btn {
    opacity: 0;
    position: absolute;
    bottom: -8px;
    right: -8px;
    padding: 4px;
    color: #9ca3af;
    border-radius: 4px;
    background-color: rgba(31, 41, 55, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
}

.message-bubble:hover .copy-all-btn {
    opacity: 1;
}

.message-bubble .copy-all-btn:hover {
    color: #e5e7eb;
    background-color: rgba(31, 41, 55, 0.8);
}

/* Add responsive adjustments */
@media (min-width: 1024px) {
    .message-bubble {
        max-width: 70%;
    }
}

@media (min-width: 1440px) {
    .message-bubble {
        max-width: 60%;
    }
}

/* Mobile adjustment */
@media (max-width: 640px) {
    .message-bubble {
        max-width: 85%;
        padding: 0.75rem 1rem;
    }
}

.user-message {
    background-color: rgba(5, 40, 60, 0.95);
    background-image: linear-gradient(125deg, rgba(5, 45, 65, 0.95), rgba(0, 25, 40, 0.95));
    align-self: flex-end;
    border-top-right-radius: 0.25rem;
    border-left: 1px solid rgba(0, 200, 220, 0.3);
    border-bottom: 1px solid rgba(0, 200, 220, 0.3);
    margin-left: auto;
}

.bot-message {
    background-color: rgba(10, 10, 25, 0.95);
    background-image: linear-gradient(125deg, rgba(15, 15, 35, 0.95), rgba(5, 5, 20, 0.95));
    align-self: flex-start;
    border-top-left-radius: 0.25rem;
    border-right: 1px solid rgba(100, 150, 220, 0.3);
    border-bottom: 1px solid rgba(100, 150, 220, 0.3);
    margin-right: auto;
}

/* Message container wrapper */
#messages > div {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
}

/* Ensure code blocks and pre elements also respect the width */
.message-bubble pre,
.message-bubble code {
    max-width: 100%;  /* Make sure code blocks don't overflow the bubble */
    overflow-x: auto;  /* Add horizontal scroll for very long lines */
}

/* Ensure images also respect the width */
.message-bubble img {
    max-width: 300px; /* 限制最大宽度 */
    height: auto;
    border-radius: 0.5rem;
    transition: transform 0.2s ease;
}

/* 图片悬停效果 */
.message-bubble img:hover {
    transform: scale(1.02);
}

/* 移动端图片样式 */
@media (max-width: 640px) {
    .message-bubble img {
        max-width: 240px;
    }
}

/* 收藏按钮外置样式 */
.message-bubble .favorite-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 60, 80, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    opacity: 0;
    transform: scale(0.8);
}

.message-bubble:hover .favorite-btn {
    opacity: 1;
    transform: scale(1);
}

.message-bubble .favorite-btn:hover {
    background-color: rgba(0, 100, 120, 0.9);
    box-shadow: 0 0 8px rgba(0, 220, 230, 0.5);
}

.message-bubble .favorite-btn i {
    font-size: 12px;
}

.message-bubble:hover {
    box-shadow: 0 5px 15px rgba(0, 220, 230, 0.2);
}

/* Terminal-style code blocks */
.message-bubble pre {
    background-color: #0a0a1a;
    border: 1px solid #1a3a4a;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-family: 
        'Share Tech Mono', 
        'Consolas', 
        'Menlo', 
        'Monaco', 
        'Courier New', 
        monospace; /* 回退到系统等宽字体 */
    font-size: 0.875rem;
    line-height: 1.5;
    box-shadow: inset 0 0 10px rgba(0, 200, 220, 0.1);
    position: relative;
}

.message-bubble pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #00565e, #00d8e6, #00565e);
    border-radius: 3px 3px 0 0;
    opacity: 0.7;
}

.message-bubble code {
    font-family: 
        'Share Tech Mono', 
        'Consolas', 
        'Menlo', 
        'Monaco', 
        'Courier New', 
        monospace; /* 回退到系统等宽字体 */
    font-size: 0.875rem;
    color: #00d8e6;
}

.system-message {
    background-color: rgba(10, 15, 30, 0.9);
    align-self: center;
    border-radius: 0.5rem;
    border: 1px solid rgba(80, 150, 220, 0.2);
    box-shadow: 0 0 15px rgba(0, 180, 220, 0.1);
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.user-message::before {
    right: -10px;
    border-left-color: rgba(5, 45, 65, 0.95);
    border-right: 0;
}

.bot-message::before {
    left: -10px;
    border-right-color: rgba(15, 15, 35, 0.95);
    border-left: 0;
}

.spy-blue {
    background: linear-gradient(170deg, #00565e, #003943);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 220, 230, 0.3);
    box-shadow: 0 0 10px rgba(0, 220, 230, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.spy-blue::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 220, 230, 0.1), transparent 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.spy-blue:hover {
    background: linear-gradient(170deg, #006a73, #004953);
    box-shadow: 0 0 15px rgba(0, 220, 230, 0.4);
    transform: translateY(-1px);
}

.spy-blue:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* 全局按钮样式优化 */
button {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
}

/* 自定义滚动条样式 (适用于侧边栏任务列表) */
#sidebar .flex-1::-webkit-scrollbar {
  width: 6px;
}

#sidebar .flex-1::-webkit-scrollbar-track {
  background: rgba(0, 10, 20, 0.3);
  border-radius: 3px;
}

#sidebar .flex-1::-webkit-scrollbar-thumb {
  background-color: rgba(0, 180, 200, 0.4);
  border-radius: 3px;
  border: 1px solid rgba(0, 10, 20, 0.5);
}

#sidebar .flex-1::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 220, 230, 0.6);
}

/* Firefox 滚动条 */
#sidebar .flex-1 {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 180, 200, 0.4) rgba(0, 10, 20, 0.3);
}

.glow {
    box-shadow: 0 0 15px rgba(0, 220, 230, 0.4);
    animation: subtle-glow 3s infinite alternate;
}

@keyframes subtle-glow {
    0% {
        box-shadow: 0 0 15px rgba(0, 220, 230, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 220, 230, 0.5);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 220, 230, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(0, 220, 230, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 220, 230, 0);
    }
}

/* Digital scanning effect */
@keyframes scan-line {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* 确保 connect-btn 在所有屏幕尺寸下都靠右对齐 */
#connect-btn {
    margin-left: auto !important;
}

.main-chat {
    position: relative;
    overflow: hidden;
}

.main-chat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, transparent, rgba(0, 220, 230, 0.3), transparent);
    opacity: 0.3;
    z-index: 100;
    animation: scan-line 8s linear infinite;
    pointer-events: none;
}

#init-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 320px;
  border: 1px solid rgba(0, 220, 230, 0.3);
  display: none;
  z-index: 1000;
  background: linear-gradient(140deg, rgba(5, 15, 35, 0.95), rgba(20, 0, 40, 0.95));
  box-shadow: 0 5px 30px rgba(0, 220, 230, 0.2);
  animation: modal-glow 3s infinite alternate;
}

@keyframes modal-glow {
    0% { box-shadow: 0 5px 30px rgba(0, 220, 230, 0.2); }
    100% { box-shadow: 0 5px 30px rgba(0, 220, 230, 0.4); }
}

/* 调整监控ID显示样式 */
#monitoring-id {
    font-family: 'Share Tech Mono', monospace;
    color: #00d8e6;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
    text-shadow: 0 0 8px rgba(0, 220, 230, 0.3);
}
/* 添加新样式（styles.css） */
#agent-code-display-sidebar {
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 1px;
  color: #00d8e6;
  text-shadow: 0 0 8px rgba(0, 220, 230, 0.5);
}

#agent-code-badge {
  font-size: 0.75rem;
  transform: translateY(1px);
}
#init-modal[open] {
  display: block;
}

#init-modal::backdrop {
  background: radial-gradient(ellipse at center, rgba(0, 60, 80, 0.6), rgba(20, 0, 40, 0.9));
  backdrop-filter: blur(5px);
}

#sidebar.mission-item {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#sidebar.mission-item:hover {
    box-shadow: 0 0 10px rgba(0, 220, 230, 0.2) inset;
}

#user-id-input {
    transition: all 0.3s ease;
}
/* 更新后的语言切换按钮样式 */
#language-toggle {
    margin-left: 0.5rem; /* 添加左边距 */
    position: relative;
    z-index: 40;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: rgba(0, 60, 80, 0.7);
    border-radius: 5px;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    border: 1px solid rgba(0, 220, 230, 0.2);
    text-shadow: 0 0 5px rgba(0, 220, 230, 0.5);
}

#language-toggle:hover {
    background-color: rgba(0, 80, 100, 0.7);
    box-shadow: 0 0 10px rgba(0, 220, 230, 0.3);
    border-color: rgba(0, 220, 230, 0.4);
}

.user-id-tag {
    display: inline-block;
    background-color: rgba(0, 60, 80, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 4px;
    font-family: 'Share Tech Mono', monospace;
    border: 1px solid rgba(0, 220, 230, 0.2);
}

.settings-modal {
    display: none;
    background: linear-gradient(140deg, rgba(5, 15, 35, 0.95), rgba(20, 0, 40, 0.95));
    border: 1px solid rgba(0, 220, 230, 0.3);
    box-shadow: 0 5px 30px rgba(0, 220, 230, 0.2);
}

/* 调整汉堡按钮样式 */
#toggle-sidebar {
  z-index: 30; /* 确保按钮在侧边栏之上 */
  position: relative; /* 保持相对定位 */
  margin-right: 1rem; /* 添加右边距避免重叠 */
  transition: all 0.3s ease;
  color: rgba(0, 220, 230, 0.7);
}

#toggle-sidebar:hover {
  color: rgba(0, 220, 230, 1);
  text-shadow: 0 0 5px rgba(0, 220, 230, 0.5);
}

/* 当侧边栏激活时隐藏汉堡按钮 */
#sidebar.active ~ .main-chat #toggle-sidebar {
  opacity: 0;
  pointer-events: none;
}

/* 侧边栏关闭按钮样式 */
#close-sidebar {
  z-index: 50;
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  color: rgba(0, 220, 230, 0.7);
}

#close-sidebar:hover {
  color: rgba(0, 220, 230, 1);
  text-shadow: 0 0 5px rgba(0, 220, 230, 0.5);
  transform: rotate(90deg);
}

/* 侧边栏样式增强 */
#sidebar {
    background-color: rgba(5, 15, 30, 0.95);
    background-image: 
        linear-gradient(rgba(0, 180, 200, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 200, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
    box-shadow: 5px 0 20px rgba(0, 0, 20, 0.5);
    border-right: 1px solid rgba(0, 180, 200, 0.2);
}

/* 输入区域增强 */
#message-input {
    background-color: rgba(3, 10, 20, 0.9);
    border: 1px solid rgba(0, 200, 220, 0.3);
    box-shadow: 0 0 10px rgba(0, 150, 200, 0.1) inset;
    transition: all 0.3s ease;
    font-family: 'Play', 'Rajdhani', 'NotoSansSC', 'Microsoft YaHei', sans-serif;
    padding-right: 45px; /* 确保文本不会被发送按钮遮挡 */
}

#message-input:focus {
    background-color: rgba(4, 12, 25, 0.95);
    border-color: rgba(0, 220, 230, 0.5);
    box-shadow: 0 0 15px rgba(0, 180, 200, 0.2) inset, 0 0 10px rgba(0, 220, 230, 0.2);
}

/* 发送按钮修复 - 确保它在输入框右侧 */
.relative {
    position: relative;
}

#send-btn {
    position: absolute !important;
    right: 8px !important; 
    bottom: 8px !important;
    background: linear-gradient(170deg, #00565e, #003943) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#send-btn:hover {
    background: linear-gradient(170deg, #006a73, #004953) !important;
    box-shadow: 0 0 10px rgba(0, 220, 230, 0.4) !important;
    transform: scale(1.05) !important;
}

#send-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* 确保发送图标居中 */
#send-btn i {
    margin: 0 !important;
    padding: 0 !important;
}

/* 媒体查询：屏幕宽度小于790px时使用 transform 隐藏左侧栏，主区域全宽 */
@media (max-width: 790px) {
      /* 优化移动端标题布局 */
  .main-chat header {
    padding-left: 0.5rem;
  }
    #init-modal {
    width: 90%;
    margin: 0 auto;
  }
    #sidebar {
        /* 去掉 display: none，确保侧栏 DOM 存在 */
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        position: fixed !important;
        z-index: 20 !important;
        width: 16rem !important;
        display: block !important;
        height: 100vh !important;
        background-color: rgba(5, 10, 25, 0.97) !important;
    }
      #sidebar .p-4 {
    padding: 1rem;
  }
    #sidebar.active {
        transform: translateX(0) !important;
    }
    .main-chat {
        width: 100% !important;
        margin-left: 0 !important;
    }
        /* 主区域添加点击关闭支持 */
    .main-chat::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(ellipse at center, rgba(0, 40, 60, 0.4), rgba(5, 5, 20, 0.8));
        backdrop-filter: blur(3px);
        z-index: 19;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    #sidebar.active + .main-chat::after {
        opacity: 1;
        pointer-events: all;
    }
    #sidebar.active + .main-chat {
        overflow: hidden;
    }
      /* 确保语言切换按钮可见 */
  #language-toggle {
    margin-right: 2rem; /* 为关闭按钮留出空间 */
  }
  
  /* 优化标题flex布局 */
  .flex.justify-between.items-center {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* 添加 connect-btn 右对齐样式 */
  #connect-btn {
    margin-left: auto !important;
  }
}

/* 消息ID显示区域样式 */
#message-id-display {
  position: absolute;
  top: 11rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(5, 15, 35, 0.85);
  color: #00d8e6;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.5px;
  z-index: 50;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 180, 200, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 220, 230, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
}

#message-id-display.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 动画效果 */
@keyframes pulse-subtle {
  0% { box-shadow: 0 0 5px rgba(0, 220, 230, 0.3); }
  50% { box-shadow: 0 0 15px rgba(0, 220, 230, 0.5); }
  100% { box-shadow: 0 0 5px rgba(0, 220, 230, 0.3); }
}

#message-id-display.show {
  animation: pulse-subtle 2s infinite;
}

/* --- 模型选择器样式优化 --- */
.model-selector-container {
  /* 容器样式，可以根据需要添加 */
}

label[for="model-select"] {
  /* 标签样式已通过 Tailwind 类调整，这里可以添加额外覆盖 */
  text-shadow: 0 0 5px rgba(0, 180, 220, 0.3);
}

#model-select {
  appearance: none; /* 移除默认样式 */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(10, 20, 40, 0.85); /* 深邃背景 */
  border: 1px solid rgba(0, 180, 200, 0.4); /* 科技感边框 */
  color: #e0f2f7; /* 亮一点的文字颜色 */
  padding: 0.6rem 2.5rem 0.6rem 0.75rem; /* 调整内边距，为箭头留空间 */
  border-radius: 6px; /* 圆角 */
  font-family: 'Rajdhani', 'Noto Sans SC', sans-serif; /* 字体 */
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 180, 200, 0.1); /* 内外阴影 */
  /* 自定义箭头通过父级 div 实现，这里不再需要背景图片 */
}

#model-select:hover {
  background-color: rgba(15, 25, 45, 0.9);
  border-color: rgba(0, 220, 230, 0.6);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 220, 230, 0.2);
}

#model-select:focus {
  outline: none; /* 移除默认聚焦轮廓 */
  background-color: rgba(15, 25, 45, 0.95);
  border-color: #00d8e6; /* 更亮的边框 */
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 220, 230, 0.3); /* 更强的聚焦阴影 */
}

#model-select option {
  background-color: #0a1428; /* 下拉选项背景色 */
  color: #e0f2f7;
  padding: 8px 12px; /* 增加选项内边距 */
}

#model-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(20, 25, 40, 0.7);
  border-color: rgba(100, 110, 150, 0.4);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  color: #88a1b9;
}

/* 移除之前效果不佳的禁用锁图标 */
/* #model-select:disabled::after { ... } */

/* 自定义箭头容器样式 (在 index.html 中添加了 div) */
.model-selector-container .relative .pointer-events-none {
  transition: color 0.3s ease;
}

.model-selector-container .relative:hover .pointer-events-none {
  color: #00d8e6; /* 悬停时箭头变亮 */
}

/* 添加清除任务按钮的样式 */
.clear-mission-btn {
  opacity: 0.5;
  transition: all 0.2s ease;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background-color: rgba(239, 68, 68, 0.1);
}

.clear-mission-btn:hover {
  opacity: 1;
  background-color: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* 任务容器悬停时显示清除按钮 */
[data-mission-container] .clear-mission-btn {
  opacity: 0.3;
  background-color: rgba(239, 68, 68, 0.05);
}

[data-mission-container]:hover .clear-mission-btn {
  opacity: 0.7;
  background-color: rgba(239, 68, 68, 0.1);
}

/* 移除旧的选中任务样式 */

/* 增强悬停效果 */
[data-mission-container] {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
  padding: 0.75rem 0.5rem; /* 调整内边距 p-3 */
  border-left: 3px solid transparent; /* 默认透明左边框 */
}

[data-mission-container]:hover {
  background-color: rgba(0, 60, 80, 0.4); /* 更明显的悬停背景 */
  box-shadow: 0 0 8px rgba(0, 220, 230, 0.15) inset;
  border-left-color: rgba(0, 180, 200, 0.3); /* 悬停时显示浅色边框 */
}

/* 当前活动任务的样式 */
.active-mission {
  background-color: rgba(0, 80, 100, 0.6) !important; /* 更深的背景 */
  box-shadow: 0 0 12px rgba(0, 220, 230, 0.2) inset, 0 0 10px rgba(0, 220, 230, 0.1); /* 内外发光 */
  border-left-color: #00d8e6 !important; /* 亮蓝色左边框 */
}

.active-mission span { /* 活动任务的文字稍亮 */
  color: #e0f2f7;
}

/* 数字终端效果 - 加深噪点背景 */
@keyframes digital-noise {
  0%, 100% { opacity: 0.07; }
  50% { opacity: 0.12; }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.08;
  z-index: 9999;
  pointer-events: none;
  animation: digital-noise 2s infinite;
  background-blend-mode: overlay;
}

/* 增加消息冒泡上下文线效果 */
.message-bubble::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 15px;
  background: linear-gradient(to bottom, transparent, rgba(0, 220, 230, 0.3));
  bottom: -15px;
}

.user-message::after {
  right: 15px;
}

.bot-message::after {
  left: 15px;
}

/* 仿真终端效果 */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.fa-user-secret {
  position: relative;
}

.fa-user-secret::after {
  content: '_';
  position: absolute;
  bottom: 0;
  right: -8px;
  animation: blink 1s infinite;
  color: #00d8e6;
}

/* 统一的发光按钮效果 */
button.spy-blue, #connect-btn, #send-btn, #confirm-init {
  position: relative;
  overflow: hidden;
}

button.spy-blue::after, #connect-btn::after, #send-btn::after, #confirm-init::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 20px 10px rgba(0, 220, 230, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
}

button.spy-blue:hover::after, #connect-btn:hover::after, #send-btn:hover::after, #confirm-init:hover::after {
  opacity: 0.15;
}

/* Toast消息增强 */
.animate-fade-in {
  animation: fade-in-zoom 0.3s ease forwards;
  background: linear-gradient(140deg, rgba(0, 40, 60, 0.85), rgba(20, 0, 40, 0.85));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 220, 230, 0.2);
  box-shadow: 0 0 15px rgba(0, 220, 230, 0.2);
}

@keyframes fade-in-zoom {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 新增炫酷加载动画 */
@keyframes matrix-scan {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}

.pulse.w-3.h-3 {
  position: relative;
  overflow: hidden;
}

.pulse.w-3.h-3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent, rgba(0, 220, 230, 0.3),
    rgba(0, 220, 230, 0.5), rgba(0, 220, 230, 0.3),
    transparent);
  background-size: 100% 500%;
  animation: matrix-scan 1s linear infinite;
  opacity: 0.7;
}

/* 自定义中文科技感字体 */
@font-face {
    font-family: 'SourceHanSansCN';
    src: url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');
    font-display: swap;
}

body, input, button, textarea, select {
    font-family: 
        'Play', 
        'Rajdhani', 
        'Noto Sans SC', /* 谷歌提供的中文字体 */
        'Source Sans 3', 
        'Microsoft YaHei', /* 微软雅黑 */
        'PingFang SC', /* 苹方 - 苹果设备 */
        'Hiragino Sans GB', /* 冬青黑体 - 苹果设备 */
        'STHeiti', /* 华文黑体 */
        'SimHei', /* 中易黑体 */
        'WenQuanYi Micro Hei', /* 文泉驿微米黑 - Linux */
        sans-serif; /* 最终回退到系统无衬线字体 */
}

/* 修复窄窗口下侧栏和主内容关系 */
#sidebar {
  min-height: 100vh;
  height: 100%;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

@media (min-width: 791px) {
  #sidebar {
    width: 16rem;
    transform: translateX(0) !important;
    position: relative !important;
  }
  
  .main-chat {
    width: calc(100% - 16rem) !important;
  }
}

/* 确保触发机制正确 */
#toggle-sidebar {
  display: none;
}

@media (max-width: 790px) {
  #toggle-sidebar {
    display: block;
  }
}

/* 图片加载失败样式 */
.img-failed {
    background-color: rgba(10, 20, 30, 0.7);
    border: 1px dashed rgba(100, 150, 200, 0.3);
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-family: 'Share Tech Mono', monospace;
    min-height: 100px;
    position: relative;
}

.img-failed::before {
    content: '⚠ 图片加载失败';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0.8;
}

.img-failed:hover {
    background-color: rgba(15, 25, 35, 0.8);
    border-color: rgba(150, 200, 220, 0.4);
}

/* 收藏面板样式 */
#favorites-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    background-color: rgba(5, 15, 30, 0.95);
    border-left: 1px solid rgba(0, 180, 200, 0.2);
    box-shadow: -5px 0 20px rgba(0, 0, 20, 0.5);
    z-index: 40;
    display: flex;
    flex-direction: column;
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#favorites-panel.show {
    transform: translateX(0);
}

/* 收藏夹展开按钮 - 竖条样式(优化版) */
#toggle-favorites {
    z-index: 50;
    position: fixed;
    right: 17px; /* 避开滚动条 */
    top: 20%;
    transform: translateY(-20%);
    background-color: rgba(0, 180, 200, 0.8);
    color: white;
    width: 24px;
    height: 80px;
    border-top-right-radius: 12px; /* 圆角在右侧 */
    border-bottom-right-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 8px rgba(0, 220, 230, 0.5); /* 阴影在右侧 */
    transition: all 0.3s ease, transform 0.3s ease; /* 添加 transform 过渡 */
    cursor: pointer;
}

#toggle-favorites:hover {
    background-color: rgba(0, 220, 230, 0.9);
    width: 28px;
    right: 15px; /* 保持与滚动条间距 */
}

#toggle-favorites i {
    transform: rotate(-90deg); /* 反向旋转图标 */
    font-size: 14px;
}

@media (max-width: 768px) {
    #toggle-favorites {
        top: 120px;
        height: 60px;
        right: 10px; /* 移动端滚动条较窄 */
    }
    
    #toggle-favorites:hover {
        right: 8px;
    }
}

.favorite-filter {
    padding: 0.25rem 0.5rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    background-color: rgba(0, 60, 80, 0.5);
    color: #e0f2f7;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 180, 200, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-filter.active {
    background-color: rgba(0, 100, 120, 0.7);
    border-color: rgba(0, 220, 230, 0.5);
    color: white;
    box-shadow: 0 0 8px rgba(0, 220, 230, 0.3);
}

.favorite-filter:hover {
    background-color: rgba(0, 80, 100, 0.6);
}

#favorites-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.favorite-item {
    background-color: rgba(10, 20, 40, 0.7);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(0, 180, 200, 0.1);
    transition: all 0.2s ease;
}

.favorite-item:hover {
    background-color: rgba(15, 25, 45, 0.8);
    border-color: rgba(0, 220, 230, 0.3);
    box-shadow: 0 2px 8px rgba(0, 180, 200, 0.2);
}

.favorite-item img {
    max-width: 100%;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.favorite-item .content-preview {
    font-size: 0.875rem;
    color: #e0f2f7;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favorite-item .timestamp {
    font-size: 0.7rem;
    color: #88a1b9;
}

/* 响应式设计 */
/* @media (max-width: 1024px) { ... } */ /* Removed width adjustment here, handled by flex/HTML */

@media (max-width: 768px) {
    #favorites-panel {
        width: 80%;
        z-index: 45;
    }

    .main-chat {
        width: 100% !important;
    }
}

/* 收藏夹展开时，按钮跟随移动 */
#toggle-favorites.shifted {
    transform: translateY(-20%) translateX(-300px); /* 默认移动面板宽度 */
}

@media (max-width: 768px) {
    #toggle-favorites.shifted {
        transform: translateY(-20%) translateX(-80vw); /* 窄屏移动面板宽度 (80% of viewport width) */
    }
}

/* 收藏详情模态窗口样式 */
#favorite-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#favorite-detail-modal .modal-content {
  background-color: #0a192f;
  border: 1px solid rgba(0, 180, 200, 0.3);
  border-radius: 8px;
  max-width: min(800px, 90vw);
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 180, 200, 0.2);
}

#favorite-detail-title {
  font-size: 1.5rem;
  color: #e6f1ff;
  text-shadow: 0 0 8px rgba(0, 220, 230, 0.3);
}

#favorite-detail-content {
  color: #cbd6f2;
  font-size: 1rem;
  line-height: 1.6;
}

#favorite-detail-description {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 180, 200, 0.3);
  background-color: rgba(10, 25, 40, 0.8);
  color: #e6f1ff;
  font-size: 1rem;
  transition: all 0.3s ease;
  resize: none;
}

#favorite-detail-description:focus {
  border-color: #00d8e6;
  box-shadow: 0 0 10px rgba(0, 220, 230, 0.3);
  outline: none;
}

#favorite-detail-buttons {
  display: flex;
  justify-content: flex-end;
}

#favorite-detail-copy,
#favorite-detail-save,
#favorite-detail-close {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#favorite-detail-copy {
  background-color: #007bff;
  color: #fff;
  border: none;
  margin-right: 10px;
}

#favorite-detail-save {
  background-color: #28a745;
  color: #fff;
  border: none;
  margin-right: 10px;
}

#favorite-detail-close {
  background-color: #6c757d;
  color: #fff;
  border: none;
}

#favorite-detail-copy:hover,
#favorite-detail-save:hover,
#favorite-detail-close:hover {
  opacity: 0.8;
  box-shadow: 0 0 8px rgba(0, 220, 230, 0.3);
}

/* 自定义滚动条 */
.overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
  background: rgba(0, 10, 20, 0.3);
  border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
  background-color: rgba(0, 180, 200, 0.4);
  border-radius: 3px;
}

/* 图片点击放大样式 */
.image-zoom-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: zoom-out;
}

.image-zoom-container img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Markdown 内容样式 */
#favorite-detail-content {
  line-height: 1.6;
  color: #e0f2f7;
  font-size: 1rem;
}

/* Markdown 标题样式 */
#favorite-detail-content h1,
#favorite-detail-content h2,
#favorite-detail-content h3,
#favorite-detail-content h4,
#favorite-detail-content h5,
#favorite-detail-content h6 {
  color: #00d8e6;
  margin: 1.5rem 0 1rem;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(0, 220, 230, 0.3);
}

/* Markdown 段落样式 */
#favorite-detail-content p {
  margin-bottom: 1rem;
}

/* Markdown 链接样式 */
#favorite-detail-content a {
  color: #00b4d8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 180, 200, 0.5);
  transition: all 0.2s ease;
}

#favorite-detail-content a:hover {
  color: #00d8e6;
  border-bottom-color: rgba(0, 220, 230, 0.8);
}

/* Markdown 代码块样式 */
#favorite-detail-content pre {
  background-color: #0a0a1a;
  border: 1px solid #1a3a4a;
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.875rem;
  box-shadow: inset 0 0 10px rgba(0, 200, 220, 0.1);
}

#favorite-detail-content code {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.875rem;
  color: #00d8e6;
  background-color: rgba(0, 60, 80, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 0.2rem;
}

/* Markdown 列表样式 */
#favorite-detail-content ul,
#favorite-detail-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

#favorite-detail-content li {
  margin-bottom: 0.5rem;
}

/* Markdown 引用样式 */
#favorite-detail-content blockquote {
  border-left: 3px solid rgba(0, 180, 200, 0.5);
  padding-left: 1rem;
  margin: 1rem 0;
  color: #a0b4c0;
  font-style: italic;
}

/* 图片容器样式 */
#favorite-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
  box-shadow: 0 0 15px rgba(0, 180, 200, 0.2);
}

/* Add responsive adjustments for mobile */
@media (max-width: 640px) {
    .message-bubble {
        max-width: 85%;  /* Slightly wider on mobile */
        padding: 0.5rem 0.75rem;  /* Smaller padding on mobile */
    }
}

/* Light Theme Styles - ChatGPT Inspired */
[data-theme="light"] {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* 亮色主题下的滑动条样式 */
[data-theme="light"] input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
}

[data-theme="light"] input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #10a37f;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="light"] input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #10a37f;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="light"] input[type="range"]::-ms-thumb {
    width: 16px;
    height: 16px;
    background: #10a37f;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="light"] body::before {
    background: 
        linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)),
        linear-gradient(90deg, rgba(236, 236, 241, 0.2) 1px, transparent 1px),
        linear-gradient(rgba(236, 236, 241, 0.2) 1px, transparent 1px);
    background-size: 100%, 24px 24px, 24px 24px;
}

[data-theme="light"] .dark-bg {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

[data-theme="light"] .message-bubble {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .user-message {
    background-color: #f0f0f0;
    background-image: none;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .bot-message {
    background-color: #e8e8e8;
    background-image: none;
    border: 1px solid #d8d8d8;
}

[data-theme="light"] pre {
    background-color: #f7f7f8;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] code {
    color: #0969da;
    background-color: #f6f8fa;
    padding: 0.2em 0.4em;
    border-radius: 6px;
}

[data-theme="light"] #sidebar {
    background-color: #f5f5f5;
    border-right: 1px solid #e0e0e0;
}

[data-theme="light"] #message-input {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] #message-input:focus {
    border-color: #10a37f;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.2);
}

[data-theme="light"] .title-font {
    color: #1a1a1a;
    text-shadow: none;
}

[data-theme="light"] #monitoring-id {
    color: #10a37f;
    text-shadow: none;
}

/* Light theme adjustments for sidebar elements */
[data-theme="light"] #sidebar .border-gray-800 {
    border-color: #e5e5e5;
}

[data-theme="light"] [data-mission-container]:hover {
    background-color: #f0f0f0;
}

[data-theme="light"] .active-mission {
    background-color: #f7f7f8 !important;
    border-left-color: #10a37f !important;
}

[data-theme="light"] #model-select {
    background-color: #ffffff;
    border-color: #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] #model-select:focus {
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

/* Light theme buttons */
[data-theme="light"] .spy-blue,
[data-theme="light"] #send-btn {
    background: #10a37f !important;
    border: 1px solid rgba(16, 163, 127, 0.1);
    color: white;
}

[data-theme="light"] .spy-blue:hover,
[data-theme="light"] #send-btn:hover {
    background: #0e906f !important;
    box-shadow: 0 2px 5px rgba(16, 163, 127, 0.2);
}

/* Light theme favorites panel */
[data-theme="light"] #favorites-panel {
    background-color: #f5f5f5;
    border-left: 1px solid #e0e0e0;
}

[data-theme="light"] .favorite-item {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

[data-theme="light"] .favorite-item:hover {
    background-color: #e8e8e8;
    border-color: #10a37f;
    box-shadow: 0 2px 5px rgba(16, 163, 127, 0.1);
}

[data-theme="light"] .favorite-filter {
    background-color: #f0f0f0;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] .favorite-filter.active {
    background-color: #10a37f;
    border-color: #0e906f;
    color: white;
}

/* Light theme toggle button */
[data-theme="light"] #theme-toggle {
    background-color: #f7f7f8;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] #theme-toggle:hover {
    background-color: #ffffff;
    border-color: #10a37f;
    box-shadow: 0 2px 5px rgba(16, 163, 127, 0.1);
}

[data-theme="light"] #language-toggle {
    background-color: #f7f7f8;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
    text-shadow: none;
}

[data-theme="light"] #language-toggle:hover {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Light theme scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f7f7f8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background-color: #e5e5e5;
    border: 2px solid #f7f7f8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background-color: #d1d1d1;
}

/* Light theme modal windows */
[data-theme="light"] #init-modal,
[data-theme="light"] .settings-modal,
[data-theme="light"] #favorite-detail-modal .modal-content {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Hide matrix effects in light theme */
[data-theme="light"] .matrix-code,
[data-theme="light"] body::after {
    display: none;
}

/* Light theme text colors */
[data-theme="light"] .text-gray-500 {
    color: #6e6e6e;
}

[data-theme="light"] .text-gray-400 {
    color: #8e8e8e;
}

[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3, 
[data-theme="light"] h4, 
[data-theme="light"] h5, 
[data-theme="light"] h6 {
    color: #1a1a1a;
}

/* Language and Theme Toggle Buttons Container */
.flex.items-center {
    gap: 0.5rem; /* Add space between buttons */
}

#language-toggle, #theme-toggle {
    margin-left: 0;
    position: relative;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    min-width: 32px;
    height: 28px;
}

/* Light Theme Unified Styles */
[data-theme="light"] {
    background-color: #ffffff;
    color: #1a1a1a;
}

[data-theme="light"] body::before {
    background: 
        linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)),
        linear-gradient(90deg, rgba(236, 236, 241, 0.2) 1px, transparent 1px),
        linear-gradient(rgba(236, 236, 241, 0.2) 1px, transparent 1px);
    background-size: 100%, 24px 24px, 24px 24px;
}

/* Unified background colors for light theme */
[data-theme="light"] .dark-bg,
[data-theme="light"] #sidebar,
[data-theme="light"] #favorites-panel,
[data-theme="light"] #init-modal,
[data-theme="light"] .settings-modal,
[data-theme="light"] #favorite-detail-modal .modal-content,
[data-theme="light"] .model-selector-container {
    background-color: #ffffff;
    border-color: #e5e5e5;
    box-shadow: none;
}

[data-theme="light"] .border-gray-800,
[data-theme="light"] .border-b.border-gray-800,
[data-theme="light"] .border-t.border-gray-800 {
    border-color: #e5e5e5;
}

/* Message bubbles in light theme */
[data-theme="light"] .message-bubble {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .user-message {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .bot-message {
    background-color: #e8e8e8;
    border: 1px solid #d8d8d8;
}

/* Sidebar elements in light theme */
[data-theme="light"] [data-mission-container] {
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

[data-theme="light"] [data-mission-container]:hover {
    background-color: #f7f7f8;
    border-color: #e5e5e5;
}

[data-theme="light"] .active-mission {
    background-color: #f7f7f8 !important;
    border: 1px solid #e5e5e5 !important;
    border-left: 3px solid #10a37f !important;
}

/* Input and select elements in light theme */
[data-theme="light"] #message-input,
[data-theme="light"] #model-select {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] #message-input:focus,
[data-theme="light"] #model-select:focus {
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

/* Favorites panel in light theme */
[data-theme="light"] .favorite-item {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

[data-theme="light"] .favorite-item:hover {
    background-color: #e8e8e8;
    border-color: #10a37f;
    box-shadow: 0 2px 5px rgba(16, 163, 127, 0.1);
}

/* Toggle buttons in light theme */
[data-theme="light"] #language-toggle,
[data-theme="light"] #theme-toggle {
    background-color: #f7f7f8;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] #language-toggle:hover,
[data-theme="light"] #theme-toggle:hover {
    background-color: #ffffff;
    border-color: #10a37f;
    box-shadow: 0 2px 5px rgba(16, 163, 127, 0.1);
}

/* Modal elements in light theme */
[data-theme="light"] .modal-content,
[data-theme="light"] #init-modal {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #favorite-detail-description {
    background-color: #f7f7f8;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] #favorite-detail-description:focus {
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

/* Code blocks in light theme */
[data-theme="light"] pre {
    background-color: #f7f7f8;
    border: 1px solid #e5e5e5;
    color: #1a1a1a;
}

[data-theme="light"] code {
    color: #0969da;
    background-color: #f6f8fa;
    padding: 0.2em 0.4em;
    border-radius: 6px;
}

/* Buttons in light theme */
[data-theme="light"] .spy-blue,
[data-theme="light"] #send-btn {
    background: #10a37f !important;
    border: 1px solid rgba(16, 163, 127, 0.1);
    color: white;
}

[data-theme="light"] .spy-blue:hover,
[data-theme="light"] #send-btn:hover {
    background: #0e906f !important;
    box-shadow: 0 2px 5px rgba(16, 163, 127, 0.2);
}

/* Text colors in light theme */
[data-theme="light"] .text-gray-500 {
    color: #6e6e6e;
}

[data-theme="light"] .text-gray-400 {
    color: #8e8e8e;
}

[data-theme="light"] .title-font {
    color: #1a1a1a;
}

[data-theme="light"] #monitoring-id {
    color: #10a37f;
}

/* Scrollbar in light theme */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f7f7f8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background-color: #e5e5e5;
    border: 2px solid #f7f7f8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background-color: #d1d1d1;
}

/* Hide matrix effects in light theme */
[data-theme="light"] .matrix-code,
[data-theme="light"] body::after {
    display: none;
}

/* Light Theme Core Overrides */
html[data-theme="light"] {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* Override Tailwind dark backgrounds */
html[data-theme="light"] .bg-gray-900,
html[data-theme="light"] .bg-gray-800,
html[data-theme="light"] .dark-bg {
    background-color: #ffffff !important;
}

/* Unified background colors for light theme with increased specificity */
html[data-theme="light"] .dark-bg,
html[data-theme="light"] #sidebar,
html[data-theme="light"] #favorites-panel,
html[data-theme="light"] #init-modal,
html[data-theme="light"] .settings-modal,
html[data-theme="light"] #favorite-detail-modal .modal-content,
html[data-theme="light"] .model-selector-container {
    background-color: #ffffff !important;
    border-color: #e5e5e5 !important;
    box-shadow: none !important;
}

/* Override specific Tailwind border colors */
html[data-theme="light"] .border-gray-800,
html[data-theme="light"] .border-gray-700,
html[data-theme="light"] .border-b.border-gray-800,
html[data-theme="light"] .border-t.border-gray-800 {
    border-color: #e5e5e5 !important;
}

/* Message input and model select overrides */
html[data-theme="light"] #message-input,
html[data-theme="light"] #model-select,
html[data-theme="light"] select.bg-gray-900 {
    background-color: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    color: #1a1a1a !important;
}

/* Secondary backgrounds */
html[data-theme="light"] .user-message,
html[data-theme="light"] [data-mission-container]:hover,
html[data-theme="light"] .active-mission,
html[data-theme="light"] pre,
html[data-theme="light"] .favorite-item,
html[data-theme="light"] #language-toggle,
html[data-theme="light"] #theme-toggle {
    background-color: #f7f7f8 !important;
}

/* Text color overrides */
html[data-theme="light"] .text-white,
html[data-theme="light"] .text-gray-400,
html[data-theme="light"] #agent-code-display-sidebar {
    color: #1a1a1a !important;
}

html[data-theme="light"] .text-gray-500 {
    color: #6e6e6e !important;
}

/* Button overrides */
html[data-theme="light"] .spy-blue,
html[data-theme="light"] #send-btn,
html[data-theme="light"] #connect-btn,
html[data-theme="light"] #confirm-init {
    background: #10a37f !important;
    color: #ffffff !important;
    border: 1px solid rgba(16, 163, 127, 0.1) !important;
}

html[data-theme="light"] .spy-blue:hover,
html[data-theme="light"] #send-btn:hover,
html[data-theme="light"] #connect-btn:hover,
html[data-theme="light"] #confirm-init:hover {
    background: #0e906f !important;
}

/* Modal overrides */
html[data-theme="light"] #init-modal,
html[data-theme="light"] .settings-modal,
html[data-theme="light"] #favorite-detail-modal .modal-content {
    background-color: #ffffff !important;
}

/* Favorites panel specific overrides */
html[data-theme="light"] #favorites-panel {
    background-color: #ffffff !important;
}

html[data-theme="light"] .favorite-item {
    background-color: #f7f7f8 !important;
}

html[data-theme="light"] .favorite-item:hover {
    background-color: #ffffff !important;
}

/* Agent badge override */
html[data-theme="light"] .bg-blue-600 {
    background-color: #10a37f !important;
}

/* Icon colors */
html[data-theme="light"] .text-blue-400,
html[data-theme="light"] .text-blue-300 {
    color: #10a37f !important;
}

/* Model selector overrides */
html[data-theme="light"] .model-selector-container select {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    border-color: #e5e5e5 !important;
}

html[data-theme="light"] .model-selector-container select:focus {
    border-color: #10a37f !important;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2) !important;
}

/* Message container background fix */
html[data-theme="light"] #messages {
    background-color: #ffffff !important;
}

/* Scrollbar in light theme with increased specificity */
html[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f7f7f8 !important;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
    background-color: #e5e5e5 !important;
    border: 2px solid #f7f7f8 !important;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background-color: #d1d1d1 !important;
}

/* Hide matrix effects in light theme */
html[data-theme="light"] .matrix-code,
html[data-theme="light"] body::after {
    display: none !important;
}

/* Ensure proper text contrast in light theme */
html[data-theme="light"] .text-gray-600 {
    color: #4b5563 !important;
}

/* Mission items hover state */
html[data-theme="light"] [data-mission-container] {
    transition: all 0.2s ease !important;
}

html[data-theme="light"] [data-mission-container]:hover {
    background-color: #f7f7f8 !important;
    border-color: #e5e5e5 !important;
}

/* Active mission state */
html[data-theme="light"] .active-mission {
    background-color: #f7f7f8 !important;
    border: 1px solid #e5e5e5 !important;
    border-left: 3px solid #10a37f !important;
}

/* Clear mission button */
html[data-theme="light"] .clear-mission-btn {
    color: #6e6e6e !important;
}

html[data-theme="light"] .clear-mission-btn:hover {
    color: #ef4444 !important;
}

/* Sidebar specific overrides for light theme */
html[data-theme="light"] #sidebar,
html[data-theme="light"] #sidebar > div,
html[data-theme="light"] #sidebar .dark-bg,
html[data-theme="light"] .model-selector-container,
html[data-theme="light"] #sidebar .border-gray-800 {
    background-color: #ffffff !important;
    border-color: #e5e5e5 !important;
}

html[data-theme="light"] #sidebar .p-4,
html[data-theme="light"] #sidebar .border-b,
html[data-theme="light"] #sidebar .border-t {
    border-color: #e5e5e5 !important;
}

/* Mission items in sidebar */
html[data-theme="light"] [data-mission-container] {
    background-color: transparent !important;
    transition: all 0.2s ease !important;
}

html[data-theme="light"] [data-mission-container]:hover {
    background-color: #f7f7f8 !important;
}

/* Model selector in sidebar */
html[data-theme="light"] .model-selector-container {
    border-bottom-color: #e5e5e5 !important;
}

html[data-theme="light"] .model-selector-container select {
    background-color: #ffffff !important;
    border-color: #e5e5e5 !important;
    color: #1a1a1a !important;
}

/* Override any remaining dark backgrounds in sidebar */
html[data-theme="light"] #sidebar *[class*="bg-gray"],
html[data-theme="light"] #sidebar *[class*="dark-bg"] {
    background-color: #edf4f2 !important;
}

/* Ensure proper text colors in sidebar */
html[data-theme="light"] #sidebar .text-white,
html[data-theme="light"] #sidebar .text-gray-400,
html[data-theme="light"] #sidebar .text-gray-500 {
    color: #1a1a1a !important;
}

html[data-theme="light"] #sidebar .text-gray-500 {
    color: #6e6e6e !important;
}

/* Mission icons in sidebar */
html[data-theme="light"] #sidebar .text-green-500 {
    color: #10a37f !important;
}

html[data-theme="light"] #sidebar .text-blue-500 {
    color: #10a37f !important;
}

/* Agent profile section in sidebar */
html[data-theme="light"] #sidebar .bg-blue-600 {
    background-color: #10a37f !important;
}

/* Scrollbar for sidebar */
html[data-theme="light"] #sidebar ::-webkit-scrollbar-track {
    background-color: #ffffff !important;
}

html[data-theme="light"] #sidebar ::-webkit-scrollbar-thumb {
    background-color: #e5e5e5 !important;
    border: 2px solid #ffffff !important;
}

/* Override flex container backgrounds */
html[data-theme="light"] .flex.h-full,
html[data-theme="light"] .flex.flex-col {
    background-color: #ffffff !important;
}

/* Connection status and notifications in light theme */
html[data-theme="light"] #connection-status.text-green-500 {
    color: #10a37f !important;
}

html[data-theme="light"] #connection-status.text-red-500 {
    color: #dc2626 !important;
}

html[data-theme="light"] #connection-status.text-yellow-500 {
    color: #d97706 !important;
}

/* Message ID display in light theme */
html[data-theme="light"] #message-id-display {
    background-color: #f7f7f8 !important;
    border: 1px solid #e5e5e5 !important;
    color: #1a1a1a !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

/* Modal backdrops and content in light theme */
html[data-theme="light"] #init-modal::backdrop,
html[data-theme="light"] .modal-backdrop {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px) !important;
}

html[data-theme="light"] #init-modal,
html[data-theme="light"] .settings-modal,
html[data-theme="light"] #favorite-detail-modal .modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Loading and status indicators */
html[data-theme="light"] .loading-message,
html[data-theme="light"] .connected-message,
html[data-theme="light"] .animate-pulse {
    color: #10a37f !important;
}

/* Toast messages */
html[data-theme="light"] .animate-fade-in {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Loading status container */
html[data-theme="light"] #loading-status {
    background-color: #f7f7f8 !important;
    border: 1px solid #e5e5e5 !important;
}

/* Agent code display in modals */
html[data-theme="light"] #agent-code-display {
    background-color: #f7f7f8 !important;
    border: 1px solid #e5e5e5 !important;
    color: #10a37f !important;
}

/* Modal text colors */
html[data-theme="light"] #init-modal h3,
html[data-theme="light"] #favorite-detail-modal h3 {
    color: #1a1a1a !important;
}

html[data-theme="light"] #init-modal p,
html[data-theme="light"] #favorite-detail-modal p {
    color: #6e6e6e !important;
}

/* Loading icons */
html[data-theme="light"] .fa-circle-notch,
html[data-theme="light"] .fa-check-circle {
    color: #10a37f !important;
}

/* Favorite detail modal backdrop */
html[data-theme="light"] #favorite-detail-modal {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px) !important;
}

/* Override Tailwind background colors in light theme */
html[data-theme="light"] .bg-gray-700,
html[data-theme="light"] .bg-gray-800,
html[data-theme="light"] .bg-gray-900,
html[data-theme="light"] [class*="bg-gray-"] {
    --tw-bg-opacity: 1 !important;
    background-color: #ffffff !important;
}

/* Secondary backgrounds */
html[data-theme="light"] select.bg-gray-900,
html[data-theme="light"] textarea.bg-gray-900,
html[data-theme="light"] div.bg-gray-900,
html[data-theme="light"] .user-message,
html[data-theme="light"] [data-mission-container]:hover,
html[data-theme="light"] .active-mission,
html[data-theme="light"] pre,
html[data-theme="light"] .favorite-item,
html[data-theme="light"] #language-toggle,
html[data-theme="light"] #theme-toggle {
    --tw-bg-opacity: 1 !important;
    background-color: #f7f7f8 !important;
}

/* Model selector specific override */
html[data-theme="light"] #model-select.bg-gray-900 {
    --tw-bg-opacity: 1 !important;
    background-color: #ffffff !important;
}

/* Ensure proper background for focused states */
html[data-theme="light"] .focus\:bg-gray-800:focus {
    --tw-bg-opacity: 1 !important;
    background-color: #f7f7f8 !important;
}

/* Override hover states */
html[data-theme="light"] .hover\:bg-gray-800:hover {
    --tw-bg-opacity: 1 !important;
    background-color: #f7f7f8 !important;
}

/* Override any dynamic classes */
html[data-theme="light"] [class*="hover\:bg-gray-"]:hover,
html[data-theme="light"] [class*="focus\:bg-gray-"]:focus {
    --tw-bg-opacity: 1 !important;
    background-color: #f7f7f8 !important;
}

/* Ensure modals and overlays are properly colored */
html[data-theme="light"] .bg-gray-900\/90,
html[data-theme="light"] .bg-black\/50 {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Modal specific overrides for light theme */
html[data-theme="light"] #init-modal,
html[data-theme="light"] #init-modal[open] {
    background: #ffffff !important;
    background-image: none !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] #init-modal::backdrop {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px) !important;
}

/* Modal content styling for light theme */
html[data-theme="light"] #init-modal h1,
html[data-theme="light"] #init-modal h2,
html[data-theme="light"] #init-modal h3,
html[data-theme="light"] #init-modal h4 {
    color: #1a1a1a !important;
}

html[data-theme="light"] #init-modal p,
html[data-theme="light"] #init-modal label {
    color: #6e6e6e !important;
}

html[data-theme="light"] #init-modal input,
html[data-theme="light"] #init-modal select {
    background-color: #f7f7f8 !important;
    border: 1px solid #e5e5e5 !important;
    color: #1a1a1a !important;
}

html[data-theme="light"] #init-modal input:focus,
html[data-theme="light"] #init-modal select:focus {
    border-color: #10a37f !important;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2) !important;
}

/* Animation override for light theme */
@keyframes modal-glow-light {
    0% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
    100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
}

html[data-theme="light"] #init-modal {
    animation: modal-glow-light 3s infinite alternate !important;
}

/* Text color overrides for light theme */
html[data-theme="light"] body,
html[data-theme="light"] #sidebar,
html[data-theme="light"] [data-mission-container],
html[data-theme="light"] .mission-item {
    color: #1a1a1a !important;
}

/* Sidebar specific text colors */
html[data-theme="light"] #sidebar [data-mission-container] {
    color: #374151 !important; /* 更深的灰色，提高对比度 */
}

html[data-theme="light"] #sidebar [data-mission-container]:hover {
    color: #111827 !important; /* 悬停时更深的颜色 */
}

html[data-theme="light"] #sidebar .active-mission {
    color: #111827 !important; /* 选中时的颜色 */
    font-weight: 500 !important;
}

/* Secondary text colors */
html[data-theme="light"] #sidebar .text-gray-500,
html[data-theme="light"] #sidebar .text-gray-400 {
    color: #6b7280 !important; /* 中等灰色，用于次要文本 */
}

/* Mission metadata text */
html[data-theme="light"] #sidebar .mission-metadata,
html[data-theme="light"] #sidebar .text-sm {
    color: #6b7280 !important;
}

/* Ensure proper contrast for all text elements */
html[data-theme="light"] #sidebar .title-font,
html[data-theme="light"] #sidebar h1,
html[data-theme="light"] #sidebar h2,
html[data-theme="light"] #sidebar h3,
html[data-theme="light"] #sidebar h4 {
    color: #111827 !important;
}

/* Active mission text color overrides for light theme */
html[data-theme="light"] .active-mission,
html[data-theme="light"] .active-mission span,
html[data-theme="light"] .active-mission * {
    color: #111827 !important; /* 深色文本确保可读性 */
}

html[data-theme="light"] .active-mission .text-gray-400,
html[data-theme="light"] .active-mission .text-gray-500,
html[data-theme="light"] .active-mission small {
    color: #4b5563 !important; /* 次要文本使用稍浅的灰色 */
}

/* Ensure icons in active mission maintain proper color */
html[data-theme="light"] .active-mission i,
html[data-theme="light"] .active-mission .fa,
html[data-theme="light"] .active-mission .fas {
    color: #10a37f !important; /* 使用主题绿色 */
}

/* Light theme message bubbles */
[data-theme="light"] .bot-message {
    background-color: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Light theme code blocks */
[data-theme="light"] pre {
    background-color: #f8f9fc !important;
    border: 1px solid #e5e5e5 !important;
    color: #1a1a1a !important;
}

[data-theme="light"] .bot-message pre {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] code {
	color: #193e34  !important;
	background-color: #7f8ba400 !important;
	padding: 0.2em 0.4em !important;
	border-radius: 6px !important;
}

/* Override any conflicting styles */
html[data-theme="light"] .bot-message {
    background-color: #edf4f3  !important;
}

html[data-theme="light"] .bot-message pre {
  background-color: #c0d9d3 !important;
}

/* Message bubble hover effects */
[data-theme="light"] .bot-message:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .text-gray-300 {
	color: #004953 !important;
}

