        /* ========== 设计系统变量 ========== */
        :root {
            /* 颜色系统 */
            --color-primary: #3b82f6;
            --color-primary-hover: #2563eb;
            --color-success: #10b981;
            --color-warning: #f59e0b;
            --color-danger: #ef4444;
            --color-info: #6366f1;
            
            /* 背景色 */
            --bg-primary: #ffffff;
            --bg-secondary: #f9fafb;
            --bg-tertiary: #f3f4f6;
            --bg-overlay: rgba(255, 255, 255, 0.8);
            
            /* 文本颜色 */
            --text-primary: #111827;
            --text-secondary: #6b7280;
            --text-tertiary: #9ca3af;
            --text-white: #ffffff;
            
            /* 边框 */
            --border-color: #e5e7eb;
            --border-radius-sm: 0.375rem;
            --border-radius-md: 0.5rem;
            --border-radius-lg: 0.75rem;
            --border-radius-xl: 1rem;
            --border-radius-full: 9999px;
            
            /* 阴影 */
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            
            /* 间距 */
            --spacing-xs: 0.25rem;
            --spacing-sm: 0.5rem;
            --spacing-md: 1rem;
            --spacing-lg: 1.5rem;
            --spacing-xl: 2rem;
        }

        /* 重置body和html */
        html, body {
            margin: 0;
            padding: 0;
            height: 100%;
            width: 100%;
            overflow: hidden;
            position: relative;
        }

        .chat-container {
            position: relative;
            height: 100vh;
            width: 100vw;
            padding: 16px; /* 统一使用16px间距（上下左右） */
            box-sizing: border-box;
            display: flex;
            flex-direction: row;
            gap: 16px; /* 统一控制所有子元素之间的间距 */
        }
        
        /* 背景图片层 - 最底层 */
        .chat-container::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: url('/static/images/crm-background.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            z-index: -2;
        }
        
        /* 如果背景图片加载失败，使用渐变背景作为fallback */
        .chat-container::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            z-index: -3;
        }
        
        .glass-effect {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }
        
        #chatMessages {
            /* 移除背景和模糊效果，让内容直接显示在玻璃底上 */
            background: transparent;
            /* 美化滚动条 */
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
        }
        
        /* 美化聊天区域的滚动条 */
        #chatMessages::-webkit-scrollbar {
            width: 6px;
        }
        
        #chatMessages::-webkit-scrollbar-track {
            background: transparent;
        }
        
        #chatMessages::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            transition: background 0.2s ease;
        }
        
        #chatMessages::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        /* 聊天输入框炫彩渐变边框 */
        .chat-input-gradient-border {
            position: relative;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.05); /* 添加一点点白色背景 */
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        /* 炫彩渐变边框效果 - 静态不动，柔和色调 */
        .chat-input-gradient-border::before {
            content: '';
            position: absolute;
            inset: -2px; /* 边框宽度 */
            border-radius: 12px;
            padding: 2px;
            background: linear-gradient(
                135deg,
                rgba(147, 51, 234, 0.4),  /* 紫色 - 降低透明度 */
                rgba(59, 130, 246, 0.4),   /* 蓝色 */
                rgba(14, 165, 233, 0.4),   /* 青色 */
                rgba(168, 85, 247, 0.4),   /* 淡紫 */
                rgba(236, 72, 153, 0.4),   /* 粉色 */
                rgba(147, 51, 234, 0.4)    /* 紫色 */
            );
            -webkit-mask: 
                linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask: 
                linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
            mask-composite: exclude;
            z-index: -1;
        }

        /* 聚焦时增强亮度 */
        .chat-input-gradient-border:focus-within::before {
            filter: brightness(1.2);
        }

        /* 确保输入框textarea背景始终透明，不受思考画板展开影响 */
        #userMessage {
            background: transparent !important;
            background-color: transparent !important;
            overflow-x: hidden !important; /* 去掉横向滚动条 */
            overflow-y: hidden !important; /* 去掉竖向滚动条 */
            word-wrap: break-word; /* 允许长单词换行 */
            overflow-wrap: break-word; /* 允许长单词换行 */
            /* 隐藏滚动条但保持滚动功能 */
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
        }
        
        /* 隐藏 textarea 的滚动条（Webkit浏览器） */
        #userMessage::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }
        
        /* 当思考画板展开时，确保输入框样式不受影响 */
        #mainContainer:has(#thinkingPanel.open) #userMessage {
            background: transparent !important;
            background-color: transparent !important;
        }
        
        /* 输入框容器去掉所有滚动条 */
        #chatInputContainer {
            overflow-x: hidden !important;
            overflow-y: hidden !important;
            min-width: 0; /* 允许收缩，防止溢出 */
            /* 隐藏滚动条 */
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
        }
        
        /* 隐藏容器的滚动条（Webkit浏览器） */
        #chatInputContainer::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }

        /* 主容器布局 - 关键部分 */
        #mainContainer {
            display: flex;
            flex-direction: row; /* 强制横向排列 */
            gap: 16px; /* 团队列表和聊天窗口之间的间距 */
            flex: 1; /* 占据剩余空间，让思考面板可以独立控制宽度 */
            min-width: 0; /* 允许收缩 */
            height: 100%;
            padding: 0;
            box-sizing: border-box;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* 左侧团队列表侧边栏 */
        /* 团队侧边栏（参考CRM页面样式，带玻璃背景） */
        .team-sidebar-wrapper {
            width: 360px;
            height: calc(100vh - 32px); /* 减去上下padding */
            flex-shrink: 0;
            /* 移除旧的玻璃效果，使用新的 glass-panel 类 */
            border-radius: 24px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }
        
        /* 当功能页面显示时，禁用侧边栏的文本选择（但保持点击交互） */
        .team-sidebar-wrapper.feature-page-active {
            user-select: none !important;
        }
        
        .team-sidebar-wrapper.feature-page-active * {
            user-select: none !important;
        }
        
        /* 侧边栏中的可点击项目，禁用文本选择 */
        .team-item,
        .feature-page-item {
            user-select: none !important;
            -webkit-user-select: none !important;
            -moz-user-select: none !important;
            -ms-user-select: none !important;
        }
        
        /* 阻止侧边栏项目被拖选 */
        .team-item::selection,
        .feature-page-item::selection {
            background: transparent;
        }
        
        .team-item::-moz-selection,
        .feature-page-item::-moz-selection {
            background: transparent;
        }


        /* 左上角用户信息（参考CRM页面） */
        .team-sidebar-header {
            padding: 0;
            margin: 16px 16px 0 16px;
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: #111827;
            z-index: 10;
        }

        .team-sidebar-header h2 {
            line-height: 1.5;
            margin: 0;
            color: #111827;
            font-size: 1.125rem;
            font-weight: 700;
        }

        .team-sidebar-header p {
            margin: 0;
            color: #6b7280;
            font-size: 0.875rem;
        }
        
        /* 收起/展开按钮 */
        .toggle-list-btn {
            background: rgba(255, 255, 255, 0.6);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            padding: 6px 8px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6b7280;
            flex-shrink: 0;
        }
        
        .toggle-list-btn:hover {
            background: rgba(255, 255, 255, 0.8);
            color: #111827;
            border-color: rgba(0, 0, 0, 0.2);
        }
        
        /* 隐藏状态下的图标旋转 */
        .team-sidebar-wrapper.collapsed .toggle-list-btn svg {
            transform: rotate(0deg);
        }
        
        /* 隐藏状态下的侧边栏样式 */
        .team-sidebar-wrapper.collapsed {
            width: 0 !important;
            min-width: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
            flex-shrink: 0;
            flex-basis: 0 !important;
        }
        
        /* 侧边栏隐藏时，聊天面板自动扩展并抵消gap间距 */
        #mainContainer:has(.team-sidebar-wrapper.collapsed) #chatPanel,
        .team-sidebar-wrapper.collapsed + #chatPanel {
            flex: 1;
            margin-left: -16px !important; /* 抵消mainContainer的gap: 16px，只保留chat-container的padding: 16px */
        }
        
        /* 左侧悬浮区域（用于检测鼠标悬浮） */
        .sidebar-hover-zone {
            position: fixed;
            left: 0;
            top: 0;
            width: 60px;
            height: 100vh;
            z-index: 999;
            pointer-events: none;
        }
        
        .team-sidebar-wrapper.collapsed ~ .sidebar-hover-zone {
            pointer-events: auto;
        }
        
        /* 显示侧边栏的浮动按钮（当侧边栏隐藏时，鼠标悬浮在左侧时显示） */
        .show-sidebar-btn {
            position: fixed;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1000;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 12px;
            padding: 12px;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            opacity: 0;
            pointer-events: none;
        }
        
        .show-sidebar-btn:hover {
            background: rgba(255, 255, 255, 1);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        }
        
        /* 当侧边栏隐藏且鼠标悬浮在左侧区域时显示按钮 */
        .team-sidebar-wrapper.collapsed ~ .sidebar-hover-zone:hover ~ .show-sidebar-btn,
        .team-sidebar-wrapper.collapsed ~ .show-sidebar-btn:hover {
            opacity: 1;
            pointer-events: auto;
        }
        
        /* 当侧边栏隐藏时，悬浮区域激活 */
        .team-sidebar-wrapper.collapsed ~ .sidebar-hover-zone:hover ~ .show-sidebar-btn {
            opacity: 1;
            pointer-events: auto;
        }

        /* 侧边栏白色容器 */
        .sidebar-white-container {
            flex: 1;
            background: #ffffff;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
            min-height: 0;
            margin: 16px;
        }

        /* 侧边栏头部 */
        .sidebar-header {
            padding: 16px;
            border-bottom: 1px solid #e5e7eb;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .sidebar-header h2 {
            font-size: 1.125rem;
            font-weight: 700;
            color: #111827;
            margin: 0;
        }

        /* 搜索框容器（参考CRM页面） */
        .customer-search-container {
            padding: 12px 16px;
            background: #ffffff;
        }

        .customer-search-box {
            position: relative;
            display: flex;
            align-items: center;
            background: #f3f4f6;
            border: 1px solid transparent;
            border-radius: 8px;
            padding: 8px 12px;
            transition: all 0.2s ease;
        }

        .customer-search-box:focus-within {
            background: #ffffff;
            border-color: transparent;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .search-icon {
            flex-shrink: 0;
            margin-right: 8px;
            color: #9ca3af;
        }

        .customer-search-input {
            flex: 1;
            border: none;
            outline: none;
            background: transparent;
            font-size: 14px;
            color: #111827;
            padding: 0;
        }

        .customer-search-input::placeholder {
            color: #9ca3af;
        }

        /* 团队列表（使用customer-list样式，参考CRM页面） */
        .customer-list {
            flex: 1;
            overflow-y: auto;
            padding: 0;
            background: #ffffff;
        }

        .customer-list::-webkit-scrollbar {
            width: 6px;
        }

        .customer-list::-webkit-scrollbar-track {
            background: #f3f4f6;
            border-radius: 10px;
        }

        .customer-list::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 10px;
        }

        .customer-list::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

        /* 团队项（使用customer-item样式，参考CRM页面） */
        .team-item {
            display: flex;
            align-items: center;
            padding: 0 20px;
            margin: 0;
            margin-bottom: 5px;
            border-radius: 0;
            cursor: pointer;
            transition: all 0.2s ease;
            background: #ffffff;
            border: none;
            height: 60px;
            position: relative;
        }

        .team-item:hover {
            background: #f0f7ff !important;
            border-radius: 12px !important;
            margin-left: 4px !important;
            margin-right: 4px !important;
            margin-bottom: 5px !important;
            margin-top: 0 !important;
            padding: 0 16px !important;
            width: calc(100% - 8px) !important;
            box-sizing: border-box !important;
        }

        .team-item.active {
            background: #e0f2fe !important;
            border-radius: 12px !important;
            margin-left: 4px !important;
            margin-right: 4px !important;
            margin-bottom: 5px !important;
            margin-top: 0 !important;
            padding: 0 16px !important;
            border: none !important;
            width: calc(100% - 8px) !important;
            box-sizing: border-box !important;
        }

        .team-item-icon {
            width: 44px;
            height: 44px;
            margin-right: 12px;
            flex-shrink: 0;
            position: relative;
            border-radius: 50%;
            overflow: hidden;
            border: 2px solid #e5e7eb;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            background: #f3f4f6;
        }

        .team-item:hover .team-item-icon {
            border-color: #93c5fd;
        }

        .team-item.active .team-item-icon {
            border-color: #3b82f6;
        }

        .team-item-content {
            flex: 1;
            min-width: 0;
        }

        .team-item-name {
            font-weight: 600;
            font-size: 15px;
            color: #111827 !important;
            margin-bottom: 2px;
        }

        .team-item.active .team-item-name {
            color: #111827 !important;
            font-weight: 700;
        }

        .team-item-description {
            font-size: 12px;
            color: #6b7280 !important;
        }

        .team-item.active .team-item-description {
            color: #6b7280 !important;
        }

        /* 客户头像样式（参考CRM页面） */
        .customer-avatar-wrapper {
            width: 44px;
            height: 44px;
            flex-shrink: 0;
            position: relative;
            border-radius: 50%;
            overflow: hidden;
            border: 2px solid #e5e7eb;
            box-sizing: border-box;
        }

        .customer-avatar-fallback {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.1rem;
            font-weight: bold;
            border-radius: 50%;
        }

        /* 聊天面板 */
        #chatPanel {
            flex: 1 1 0;
            min-width: 300px;
            height: calc(100vh - 32px); /* 减去上下padding，与侧边栏高度一致 */
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* 拖动分隔条（移到思考面板内部，使用绝对定位，完全不影响flex布局） */
        #resizer {
            position: absolute;
            left: -40px; /* 向左偏移更多，扩大拖动区域 */
            top: 0;
            bottom: 0;
            width: 40px; /* 增大拖动区域宽度到40px，更容易定位 */
            background: transparent;
            cursor: col-resize;
            z-index: 30;
            user-select: none;
            transition: none;
            display: none !important; /* 完全隐藏拖动条，不影响观感 */
            pointer-events: none;
        }
        
        #resizer.hidden {
            display: none !important;
            pointer-events: none;
        }
        
        #thinkingPanel.open #resizer {
            display: none !important; /* 即使思考面板打开也隐藏拖动条 */
        }
        
        /* 鼠标悬浮时显示明显的视觉反馈 - 已禁用 */
        #resizer:hover {
            display: none !important;
        }
        
        /* 拖动时的视觉反馈 - 已禁用 */
        #resizer.resizing {
            display: none !important;
        }

        /* 思考过程面板 */
        #thinkingPanel {
            width: 0;
            height: 100%; /* 明确高度 */
            opacity: 0;
            overflow: hidden;
            flex-shrink: 0; /* 防止被压缩 */
            transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            min-width: 0;
            padding: 0;
            margin: 0;
            border: none;
            position: relative; /* 为resizer提供定位上下文 */
            /* 关闭时不占用flex空间，使用负margin抵消gap */
            margin-right: -16px; /* 抵消chat-container的gap */
            /* 确保上下布局 - 使用!important确保不被覆盖 */
            display: flex !important;
            flex-direction: column !important;
        }

        #thinkingPanel.open {
            flex: 1 1 0; /* 自动占据剩余空间，而不是固定宽度 */
            min-width: 400px; /* 设置最小宽度，确保不会太小 */
            opacity: 1;
            margin-right: 0; /* 打开时恢复正常的margin */
            /* 确保打开时也是上下布局 */
            display: flex !important;
            flex-direction: column !important;
        }
        
        /* 确保标题栏和内容区域垂直排列 */
        #thinkingPanel {
            align-items: stretch !important;
        }
        
        #thinkingPanel > div:not(#resizer) {
            flex-shrink: 0;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        /* 标题栏样式 - 使用更具体的选择器 */
        #thinkingPanel > div.bg-white.bg-opacity-30 {
            flex-shrink: 0 !important;
            flex-grow: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
            height: auto !important;
            min-height: auto !important;
            max-height: none !important;
            order: 1;
            display: flex !important;
            flex-direction: row !important; /* 标题栏内部是水平布局 */
            align-items: center !important;
        }
        
        /* 思考内容区域 */
        #thinkingPanel #thinkingProcessContent {
            flex: 1 1 auto !important;
            min-height: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
            order: 2;
            display: block !important;
            overflow-x: auto !important; /* 允许横向滚动 */
            overflow-y: auto !important; /* 允许纵向滚动 */
        }
        
        /* 确保resizer不影响布局 */
        #thinkingPanel #resizer {
            order: 0;
            position: absolute;
        }

        /* 思考步骤样式 */
        .thinking-step {
            background: white;
            border-left: 3px solid #3b82f6;
            padding: 12px 16px;
            border-radius: 0 8px 8px 0;
            margin-bottom: 12px;
            transition: all 0.2s;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .thinking-step:hover {
            background: #f9fafb;
            transform: translateX(2px);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        }

        .thinking-step-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
        }

        .thinking-step-icon {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6, #6366f1);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .thinking-step-title {
            font-weight: 600;
            color: #1f2937;
            font-size: 14px;
        }

        .thinking-step-content {
            font-size: 13px;
            color: #4b5563;
            line-height: 1.6;
            padding-left: 32px;
        }

        .thinking-panel-content {
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
            overflow-x: auto !important; /* 确保横向滚动可用 */
            overflow-y: auto !important; /* 确保纵向滚动可用 */
            /* 确保可以滚动到最左边 */
            scroll-padding-left: 0;
            scroll-padding-right: 0;
        }

        .thinking-panel-content::-webkit-scrollbar {
            width: 6px;
        }

        .thinking-panel-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .thinking-panel-content::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 3px;
        }

        .thinking-panel-content::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }

        /* 消息样式 */
        .message-bubble-user {
            background: #ffffff;
            color: #111827;
            border-radius: 8px;
            padding: 0px 14px;
            max-width: 500px;
            width: fit-content;
            min-width: 60px;
            /* 移除固定高度，让高度根据内容自适应 */
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            white-space: normal;
            word-wrap: break-word;
            font-size: 0.875rem;
            font-weight: 500;
            line-height: 1.25rem;
            /* 移除 overflow: hidden，让内容完全显示 */
            text-align: right;
        }

        .message-container {
            position: relative;
        }

        .message-timestamp {
            opacity: 0;
            transition: opacity 0.2s;
            position: absolute;
            right: 0;
            top: 100%;
            margin-top: 4px;
            white-space: nowrap;
            pointer-events: none;
            font-size: 0.75rem;
            color: #9ca3af;
        }

        .message-timestamp.assistant-timestamp {
            right: auto;
            left: 0;
        }

        .message-container:hover .message-timestamp {
            opacity: 1;
        }

        .fade-in {
            animation: fadeIn 0.3s ease-in;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* 功能页面容器样式 */
        #featurePageContainer {
            display: none;
            flex-direction: column;
            transition: opacity 0.3s ease-in-out;
            background: transparent !important;
        }
        
        /* 当功能页面隐藏时，禁用交互和文本选择，并强制隐藏 */
        #featurePageContainer.hidden {
            display: none !important;
            pointer-events: none;
            user-select: none;
        }
        
        /* 当聊天内容隐藏时，禁用交互和文本选择，并强制隐藏 */
        #chatMessages.hidden {
            display: none !important;
            pointer-events: none;
            user-select: none;
        }

        /* Markdown样式 */
        .markdown-content {
            line-height: 1.7;
            font-weight: 500;
        }

        .markdown-content p {
            margin: 0.5em 0;
        }

        .markdown-content ul, .markdown-content ol {
            margin: 0.5em 0;
            padding-left: 1.5em;
        }

        .markdown-content li {
            margin: 0.25em 0;
        }

        .markdown-content code {
            background-color: #f3f4f6;
            padding: 0.2em 0.4em;
            border-radius: 0.25rem;
            font-family: 'Courier New', monospace;
            font-size: 0.9em;
            color: #e11d48;
        }

        .markdown-content pre {
            background-color: #1f2937;
            color: #f9fafb;
            padding: 1em;
            border-radius: 0.5rem;
            overflow-x: auto;
            margin: 0.5em 0;
        }

        .markdown-content pre code {
            background-color: transparent;
            color: inherit;
            padding: 0;
        }

        .markdown-content table {
            border-collapse: collapse;
            width: auto; /* 改为auto，让表格根据内容自适应 */
            max-width: 100%; /* 确保表格不超过容器宽度 */
            margin: 1em 0;
            margin-left: 0; /* 确保居左对齐 */
            margin-right: auto; /* 确保居左对齐 */
            font-size: 0.65rem; /* 进一步减小字体：0.65rem (约10.4px) */
            background-color: #ffffff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border-radius: 0.5rem;
            overflow: hidden;
            table-layout: auto; /* 改为auto，让列宽根据内容自适应 */
        }

        .markdown-content table th,
        .markdown-content table td {
            border: 1px solid #e5e7eb;
            padding: 0.4em 0.6em; /* 适当的内边距 */
            text-align: left;
            white-space: nowrap; /* 默认不折行 */
        }
        
        /* 第一列（字段名）- 根据内容自适应 */
        .markdown-content table th:nth-child(1),
        .markdown-content table td:nth-child(1) {
            text-align: left;
            font-size: 0.6rem;
            padding-right: 0.8em; /* 右侧稍多一点间距 */
        }
        
        /* 第二列（值）- 根据内容自适应 */
        .markdown-content table th:nth-child(2),
        .markdown-content table td:nth-child(2) {
            text-align: left;
            font-size: 0.6rem;
            padding-left: 0.8em;
            padding-right: 0.8em;
        }
        
        /* 第三列（置信度）- 固定较小宽度 */
        .markdown-content table th:nth-child(3),
        .markdown-content table td:nth-child(3) {
            text-align: center;
            font-size: 0.65rem;
            width: 80px; /* 固定宽度 */
            min-width: 80px;
            max-width: 80px;
        }
        
        /* 如果有更多列（权重、贡献、来源），也设置固定宽度 */
        .markdown-content table th:nth-child(4),
        .markdown-content table td:nth-child(4),
        .markdown-content table th:nth-child(5),
        .markdown-content table td:nth-child(5),
        .markdown-content table th:nth-child(6),
        .markdown-content table td:nth-child(6) {
            text-align: center;
            font-size: 0.65rem;
            width: 70px;
            min-width: 70px;
            max-width: 70px;
        }

        .markdown-content table th {
            background-color: #f9fafb;
            font-weight: 600;
            color: #374151;
            text-align: center;
            border-bottom: 2px solid #e5e7eb;
            font-size: 0.65rem; /* 表头字体 */
            white-space: nowrap; /* 表头不折行 */
        }

        .markdown-content table td {
            color: #1f2937;
        }

        .markdown-content table tr:nth-child(even) {
            background-color: #f9fafb;
        }

        .markdown-content table tr:hover {
            background-color: #f3f4f6;
        }

        /* 置信度表格特殊样式 - 数值列居中，不折行 */
        .markdown-content table th:nth-child(3),
        .markdown-content table td:nth-child(3),
        .markdown-content table th:nth-child(4),
        .markdown-content table td:nth-child(4),
        .markdown-content table th:nth-child(5),
        .markdown-content table td:nth-child(5) {
            text-align: center;
            font-weight: 500;
            white-space: nowrap; /* 数值列不折行 */
            font-size: 0.65rem; /* 数值列字体 */
        }
        
        /* 确保markdown内容容器不会超出父容器 */
        .markdown-content {
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        
        /* 如果表格在节点日志中，确保居左对齐 */
        .glass-node-logs .markdown-content table {
            margin-left: 0;
            margin-right: auto;
        }

        /* 置信度数值高亮 */
        .markdown-content table td:nth-child(3) {
            color: #059669;
            font-weight: 600;
        }

        /* 权重数值样式 */
        .markdown-content table td:nth-child(4) {
            color: #7c3aed;
        }

        /* 贡献值样式 */
        .markdown-content table td:nth-child(5) {
            color: #dc2626;
        }

        .markdown-content blockquote {
            border-left: 4px solid #3b82f6;
            padding-left: 1em;
            margin: 0.5em 0;
            color: #6b7280;
            font-style: italic;
        }

        .markdown-content a {
            color: #3b82f6;
            text-decoration: underline;
        }

        .markdown-content a:hover {
            color: #2563eb;
        }

        .markdown-content strong {
            font-weight: 700;
            color: #1f2937;
        }

        .markdown-content em {
            font-style: italic;
        }

        /* 禁用删除线 */
        .markdown-content del,
        .markdown-content s,
        .markdown-content strike {
            text-decoration: none;
        }

        .markdown-content hr {
            border: none;
            border-top: 1px solid #e5e7eb;
            margin: 1em 0;
        }
        
        /* Agent卡片样式 */
        .step-line {
            position: absolute;
            left: 10px;
            top: 32px;
            bottom: 0;
            width: 2px;
            background: #e5e7eb;
        }

        .agent-card {
            animation: fadeIn 0.3s ease-in;
        }

        .pulse-animation {
            animation: pulse 2s infinite;
        }

        /* ========== 水晶智能体卡片样式 ========== */
        .crystal-agent-card {
            border-radius: 2rem;
            border: 1px solid rgba(255, 255, 255, 0.6);
            background: rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.05);
            overflow: hidden;
            margin-bottom: 1.5rem;
            display: none; /* 隐藏旧版卡片，只使用树形结构 */
        }

        .crystal-agent-header {
            padding: 1.5rem 2rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.4);
            background: rgba(255, 255, 255, 0.2);
        }

        .crystal-agent-icon {
            width: 3rem;
            height: 3rem;
            border-radius: 4px;
            background: linear-gradient(to bottom right, #3b82f6, #4f46e5);
            box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            transform: rotate(3deg);
            transition: transform 0.2s;
        }

        .crystal-agent-icon:hover {
            transform: rotate(0deg);
        }

        .crystal-agent-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: #1e293b;
            letter-spacing: -0.025em;
            margin: 0;
        }

        .crystal-agent-position {
            font-size: 0.875rem;
            font-weight: 500;
            color: #64748b;
            margin: 0.25rem 0 0 0;
        }

        .crystal-agent-status {
            font-size: 0.75rem;
            font-weight: 500;
            color: #64748b;
            display: flex;
            align-items: center;
            gap: 0.375rem;
            margin-top: 0.125rem;
        }

        .status-dot {
            position: relative;
            display: flex;
            height: 0.5rem;
            width: 0.5rem;
        }

        .status-dot-ping {
            position: absolute;
            display: inline-flex;
            height: 100%;
            width: 100%;
            border-radius: 9999px;
            background-color: #4ade80;
            opacity: 0.75;
            animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
        }

        .status-dot-core {
            position: relative;
            display: inline-flex;
            border-radius: 9999px;
            height: 100%;
            width: 100%;
            background-color: #22c55e;
        }

        .crystal-agent-body {
            padding: 2rem;
        }
        
        .crystal-agent-body > * + * {
            margin-top: 0.25rem;
        }

        /* 时间轴连接线 */
        .timeline-connector {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-right: 1rem;
            padding-top: 0.375rem;
            position: relative;
            flex-shrink: 0; /* 防止收缩 */
        }

        .timeline-dot {
            width: 0.75rem;
            height: 0.75rem;
            border-radius: 9999px;
            border: 2px solid #60a5fa;
            background: white;
            box-shadow: 0 0 0 3px rgba(219, 234, 254, 0.5);
            z-index: 10;
            position: relative;
            flex-shrink: 0; /* 防止收缩 */
        }

        .timeline-dot-inner {
            position: absolute;
            inset: 0;
            margin: auto;
            width: 0.25rem;
            height: 0.25rem;
            border-radius: 9999px;
            background: #60a5fa;
        }

        .timeline-line {
            width: 2px;
            min-height: 1rem; /* 确保有最小高度 */
            flex: 1 1 0%;
            background: linear-gradient(to bottom, rgba(191, 219, 254, 0.8), rgba(191, 219, 254, 0.4));
            margin: 0.25rem 0;
            border-radius: 9999px;
        }
        
        /* 最后一个步骤不显示连接线 */
        .crystal-thought-step:last-child .timeline-line {
            display: none;
        }

        /* 水晶工具卡片 */
        .crystal-tool-card {
            position: relative;
            display: flex;
            align-items: flex-start;
            gap: 0; /* 移除gap，使用margin控制间距 */
            padding: 0.75rem;
            margin-top: 0.25rem; /* 进一步减少顶部间距 */
            border-radius: 1rem;
            background: rgba(255, 255, 255, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.6);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            transition: all 0.3s;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            width: 100%;
            max-width: 24rem;
        }

        .crystal-tool-card:hover {
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            background: rgba(255, 255, 255, 0.6);
        }
        
        /* 工具卡片执行中状态 - 蓝色背景 */
        .crystal-tool-card.calling {
            background: rgba(239, 246, 255, 0.5);
            border-color: rgba(191, 219, 254, 0.5);
        }
        
        /* 工具卡片成功状态 - 保持白色背景 */
        .crystal-tool-card.success {
            background: rgba(255, 255, 255, 0.4);
            border-color: rgba(255, 255, 255, 0.6);
        }
        
        /* 工具卡片错误状态 - 红色背景 */
        .crystal-tool-card.error {
            background: rgba(254, 242, 242, 0.5);
            border-color: rgba(254, 202, 202, 0.5);
        }

        .crystal-tool-icon-container {
            position: relative;
            flex-shrink: 0;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.75rem;
            background: rgba(255, 255, 255, 0.8);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid white;
            margin-right: 0.5rem; /* 增加图标和内容之间的间距 */
        }

        .crystal-tool-icon {
            width: 1rem;
            height: 1rem;
        }

        .crystal-tool-status-badge {
            position: absolute;
            bottom: -0.25rem;
            right: -0.25rem;
            background: #d1fae5; /* 成功状态使用绿色背景 */
            border: 1px solid white;
            padding: 0.125rem;
            border-radius: 9999px;
        }

        .crystal-tool-status-check {
            width: 0.875rem;
            height: 0.875rem;
            color: #059669; /* 成功状态使用绿色 */
        }

        .crystal-tool-content {
            flex: 1 1 0%;
            min-width: 0;
        }

        .crystal-tool-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.25rem; /* 增加标题和结果之间的间距 */
            gap: 0.5rem; /* 增加标题和状态标签之间的间距 */
        }

        .crystal-tool-title {
            font-size: 0.875rem;
            font-weight: 700;
            color: #334155;
            flex: 1; /* 让标题占据剩余空间 */
        }

        .crystal-tool-status-label {
            font-size: 0.625rem;
            font-weight: 500;
            color: #059669; /* 成功状态使用绿色文字 */
            background: rgba(16, 185, 129, 0.1); /* 成功状态使用绿色背景 */
            padding: 0.125rem 0.375rem;
            border-radius: 0.375rem;
            border: 1px solid rgba(16, 185, 129, 0.2); /* 成功状态使用绿色边框 */
            white-space: nowrap; /* 防止换行 */
        }

        .crystal-tool-result {
            font-size: 0.75rem;
            color: #64748b;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 500;
        }

        /* 思考步骤样式 */
        .crystal-thought-step {
            display: flex;
            margin-bottom: 0.25rem; /* 进一步减少步骤间距 */
        }

        .crystal-thought-content {
            padding-bottom: 0.25rem; /* 进一步减少内容区域底部间距 */
            width: 100%;
        }

        .crystal-thought-text {
            font-size: 0.9375rem;
            color: #475569;
            line-height: 1.75;
            margin-bottom: 0.75rem;
        }

        .crystal-thought-text strong {
            font-weight: 600;
            color: #1e293b;
        }

        /* 正在执行状态 */
        .crystal-tool-running {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 0.75rem;
            background: rgba(239, 246, 255, 0.5);
            border: 1px solid rgba(191, 219, 254, 0.5);
            color: #2563eb;
            width: fit-content;
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        .crystal-tool-spinner {
            width: 1rem;
            height: 1rem;
            animation: spin 1s linear infinite;
        }

        .crystal-tool-running-text {
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.05em;
        }

        @keyframes ping {
            75%, 100% {
                transform: scale(2);
                opacity: 0;
            }
        }

        @keyframes spin {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }

        /* 工具按钮样式 */
        .tool-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.25rem 0.5rem;
            border-radius: 0.5rem;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: help;
            transition: all 0.2s;
        }

        .tool-badge-calling {
            background: #dbeafe;
            color: #1e40af;
            border: 1px solid #93c5fd;
        }

        .tool-badge-success {
            background: #d1fae5;
            color: #065f46;
            border: 1px solid #6ee7b7;
        }

        .tool-badge-error {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #fca5a5;
        }

        /* ========== 玻璃节点树形展示样式 ========== */
        .glass-node-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            min-width: fit-content; /* 确保容器可以超出父容器宽度 */
            overflow-x: visible; /* 允许内容超出容器 */
        }

        .glass-node {
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            z-index: 10;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 1rem;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin-bottom: 0.5rem; /* 从1rem减少到0.5rem (8px) */
            width: 420px; /* 固定宽度 */
            max-width: 420px;
            flex-shrink: 0; /* 防止卡片被压缩 */
        }

        .glass-node.collapsed {
            width: 256px; /* 固定收起宽度 */
            max-width: 256px;
        }

        .glass-node:hover:not(.expanded) {
            transform: scale(1.02);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        /* 状态样式 */
        .glass-node.status-processing,
        .glass-node.status-working {
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 8px 30px rgba(59, 130, 246, 0.15);
            background: rgba(255, 255, 255, 0.8);
        }

        .glass-node.status-completed {
            box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 8px 30px rgba(16, 185, 129, 0.1);
            background: rgba(255, 255, 255, 0.7);
        }

        .glass-node.status-waiting {
            box-shadow: 0 0 0 1px rgba(226, 232, 240, 1), 0 1px 3px rgba(0, 0, 0, 0.1);
            background: rgba(255, 255, 255, 0.4);
            opacity: 0.8;
        }

        .glass-node.status-waiting:hover {
            opacity: 1;
        }

        /* 连接线 */
        .connector-line-top {
            height: 1.25rem; /* 从2rem减少到1.25rem (20px) */
            width: 3px; /* 增加宽度从2px到3px */
            background: rgba(59, 130, 246, 0.4); /* 使用更明显的蓝色 */
            position: relative;
            overflow: hidden;
            margin-bottom: 0.25rem; /* 从0.5rem减少到0.25rem (4px) */
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3); /* 添加阴影增强可见性 */
        }

        .connector-line-top.active::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(59, 130, 246, 0.9); /* 更明显的蓝色 */
            animation: stream-down 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
            box-shadow: 0 0 8px rgba(59, 130, 246, 0.6); /* 添加发光效果 */
        }

        .connector-line-bottom {
            height: 1.25rem; /* 从2rem减少到1.25rem (20px) */
            width: 3px; /* 增加宽度从2px到3px */
            background: rgba(59, 130, 246, 0.4); /* 使用更明显的蓝色 */
            margin-top: 0.25rem; /* 从0.5rem减少到0.25rem (4px) */
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3); /* 添加阴影增强可见性 */
        }

        /* 移除硬编码的水平连接线，改用动态布局 */
        /* .connector-line-horizontal 已废弃，使用新的动态连接线实现 */

        /* 节点头部 */
        .glass-node-header {
            padding: 1rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .glass-node-header:hover {
            background: rgba(255, 255, 255, 0.4);
        }

        .glass-node-header-content {
            display: flex;
            align-items: center;
            gap: 0.875rem;
            flex: 1;
            overflow: hidden;
        }

        .glass-node-icon-container {
            padding: 0;
            border-radius: 0.75rem;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.5);
            flex-shrink: 0;
            width: 4rem; /* 增大头像容器 */
            height: 4rem; /* 增大头像容器 */
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            transform: rotate(3deg);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .glass-node-icon-container:hover {
            transform: rotate(0deg) scale(1.05);
            box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
        }

        .glass-node-icon-container.type-master {
            background: rgba(196, 181, 253, 0.2);
        }

        .glass-node-icon-container.type-planner {
            background: rgba(251, 207, 232, 0.2);
        }

        .glass-node-icon-container.type-worker {
            background: rgba(191, 219, 254, 0.2);
        }

        .glass-node-icon-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0.75rem; /* 与容器圆角一致 */
        }

        .glass-node-icon-container .emoji-fallback {
            font-size: 2rem; /* 增大emoji字体 */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .glass-node-icon {
            width: 18px;
            height: 18px;
        }

        .glass-node-icon.type-master {
            color: #9333ea;
        }

        .glass-node-icon.type-planner {
            color: #ec4899;
        }

        .glass-node-icon.type-worker {
            color: #2563eb;
        }

        .glass-node-info {
            overflow: hidden;
            flex: 1;
        }

        .glass-node-title-row {
            display: flex;
            flex-direction: column; /* 改为上下布局 */
            align-items: flex-start; /* 左对齐 */
            gap: 0.25rem; /* 减小间距 */
        }

        .glass-node-title {
            font-size: 0.875rem;
            font-weight: 700;
            color: #1e293b;
            margin: 0;
        }

        .glass-node-role {
            font-size: 0.625rem;
            padding: 0.125rem 0.5rem;
            border-radius: 9999px;
            background: rgba(241, 245, 249, 1);
            color: #64748b;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border: 1px solid rgba(226, 232, 240, 0.5);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .glass-node-summary {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.25rem;
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }

        .glass-node-summary.status-working {
            color: #2563eb;
            font-weight: 500;
        }

        .glass-node-summary.status-completed {
            color: #059669;
            font-weight: 500;
        }

        .status-ping-dot {
            position: relative;
            display: flex;
            height: 0.5rem;
            width: 0.5rem;
        }

        .status-ping-dot::before {
            content: '';
            position: absolute;
            display: inline-flex;
            height: 100%;
            width: 100%;
            border-radius: 9999px;
            background-color: #3b82f6;
            opacity: 0.75;
            animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
        }

        .status-ping-dot::after {
            content: '';
            position: relative;
            display: inline-flex;
            border-radius: 9999px;
            height: 100%;
            width: 100%;
            background-color: #2563eb;
        }

        .glass-node-toggle {
            color: #94a3b8;
            background: rgba(241, 245, 249, 0.5);
            padding: 0.25rem;
            border-radius: 9999px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            flex-shrink: 0;
        }

        .glass-node-toggle-icon {
            width: 14px;
            height: 14px;
        }

        /* 展开的终端区域 */
        .glass-node-expanded-area {
            transition: all 0.5s ease-in-out;
            overflow: hidden;
            background: rgba(248, 250, 252, 0.5);
            border-top: 1px solid rgba(241, 245, 249, 1);
            position: relative; /* 为状态指示器提供定位上下文 */
            display: flex;
            flex-direction: column;
        }

        .glass-node-expanded-area.expanded {
            max-height: 300px;
            opacity: 1;
        }

        .glass-node-expanded-area.collapsed {
            max-height: 0;
            opacity: 0;
            overflow: hidden; /* 确保收起时完全隐藏内容 */
        }

        .glass-node-logs {
            padding: 1rem;
            flex: 1; /* 占据剩余空间 */
            overflow-y: auto;
            overflow-x: hidden; /* 禁止横向滚动 */
            display: flex;
            flex-direction: column;
            position: relative; /* 为时间轴提供定位上下文 */
        }

        .glass-node-logs-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }

        .glass-node-logs-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.625rem;
            color: #94a3b8;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .glass-node-logs-pid {
            font-size: 0.625rem;
            font-family: monospace;
            color: #94a3b8;
            background: rgba(241, 245, 249, 1);
            padding: 0.125rem 0.375rem;
            border-radius: 0.25rem;
            border: 1px solid rgba(226, 232, 240, 1);
        }

        .glass-node-logs-content {
            position: relative;
            display: flex;
            flex-direction: column;
            min-height: 100%; /* 确保内容区域至少占满容器高度 */
            padding-bottom: 0.5rem; /* 进一步减小底部间距 */
            width: 100%; /* 占满容器宽度 */
            overflow-wrap: break-word; /* 允许长文本换行 */
            word-break: break-word; /* 允许单词内换行 */
        }

        .glass-node-logs-timeline {
            position: absolute;
            left: 3px;
            top: 0.5rem;
            bottom: 0.5rem; /* 延伸到容器底部，留出底部指示器的空间 */
            width: 2px;
            background: rgba(226, 232, 240, 0.5);
            z-index: 1; /* 确保在内容之上 */
        }

        .log-item {
            padding-left: 1rem; /* 增加左边距，与时间轴保持距离 */
            position: relative;
            margin-bottom: 0.125rem; /* 减小间距 */
        }

        .log-item-thought {
            display: flex;
            flex-direction: column; /* 改为上下布局 */
            gap: 0.25rem; /* 减小间距 */
            padding: 0.375rem 0;
            /* 移除动画，避免刷新效果 */
        }

        .log-item-thought-time {
            font-size: 0.625rem;
            color: #94a3b8;
            font-family: monospace;
            font-weight: 500;
            order: 1; /* 时间在上 */
            text-align: left; /* 居左对齐 */
        }

        .log-item-thought-text {
            font-size: 0.75rem;
            color: #475569;
            font-weight: 500;
            line-height: 1.5;
            order: 2; /* 文字在下 */
            text-align: left; /* 居左对齐 */
        }

        /* 流式输入光标动画 */
        .typing-cursor::after {
            content: '▋';
            display: inline-block;
            vertical-align: middle;
            animation: blink 1s step-start infinite;
            color: #666;
            margin-left: 2px;
        }

        @keyframes blink {
            0%, 50% {
                opacity: 1;
            }
            51%, 100% {
                opacity: 0;
            }
        }

        .log-item-tool {
            margin: 0.3125rem 0; /* 调整为10px总间距 (约0.625rem / 2) */
            margin-left: 0; /* 移除左边距，与log-item的padding-left对齐 */
            background: rgba(255, 255, 255, 0.6);
            border: 1px solid rgba(226, 232, 240, 0.6);
            box-shadow: 0 0 0 1px rgba(241, 245, 249, 1), 0 1px 2px rgba(0, 0, 0, 0.05);
            border-radius: 0.5rem;
            padding: 0.625rem;
            font-size: 0.75rem;
            font-family: monospace;
            text-align: left; /* 居左对齐 */
            /* 移除动画，避免刷新效果 */
        }

        .log-item-tool-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.375rem;
        }

        .log-item-tool-name {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #4f46e5;
            font-weight: 700;
            letter-spacing: -0.025em;
        }

        .log-item-tool-icon {
            padding: 0.25rem;
            background: rgba(238, 242, 255, 1);
            border-radius: 0.375rem;
        }

        .log-item-tool-icon svg {
            width: 10px;
            height: 10px;
            color: #4f46e5;
        }

        .log-item-tool-status {
            padding: 0.125rem 0.5rem;
            border-radius: 9999px;
            font-size: 0.5625rem;
            font-weight: 700;
            text-transform: uppercase;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            border: 1px solid;
        }

        .log-item-tool-status.running {
            background: rgba(224, 242, 254, 1);
            color: #0284c7;
            border-color: rgba(186, 230, 253, 1);
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        .log-item-tool-status.success {
            background: rgba(209, 250, 229, 1);
            color: #059669;
            border-color: rgba(167, 243, 208, 1);
        }

        .log-item-tool-details {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        .log-item-tool {
            position: relative;
        }

        .log-item-tool-header-right {
            display: flex;
            align-items: center;
            gap: 0.75rem; /* 增加一点间距 */
        }

        .log-item-tool-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            background: transparent;
            border: none;
            border-radius: 6px; /* 更圆润的圆角 */
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            color: #94a3b8; /* 默认浅灰色 */
            padding: 0;
            opacity: 0.7; /* 默认稍微透明 */
        }

        .log-item-tool-toggle:hover {
            background: rgba(241, 245, 249, 1);
            color: #64748b;
            opacity: 1;
            transform: scale(1.05); /* 微弱的放大效果 */
        }

        .log-item-tool-toggle:active {
            transform: scale(0.95);
        }

        /* 展开状态 */
        .log-item-tool.details-visible .log-item-tool-toggle {
            background: rgba(59, 130, 246, 0.1);
            color: #3b82f6;
            opacity: 1;
        }

        /* 工具详情容器动画 */
        .log-item-tool-details-hover {
            display: none;
            background: rgba(255, 255, 255, 0.6); /* 更通透的背景 */
            backdrop-filter: blur(12px); /* 加强毛玻璃 */
            border-radius: 0.75rem;
            padding: 1rem;
            box-shadow: 
                0 4px 6px -1px rgba(0, 0, 0, 0.05), 
                0 2px 4px -1px rgba(0, 0, 0, 0.03),
                0 0 0 1px rgba(226, 232, 240, 0.4); /* 细腻的内边框 */
            margin-top: 0.75rem;
            max-height: 400px;
            overflow-y: auto;
            animation: slideDown 0.2s ease-out forwards;
            border: none; /* 移除原来的实线边框 */
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-4px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .log-item-tool.details-visible .log-item-tool-details-hover {
            display: block;
        }

        /* Label 样式优化 */
        .log-item-tool-label {
            font-size: 0.65rem;
            letter-spacing: 0.05em;
            color: #64748b;
            font-weight: 600;
            margin-bottom: 0.25rem;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        /* 代码块样式优化 */
        .log-item-tool-value {
            background: rgba(255, 255, 255, 0.5);
            border: 1px solid rgba(226, 232, 240, 0.6);
            padding: 0.75rem;
            border-radius: 0.5rem;
            color: #334155;
            font-size: 0.8rem;
            font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace; /* 更好的等宽字体栈 */
            line-height: 1.5;
            transition: border-color 0.2s;
        }
        
        .log-item-tool-value:hover {
            border-color: rgba(203, 213, 225, 0.8);
        }

        .log-item-tool-value.output {
            background: rgba(236, 253, 245, 0.4);
            border-color: rgba(167, 243, 208, 0.4);
            color: #047857;
        }

        /* 思考指示器 */
        .thinking-indicator {
            padding-left: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #2563eb;
            font-size: 0.75rem;
            /* 移除动画，不跳动 */
            margin-top: auto; /* 推到底部 */
            margin-bottom: 0.25rem; /* 进一步减小底部间距 */
            background: rgba(239, 246, 255, 0.5);
            padding: 0.375rem 0.75rem;
            border-radius: 0.5rem;
            width: fit-content;
            position: sticky; /* 使用sticky定位，固定在底部 */
            bottom: 0.25rem; /* 距离底部0.25rem */
            align-self: flex-start; /* 左对齐 */
            z-index: 10;
        }

        .thinking-indicator-dots {
            display: flex;
            gap: 0.25rem;
        }

        .thinking-indicator-dot {
            width: 0.25rem;
            height: 0.25rem;
            background: #2563eb;
            border-radius: 9999px;
            /* 移除动画，不跳动 */
        }

        .thinking-indicator-text {
            font-weight: 500;
        }
        
        .thinking-indicator.completed-indicator {
            color: #059669;
            background: rgba(209, 250, 229, 0.5);
            animation: none; /* 完成状态不需要动画 */
            position: sticky; /* 固定在底部 */
            bottom: 0.25rem; /* 距离底部0.25rem */
            margin-top: auto; /* 推到底部 */
            margin-bottom: 0.25rem; /* 减小底部间距 */
        }
        
        .thinking-indicator.completed-indicator svg {
            color: #059669;
        }

        /* 复制按钮样式 */
        .copy-node-data-btn {
            display: flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.375rem 0.75rem;
            margin-top: 0.5rem;
            margin-left: 1rem;
            background: rgba(255, 255, 255, 0.6);
            border: 1px solid rgba(226, 232, 240, 0.8);
            border-radius: 0.5rem;
            color: #64748b;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            width: fit-content;
        }

        .copy-node-data-btn:hover {
            background: rgba(255, 255, 255, 0.9);
            border-color: rgba(59, 130, 246, 0.5);
            color: #3b82f6;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .copy-node-data-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .copy-node-data-btn svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        .copy-node-data-btn span {
            font-size: 0.75rem;
        }

        /* 复制成功提示 */
        .copy-success-toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: rgba(16, 185, 129, 0.95);
            color: white;
            padding: 0.75rem 1.25rem;
            border-radius: 0.5rem;
            font-size: 0.875rem;
            font-weight: 500;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 10000;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.3s ease;
            pointer-events: none;
        }

        .copy-success-toast.show {
            opacity: 1;
            transform: translateY(0);
        }

        /* 活动指示线 */
        .glass-node-active-indicator {
            height: 2px;
            width: 100%;
            background: linear-gradient(to right, rgba(147, 197, 253, 1), rgba(129, 140, 248, 1), rgba(147, 197, 253, 1));
            animation: shimmer-light 2.5s infinite linear;
            opacity: 0.7;
        }

        /* 固定在卡片底部的状态指示器 */
        .glass-node-status-indicator {
            flex-shrink: 0; /* 不被压缩 */
            padding: 0.5rem 1rem;
            background: rgba(248, 250, 252, 0.95);
            backdrop-filter: blur(8px);
            border-top: 1px solid rgba(226, 232, 240, 0.6);
        }

        .status-indicator-content {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        .status-indicator-text {
            color: #2563eb;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .glass-node-status-indicator .thinking-indicator-dots {
            display: flex;
            gap: 0.25rem;
        }

        .glass-node-status-indicator .thinking-indicator-dot {
            width: 0.25rem;
            height: 0.25rem;
            background: #2563eb;
            border-radius: 9999px;
        }

        /* 子节点容器 */
        .glass-node-children {
            display: flex;
            align-items: flex-start;
            justify-content: center; /* 居中对齐子节点 */
            gap: 0; /* 间距由 child-wrapper 的 padding 控制 */
            padding-top: 0.25rem; /* 从0.5rem减少到0.25rem (4px) */
            position: relative;
            width: 100%;
            /* 确保子节点容器可以横向滚动 */
            min-width: fit-content;
            overflow-x: visible;
        }

        /* 移除硬编码的伪元素水平连接线，改用动态布局 */
        /* .glass-node-children::before 已废弃，使用新的动态连接线实现 */

        /* 动态连接线样式 */
        .glass-node-child-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            padding: 0 1.5rem; /* 控制子节点间距 */
        }

        .glass-node-connector-area {
            width: 100%;
            height: 2rem;
            position: relative;
        }

        .connector-line-left-wing {
            position: absolute;
            top: 0;
            left: 0;
            width: 50%;
            height: 100%;
            border-top: 2px solid rgba(59, 130, 246, 0.4);
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
        }

        .connector-line-right-wing {
            position: absolute;
            top: 0;
            right: 0;
            width: 50%;
            height: 100%;
            border-top: 2px solid rgba(59, 130, 246, 0.4);
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
        }

        .connector-line-middle-stem {
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            height: 100%;
            background: rgba(59, 130, 246, 0.4);
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
        }

        .connector-line-vertical {
            width: 3px;
            height: 1rem; /* 从1.5rem减少到1rem (16px) */
            background: rgba(59, 130, 246, 0.4);
            margin-bottom: 0.25rem; /* 从0.5rem减少到0.25rem (4px) */
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
        }

        /* 汇聚连接线样式 */
        .connector-line-merge-center {
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 3px;
            height: 1.25rem; /* 从2rem减少到1.25rem (20px) */
            background: rgba(59, 130, 246, 0.4);
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
        }

        .connector-line-merge-indicator {
            width: 3px;
            height: 1.25rem; /* 从2rem减少到1.25rem (20px) */
            background: rgba(59, 130, 246, 0.4);
            margin-bottom: 0.25rem; /* 从0.5rem减少到0.25rem (4px) */
            box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
        }

        /* 动画 */
        @keyframes stream-down {
            0% {
                transform: translateY(-100%);
                opacity: 0;
            }
            50% {
                opacity: 1;
            }
            100% {
                transform: translateY(100%);
                opacity: 0;
            }
        }

        @keyframes shimmer-light {
            0% {
                transform: translateX(-100%);
            }
            100% {
                transform: translateX(100%);
            }
        }

        @keyframes fade-in {
            from {
                opacity: 0;
                transform: translateX(-8px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes zoom-in {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes bounce {
            0%, 80%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(-4px);
            }
        }

        /* 自定义滚动条 */
        .glass-node-logs::-webkit-scrollbar {
            width: 5px;
            height: 5px; /* 添加横向滚动条高度 */
        }

        .glass-node-logs::-webkit-scrollbar-track {
            background: transparent;
        }

        .glass-node-logs::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
            border: 2px solid #f8fafc;
        }

        .glass-node-logs::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }
        
        /* 横向滚动条样式与纵向一致 */
        .glass-node-logs::-webkit-scrollbar-corner {
            background: transparent;
        }

        /* 响应式调整 - 只在移动端才改为垂直 */
        @media (max-width: 768px) {
            #mainContainer {
                flex-direction: column;
            }
            
            .team-sidebar-wrapper, #teamSidebar {
                width: 100%;
                height: 40%;
                border-right: none;
                border-bottom: 1px solid rgba(255, 255, 255, 0.2);
                margin-right: 0;
                margin-bottom: 16px;
            }
            
            #mainContainer {
                padding: 0; /* 移动端不需要额外padding，因为body已经有16px */
                gap: 16px;
            }
            
            #thinkingPanel.open {
                width: 100%;
                height: 40%;
            }

            #chatPanel {
                height: auto;
                flex: 1;
            }
        }

        @media (min-width: 769px) and (max-width: 1200px) {
            #thinkingPanel.open {
                width: 350px;
            }
        }
        
        /* 防止初始内容闪烁：在团队信息更新前隐藏 */
        body:not(.team-info-loaded) #chatHeaderTitle,
        body:not(.team-info-loaded) #chatMessages .fade-in {
            opacity: 0;
            transition: opacity 0.1s;
        }
        body.team-info-loaded #chatHeaderTitle,
        body.team-info-loaded #chatMessages .fade-in {
            opacity: 1;
        }

/* ========== 智能体消息推送卡片样式 ========== */

/* 卡片进场动画 */
.agent-card-wrapper {
    transform: translateY(12px);
    opacity: 0;
    transition: all 800ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.agent-card-wrapper.agent-card-visible {
    transform: translateY(0);
    opacity: 1;
}

/* 头像发光效果 */
.agent-avatar-glow {
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.4;
    }
}

/* 流光边框动画 */
.agent-shimmer {
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

/* 底部进度条流光 */
.agent-progress-shimmer {
    animation: shimmer 2s infinite;
}

/* 卡片悬停效果 */
.agent-card-main:hover .agent-progress-bar {
    opacity: 1;
}

/* 按钮悬停效果 */
.agent-action-btn:hover .agent-btn-icon {
    transform: scale(1.1) rotate(3deg);
}

.agent-action-btn:hover .thinking-process-btn-text {
    color: #4f46e5; /* indigo-600 */
}

.agent-action-btn:hover .agent-btn-arrow {
    color: #4f46e5; /* indigo-500 */
    transform: translateX(2px);
}

.agent-action-btn:hover .agent-btn-hover {
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .agent-card-wrapper {
        max-width: 100%;
    }
    
    .agent-card-main {
        max-width: calc(100% - 52px); /* 减去头像宽度 */
    }
}
