/** * Protocol Agent 样式 * 100%还原原型图0119.html的精致设计 */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap'); /* ============================================ */ /* 全局样式 - 全屏覆盖(与ChatWorkspace一致) */ /* ============================================ */ .protocol-agent-page { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; overflow: hidden; font-family: 'Inter', 'Noto Sans SC', sans-serif; background: #FFFFFF; } /* ============================================ */ /* 可折叠侧边栏 - Gemini 风格 */ /* ============================================ */ .sidebar { display: flex; background: #F9FAFB; border-right: 1px solid #E5E7EB; transition: width 0.3s ease; position: relative; z-index: 10; } .sidebar.collapsed { width: 48px; } .sidebar.expanded { width: 280px; } /* 图标栏(折叠时可见) */ .sidebar-icons { width: 48px; display: flex; flex-direction: column; padding: 8px 0; background: #F9FAFB; border-right: 1px solid #E5E7EB; } .icon-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 8px; cursor: pointer; color: #6B7280; transition: all 0.2s; margin: 0 4px 4px 4px; } .icon-btn:hover { background: #E5E7EB; color: #111827; } .icon-btn.menu-btn { margin-bottom: 12px; } .icon-btn.new-btn { background: #6366F1; color: white; margin-bottom: 12px; } .icon-btn.new-btn:hover { background: #4F46E5; } /* 最近会话图标 */ .recent-icons { flex: 1; overflow-y: auto; padding-top: 8px; } .icon-btn.conv-icon { opacity: 0.6; } .icon-btn.conv-icon:hover { opacity: 1; } .icon-btn.conv-icon.active { background: #E0E7FF; color: #6366F1; opacity: 1; } .sidebar-bottom { padding-top: 8px; border-top: 1px solid #E5E7EB; } /* 侧边栏内容(展开时可见) */ .sidebar-content { flex: 1; display: flex; flex-direction: column; background: #FFFFFF; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; } .sidebar.expanded .sidebar-content { opacity: 1; pointer-events: auto; } .sidebar.collapsed .sidebar-content { display: none; } .sidebar-header { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid #E5E7EB; } .sidebar-title { font-size: 14px; font-weight: 600; color: #111827; } /* 返回按钮 */ .back-to-hub-btn { display: flex; align-items: center; gap: 4px; padding: 6px 10px; background: none; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: #6B7280; transition: all 0.2s; } .back-to-hub-btn:hover { background: #F3F4F6; color: #111827; } /* 新建对话按钮 */ .new-chat-btn { margin: 6px 10px; padding: 6px 10px; background: #6366F1; color: white; border: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 12px; font-weight: 500; transition: all 0.2s; width: auto; } .new-chat-btn.compact { padding: 5px 10px; } .new-chat-btn:hover { background: #4F46E5; } /* 会话列表 */ .conversations-list { flex: 1; min-height: 0; /* 关键:允许 flex 子元素收缩 */ overflow-y: auto; padding: 8px; } .conv-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s; color: #6B7280; font-size: 13px; position: relative; } .conv-item:hover { background: #F3F4F6; } .conv-item.active { background: #EEF2FF; color: #6366F1; } .conv-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .conv-delete { opacity: 0; background: none; border: none; padding: 4px; border-radius: 4px; cursor: pointer; color: #EF4444; transition: all 0.2s; } .conv-item:hover .conv-delete { opacity: 1; } .conv-delete:hover { background: #FEE2E2; } /* ============================================ */ /* 主工作区 */ /* ============================================ */ .workspace { flex: 1; min-height: 0; /* 关键:允许 flex 子元素收缩 */ display: flex; flex-direction: column; background: #FFFFFF; overflow: hidden; } /* 顶部导航 */ .workspace-header { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #E5E7EB; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); z-index: 5; } .header-left { display: flex; align-items: center; gap: 12px; } .back-btn { padding: 8px; background: none; border: none; border-radius: 8px; cursor: pointer; color: #6B7280; transition: all 0.2s; } .back-btn:hover { background: #F3F4F6; color: #111827; } .agent-info { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 10px; flex-shrink: 0; } .agent-icon { width: 28px; height: 28px; min-width: 28px; background: #6366F1; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; } .agent-meta { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 8px; flex-shrink: 0; } .agent-name { font-size: 14px; font-weight: 700; color: #111827; margin: 0; white-space: nowrap; line-height: 1; } .agent-status { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #10B981; white-space: nowrap; } .status-dot { width: 8px; height: 8px; background: #10B981; border-radius: 50%; animation: pulse 2s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .status-text { font-size: 12px; } .header-right { display: flex; align-items: center; gap: 12px; } .current-stage-badge { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 20px; } .badge-label { font-size: 12px; font-weight: 500; color: #6B7280; } .badge-value { font-size: 12px; font-weight: 700; color: #6366F1; background: #EEF2FF; padding: 2px 8px; border-radius: 4px; border: 1px solid #C7D2FE; } /* 工作区主体 */ .workspace-body { flex: 1; min-height: 0; /* 关键:允许 flex 子元素收缩 */ display: flex; overflow: hidden; } /* ============================================ */ /* 聊天区域 */ /* ============================================ */ .chat-area { width: 100%; height: 100%; display: flex; flex-direction: column; background: #FFFFFF; position: relative; overflow: hidden; } /* 聊天容器 - 使用 pa- 前缀避免与共享组件 ChatContainer 冲突 */ .pa-chat-container { flex: 1; min-height: 0; /* 关键:允许 flex 子元素收缩 */ overflow-y: auto; padding: 24px; padding-bottom: 120px; } /* 加载历史消息 */ .loading-history { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px; color: #6B7280; font-size: 13px; } .loading-history .loading-spinner { width: 20px; height: 20px; border: 2px solid #E5E7EB; border-top-color: #6366F1; border-radius: 50%; animation: spin 0.8s linear infinite; } /* 消息行 */ .message-row { display: flex; gap: 12px; margin-bottom: 16px; } .message-row.user-row { flex-direction: row-reverse; } .message-row.assistant-row { flex-direction: row; } .message-row.system-row { justify-content: center; margin: 16px 0; } /* 头像 */ .avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .assistant-avatar { background: #EEF2FF; color: #6366F1; } .user-avatar { background: #E5E7EB; color: #6B7280; } .reflexion-avatar { background: #F3E8FF; color: #9333EA; border: 1px solid #E9D5FF; } /* 消息内容 */ .message-content { max-width: 80%; display: flex; flex-direction: column; gap: 4px; } .message-meta { font-size: 12px; color: #9CA3AF; padding: 0 4px; } .message-meta.reflexion-meta { color: #9333EA; font-weight: 700; } /* 聊天气泡 */ .chat-bubble { padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.6; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); white-space: pre-wrap; word-break: break-word; } /* Markdown 格式支持 */ .chat-bubble h1, .chat-bubble h2, .chat-bubble h3 { margin: 12px 0 6px 0; font-weight: 700; color: #111827; } .chat-bubble h1 { font-size: 1.25em; } .chat-bubble h2 { font-size: 1.15em; } .chat-bubble h3 { font-size: 1.05em; } .chat-bubble p { margin: 6px 0; } .chat-bubble ul, .chat-bubble ol { margin: 6px 0; padding-left: 24px; } .chat-bubble ul { list-style-type: disc; } .chat-bubble ol { list-style-type: decimal; } .chat-bubble li { margin: 3px 0; display: list-item; } .chat-bubble strong, .chat-bubble b { font-weight: 700; color: #1F2937; } .chat-bubble em, .chat-bubble i { font-style: italic; } .chat-bubble code { background: #F3F4F6; padding: 2px 6px; border-radius: 4px; font-family: 'Monaco', 'Consolas', monospace; font-size: 0.9em; color: #6366F1; } .chat-bubble pre { background: #1F2937; color: #F9FAFB; padding: 12px 16px; border-radius: 8px; overflow-x: auto; margin: 12px 0; } .chat-bubble pre code { background: transparent; padding: 0; color: inherit; } .chat-bubble blockquote { border-left: 4px solid #6366F1; margin: 12px 0; padding: 8px 16px; background: #F9FAFB; color: #4B5563; } /* MarkdownContent 组件样式 */ .markdown-content { white-space: normal; } .markdown-content p { margin: 0 0 8px 0; } .markdown-content p:last-child { margin-bottom: 0; } .markdown-content .md-divider { border: none; border-top: 1px solid #E5E7EB; margin: 12px 0; } .markdown-content h1, .markdown-content h2, .markdown-content h3 { margin: 16px 0 8px 0; font-weight: 700; line-height: 1.4; } .markdown-content h1:first-child, .markdown-content h2:first-child, .markdown-content h3:first-child { margin-top: 0; } .markdown-content ul, .markdown-content ol { margin: 8px 0 12px 0; padding-left: 24px; } .markdown-content ul { list-style-type: disc; } .markdown-content ol { list-style-type: decimal; counter-reset: none; /* 确保使用浏览器默认计数 */ } .markdown-content li { margin: 6px 0; line-height: 1.6; display: list-item; /* 确保显示列表项标记 */ } .markdown-content li::marker { color: #6366F1; } .markdown-content strong { font-weight: 700; color: #1F2937; } .markdown-content em { font-style: italic; color: #4B5563; } .markdown-content code { background: rgba(99, 102, 241, 0.1); color: #6366F1; padding: 2px 6px; border-radius: 4px; font-family: 'Monaco', 'Consolas', 'Courier New', monospace; font-size: 0.9em; } /* ============================================ */ /* 阶段标签 */ /* ============================================ */ .message-meta .stage-tag { display: inline-block; background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 8px; font-weight: 500; } .message-meta .timestamp { color: #9CA3AF; margin-left: 4px; } /* ============================================ */ /* 动作卡片 */ /* ============================================ */ .action-cards { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; } .action-card { display: flex; flex-direction: column; padding: 14px 18px; background: linear-gradient(135deg, #F8FAFC, #F1F5F9); border: 1px solid #E2E8F0; border-radius: 12px; cursor: pointer; transition: all 0.2s ease; position: relative; min-width: 200px; max-width: 300px; } .action-card:hover { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); border-color: #6366F1; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15); } .action-card-title { font-size: 14px; font-weight: 600; color: #1F2937; margin-bottom: 4px; } .action-card-desc { font-size: 12px; color: #6B7280; line-height: 1.4; } .action-card-icon { position: absolute; top: 14px; right: 14px; color: #9CA3AF; transition: color 0.2s; } .action-card:hover .action-card-icon { color: #6366F1; } /* ============================================ */ /* 加载状态 */ /* ============================================ */ .chat-bubble.loading { display: flex; align-items: center; gap: 10px; color: #6B7280; } .spinner { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* 流式输出光标 */ .streaming-cursor { display: inline-block; animation: blink 0.8s step-end infinite; color: #6366F1; margin-left: 2px; font-weight: 400; } @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } .assistant-bubble { background: #F3F4F6; color: #111827; border-top-left-radius: 2px; } .user-bubble { background: #4F46E5; color: white; border-top-right-radius: 2px; } /* Reflexion 气泡(紫色左边框) */ .reflexion-bubble { background: #F3E8FF; border-left: 4px solid #9333EA; } .reflexion-header { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #7C3AED; font-size: 12px; margin-bottom: 8px; } .reflexion-content { color: #111827; } /* 思考中动画 */ .chat-bubble.thinking { display: flex; gap: 4px; padding: 12px 16px; } .thinking-dot { width: 6px; height: 6px; background: #9CA3AF; border-radius: 50%; animation: thinking 1.4s ease-in-out infinite; } .thinking-dot:nth-child(2) { animation-delay: 0.2s; } .thinking-dot:nth-child(3) { animation-delay: 0.4s; } @keyframes thinking { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } } /* 系统消息 */ .system-message { font-size: 10px; color: #6B7280; background: #F3F4F6; padding: 6px 12px; border-radius: 12px; border: 1px solid #E5E7EB; display: inline-flex; align-items: center; gap: 4px; } /* ============================================ */ /* 同步按钮 */ /* ============================================ */ .sync-button-wrapper { margin-top: 12px; } .sync-button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: #6366F1; color: white; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2); } .sync-button:hover:not(.disabled) { background: #4F46E5; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); } .sync-button.disabled { background: #E5E7EB; color: #9CA3AF; cursor: not-allowed; box-shadow: none; } .sync-button.syncing { pointer-events: none; } .sync-icon.spinning { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* ============================================ */ /* Action Card */ /* ============================================ */ .action-cards { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; } .action-card { border: 1px solid #C7D2FE; background: #EEF2FF; border-radius: 12px; padding: 16px; width: 380px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); transition: all 0.2s; cursor: pointer; } .action-card:hover { border-color: #6366F1; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15); } .action-card-header { display: flex; gap: 12px; margin-bottom: 12px; } .action-icon-box { background: #C7D2FE; padding: 8px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #6366F1; flex-shrink: 0; } .action-info { flex: 1; } .action-title { font-size: 14px; font-weight: 700; color: #111827; margin: 0 0 4px 0; } .action-description { font-size: 12px; color: #6B7280; margin: 0; } .action-footer { display: flex; flex-direction: column; gap: 8px; } .action-button { width: 100%; padding: 8px 16px; background: #6366F1; color: white; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; box-shadow: 0 2px 4px rgba(99, 102, 241, 0.15); } .action-button:hover { background: #4F46E5; box-shadow: 0 4px 8px rgba(99, 102, 241, 0.25); } .action-button.primary { background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%); } .action-hint { font-size: 10px; color: #9CA3AF; text-align: center; margin: 0; } /* ============================================ */ /* 输入区 */ /* ============================================ */ .input-area { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; border-top: 1px solid #F3F4F6; background: #FFFFFF; } .input-wrapper { position: relative; display: flex; } .input-field { flex: 1; padding: 12px 48px 12px 16px; background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 12px; font-size: 14px; color: #111827; transition: all 0.2s; outline: none; } .input-field:focus { background: #FFFFFF; border-color: #6366F1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); } .input-field::placeholder { color: #9CA3AF; } .input-field:disabled { background: #F3F4F6; color: #9CA3AF; cursor: not-allowed; } .send-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; background: #6366F1; color: white; border: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; } .send-btn:hover:not(:disabled) { background: #4F46E5; } .send-btn:disabled { background: #E5E7EB; color: #9CA3AF; cursor: not-allowed; } /* ============================================ */ /* 状态面板 */ /* ============================================ */ .state-panel { width: 100%; height: 100%; background: #F9FAFB; border-left: 1px solid #E5E7EB; display: flex; flex-direction: column; overflow: hidden; } .panel-header { padding: 16px; border-bottom: 1px solid #E5E7EB; background: #FFFFFF; display: flex; justify-content: space-between; align-items: center; } .panel-title { font-size: 14px; font-weight: 700; color: #111827; display: flex; align-items: center; gap: 8px; margin: 0; } .status-badge { font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 12px; text-transform: uppercase; } .status-badge.waiting { background: #FEF3C7; color: #92400E; } .status-badge.synced { background: #D1FAE5; color: #065F46; } .status-badge.completed { background: #DBEAFE; color: #1E40AF; } /* 进度条 */ .progress-bar-container { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #FFFFFF; border-bottom: 1px solid #E5E7EB; } .progress-bar { flex: 1; height: 6px; background: #E5E7EB; border-radius: 3px; overflow: hidden; } .progress-fill { height: 100%; background: linear-gradient(90deg, #6366F1 0%, #4F46E5 100%); transition: width 0.5s ease; } .progress-text { font-size: 12px; font-weight: 700; color: #6366F1; min-width: 40px; text-align: right; } /* 面板主体 */ .panel-body { flex: 1; min-height: 0; /* 关键:允许 flex 子元素收缩 */ overflow-y: auto; padding: 16px; } .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; } /* ============================================ */ /* Stage Card - 阶段卡片 */ /* ============================================ */ .stage-card { background: #FFFFFF; padding: 12px; border-radius: 8px; border: 1px solid #E5E7EB; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); transition: all 0.3s ease; } .stage-card.current { border-color: #A5B4FC; border-width: 2px; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12); } .stage-card.completed { border-color: #D1FAE5; background: #F0FDF4; } .stage-card.pending { opacity: 0.6; } .stage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .stage-number { font-size: 12px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; } .stage-card.current .stage-number { color: #6366F1; } .stage-card.completed .stage-number { color: #10B981; } .check-icon { color: #10B981; } .loader-icon { color: #6366F1; } /* 阶段数据 */ .stage-data { font-size: 12px; color: #374151; line-height: 1.5; } .data-content { margin: 0; font-weight: 500; } /* PICO数据 */ .pico-data { display: flex; flex-direction: column; gap: 8px; } .pico-item { display: flex; gap: 8px; align-items: flex-start; } .pico-label { display: inline-block; width: 24px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; font-weight: 700; font-size: 10px; flex-shrink: 0; } .pico-label.p { background: #DBEAFE; color: #1E40AF; } .pico-label.i { background: #E0E7FF; color: #4338CA; } .pico-label.c { background: #FED7AA; color: #C2410C; } .pico-label.o { background: #D1FAE5; color: #065F46; } .pico-value { flex: 1; font-size: 12px; color: #374151; } /* 研究设计标签 */ .design-tags { display: flex; flex-wrap: wrap; gap: 8px; } .design-tag { font-size: 10px; border: 1px solid #E5E7EB; padding: 4px 8px; border-radius: 4px; background: #F9FAFB; color: #374151; } /* 样本量数据 */ .sample-size-data { display: flex; flex-direction: column; gap: 12px; } /* 结果高亮 */ .sample-size-result { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); border-radius: 8px; } .sample-size-result .result-label { font-size: 12px; color: #4F46E5; font-weight: 500; } .sample-size-result .result-value { font-size: 20px; font-weight: 700; color: #4F46E5; font-family: 'Monaco', 'Consolas', monospace; } /* 计算区块 */ .sample-size-data .calculation-section { padding: 8px 0; border-top: 1px solid #E5E7EB; } .sample-size-data .section-title { font-size: 11px; color: #6B7280; font-weight: 600; margin-bottom: 8px; } /* 参数网格 */ .sample-size-data .params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .sample-size-data .param-item { display: flex; flex-direction: column; gap: 2px; } .sample-size-data .param-item.full-width { grid-column: span 2; } .sample-size-data .param-label { font-size: 10px; color: #9CA3AF; } .sample-size-data .param-value { font-size: 12px; color: #374151; font-family: 'Monaco', 'Consolas', monospace; } /* 计算依据 */ .sample-size-data .rationale-text { font-size: 11px; color: #6B7280; line-height: 1.5; margin: 0; } /* 分组信息 */ .sample-size-data .groups-list { display: flex; flex-wrap: wrap; gap: 8px; } .sample-size-data .group-item { font-size: 11px; color: #374151; padding: 4px 8px; background: #F3F4F6; border-radius: 4px; } /* 旧样式兼容 */ .sample-size-row { display: flex; justify-content: space-between; align-items: center; } .calculation-params { display: flex; gap: 12px; font-size: 11px; color: #6B7280; } /* 观察指标数据 */ .endpoints-data { display: flex; flex-direction: column; gap: 12px; } .endpoint-section { display: flex; flex-direction: column; gap: 6px; } .endpoint-title { font-size: 11px; font-weight: 700; color: #6B7280; } .endpoint-tags { display: flex; flex-wrap: wrap; gap: 6px; } .endpoint-tag { font-size: 10px; background: #F3F4F6; color: #374151; padding: 3px 8px; border-radius: 4px; border: 1px solid #E5E7EB; } .endpoint-tag.primary { background: #DBEAFE; border-color: #BFDBFE; color: #1E40AF; } .endpoint-tag.safety { background: #FEE2E2; border-color: #FECACA; color: #991B1B; } .endpoint-tag.confounder { background: #FEF3C7; border-color: #FDE68A; color: #92400E; } .endpoint-item { display: flex; gap: 6px; font-size: 11px; } .item-label { color: #9CA3AF; font-weight: 500; } .item-value { color: #374151; flex: 1; } .endpoint-subsection { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .subsection-label { font-size: 10px; color: #9CA3AF; font-weight: 600; min-width: 40px; } /* ============================================ */ /* 折叠展开组件 */ /* ============================================ */ .collapsible-wrapper { position: relative; } .collapsible-content { transition: max-height 0.3s ease-out; } .collapsible-content.collapsed { position: relative; } .collapsible-content.expanded { max-height: none !important; } /* 渐变遮罩 - 折叠时显示 */ .collapse-gradient { position: absolute; bottom: 24px; /* 按钮高度 */ left: 0; right: 0; height: 40px; background: linear-gradient( to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 60%, rgba(255, 255, 255, 1) 100% ); pointer-events: none; } /* 展开/收起按钮 */ .expand-toggle-btn { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 6px 12px; margin-top: 4px; background: #F9FAFB; border: 1px dashed #D1D5DB; border-radius: 6px; font-size: 11px; color: #6B7280; cursor: pointer; transition: all 0.2s ease; } .expand-toggle-btn:hover { background: #F3F4F6; border-color: #9CA3AF; color: #4B5563; } .expand-toggle-btn svg { flex-shrink: 0; } /* 已完成卡片的渐变遮罩颜色调整 */ .stage-card.completed .collapse-gradient { background: linear-gradient( to bottom, rgba(249, 250, 251, 0) 0%, rgba(249, 250, 251, 0.9) 60%, rgba(249, 250, 251, 1) 100% ); } /* ============================================ */ /* 详细卡片样式 - 完整内容显示 */ /* ============================================ */ /* 科学问题 - 完整显示 */ .scientific-question-data .full-content { font-size: 12px; line-height: 1.6; color: #374151; margin: 0; word-break: break-word; } /* PICO - 完整显示 */ .pico-data .full-value { font-size: 12px; line-height: 1.5; word-break: break-word; } /* 研究设计 - 完整显示 */ .study-design-data .design-main { margin-bottom: 8px; } .study-design-data .design-type-tag { display: inline-block; padding: 4px 12px; background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%); color: white; border-radius: 20px; font-size: 12px; font-weight: 600; } .study-design-data .design-features { margin-top: 8px; } .study-design-data .features-label { font-size: 10px; color: #9CA3AF; font-weight: 600; margin-right: 8px; } .study-design-data .design-details { margin-top: 8px; padding-top: 8px; border-top: 1px solid #E5E7EB; } .study-design-data .details-label { font-size: 10px; color: #9CA3AF; font-weight: 600; display: block; margin-bottom: 4px; } .study-design-data .details-text { font-size: 11px; line-height: 1.5; color: #374151; margin: 0; } /* 样本量 - 完整显示 */ .sample-size-data .full-text { font-size: 11px; color: #374151; line-height: 1.6; margin: 0; word-break: break-word; } .sample-size-data .dropout-text { font-size: 11px; color: #6B7280; line-height: 1.5; margin: 0; } .sample-size-data .group-name { font-weight: 500; color: #4B5563; margin-right: 4px; } .sample-size-data .group-size { color: #4F46E5; font-weight: 600; } /* 观察指标 - 详细版本 */ .endpoints-data.detailed { gap: 14px; } .endpoints-data .endpoint-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; } .endpoints-data .endpoint-item-full { font-size: 11px; line-height: 1.5; color: #374151; padding: 4px 0; } .endpoints-data .endpoint-item-full.primary-item { color: #4F46E5; font-weight: 500; } .endpoints-data .endpoint-item-full.safety-item { color: #DC2626; } .endpoints-data .endpoint-item-full.confounder-item { color: #92400E; } .endpoints-data .endpoint-detail-item { display: flex; gap: 8px; font-size: 11px; padding: 4px 0; } .endpoints-data .detail-label { color: #9CA3AF; font-weight: 600; min-width: 70px; flex-shrink: 0; } .endpoints-data .detail-value { color: #374151; line-height: 1.5; flex: 1; } .endpoints-data .primary-label { color: #4F46E5; font-weight: 700; } .endpoints-data .safety-label { color: #DC2626; font-weight: 700; } .endpoints-data .followup-text { font-size: 11px; line-height: 1.6; color: #374151; margin: 0; } /* ============================================ */ /* 一键生成按钮 */ /* ============================================ */ .generate-section { margin-top: 24px; padding: 16px; background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); border: 2px solid #C7D2FE; border-radius: 12px; text-align: center; } .generate-btn { width: 100%; padding: 12px 20px; background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%); color: white; border: none; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); } .generate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4); } .generate-btn.disabled, .generate-btn:disabled { background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%); cursor: not-allowed; opacity: 0.7; box-shadow: none; } .generate-btn.disabled:hover, .generate-btn:disabled:hover { transform: none; } .generate-btn.generating { background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%); cursor: wait; } .generate-btn .spinner { animation: spin 1s linear infinite; } .generate-icon { font-size: 18px; } .generate-text { font-size: 14px; } .generate-hint { font-size: 10px; color: #6B7280; margin: 8px 0 0 0; } /* ============================================ */ /* 闪烁动画(同步更新) */ /* ============================================ */ @keyframes flash { 0% { background-color: #DBEAFE; } 100% { background-color: transparent; } } .flash-update { animation: flash 1.5s ease-out; } /* ============================================ */ /* 滚动条美化 - 始终可见 */ /* ============================================ */ .pa-chat-container, .panel-body, .conversations-list, .document-scroll-area { scrollbar-width: thin; scrollbar-color: #94A3B8 #F1F5F9; } .pa-chat-container::-webkit-scrollbar, .panel-body::-webkit-scrollbar, .conversations-list::-webkit-scrollbar, .document-scroll-area::-webkit-scrollbar { width: 8px; } .pa-chat-container::-webkit-scrollbar-track, .panel-body::-webkit-scrollbar-track, .conversations-list::-webkit-scrollbar-track, .document-scroll-area::-webkit-scrollbar-track { background: #F1F5F9; border-radius: 4px; } .pa-chat-container::-webkit-scrollbar-thumb, .panel-body::-webkit-scrollbar-thumb, .conversations-list::-webkit-scrollbar-thumb, .document-scroll-area::-webkit-scrollbar-thumb { background: #94A3B8; border-radius: 4px; border: 2px solid #F1F5F9; } .pa-chat-container::-webkit-scrollbar-thumb:hover, .panel-body::-webkit-scrollbar-thumb:hover, .conversations-list::-webkit-scrollbar-thumb:hover, .document-scroll-area::-webkit-scrollbar-thumb:hover { background: #64748B; } /* ============================================ */ /* 阶段编辑弹窗 */ /* ============================================ */ .stage-edit-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 200; } .stage-edit-modal { background: white; border-radius: 12px; width: 480px; max-width: 90%; max-height: 80vh; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); } .stage-edit-modal .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #E5E7EB; background: #F9FAFB; } .stage-edit-modal .modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #111827; } .stage-edit-modal .close-btn { padding: 4px; background: transparent; border: none; border-radius: 6px; cursor: pointer; color: #6B7280; transition: all 0.2s; } .stage-edit-modal .close-btn:hover { background: #E5E7EB; color: #111827; } .stage-edit-modal .modal-body { padding: 20px; overflow-y: auto; max-height: 50vh; } .stage-edit-modal .form-group { margin-bottom: 16px; } .stage-edit-modal .form-group label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; } .stage-edit-modal .form-group input, .stage-edit-modal .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #D1D5DB; border-radius: 8px; font-size: 14px; color: #111827; transition: border-color 0.2s, box-shadow 0.2s; } .stage-edit-modal .form-group input:focus, .stage-edit-modal .form-group textarea:focus { outline: none; border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); } .stage-edit-modal .form-group textarea { resize: vertical; min-height: 80px; } .stage-edit-modal .form-row { display: flex; gap: 12px; } .stage-edit-modal .form-group.half { flex: 1; } .stage-edit-modal .modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid #E5E7EB; background: #F9FAFB; } .stage-edit-modal .cancel-btn { padding: 8px 16px; background: white; border: 1px solid #D1D5DB; border-radius: 8px; font-size: 14px; color: #374151; cursor: pointer; transition: all 0.2s; } .stage-edit-modal .cancel-btn:hover { background: #F3F4F6; } .stage-edit-modal .save-btn { padding: 8px 16px; background: #3B82F6; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; color: white; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s; } .stage-edit-modal .save-btn:hover:not(:disabled) { background: #2563EB; } .stage-edit-modal .save-btn:disabled { opacity: 0.6; cursor: not-allowed; } /* 编辑按钮样式 */ .stage-header .stage-actions { display: flex; align-items: center; gap: 8px; } .stage-header .edit-btn { padding: 4px; background: transparent; border: none; border-radius: 4px; cursor: pointer; color: #9CA3AF; transition: all 0.2s; opacity: 0; } .stage-card:hover .edit-btn { opacity: 1; } .stage-header .edit-btn:hover { background: #E5E7EB; color: #3B82F6; } /* 添加按钮 */ .stage-header .add-btn { padding: 4px; background: transparent; border: 1px dashed #D1D5DB; border-radius: 4px; cursor: pointer; color: #9CA3AF; transition: all 0.2s; } .stage-header .add-btn:hover { background: #EEF2FF; border-color: #6366F1; color: #6366F1; } /* 待完成图标 */ .stage-header .pending-icon { color: #D1D5DB; } /* 流式输出光标 */ .streaming-cursor { display: inline-block; animation: blink 1s step-end infinite; color: #3B82F6; font-weight: bold; } @keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } /* ============================================ */ /* 导出按钮样式 */ /* ============================================ */ .export-section { padding: 16px; margin: 12px 0; background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); border-radius: 12px; border: 1px solid #C7D2FE; } .export-btn { width: 100%; padding: 12px 16px; background: #4F46E5; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2); } .export-btn:hover:not(:disabled) { background: #4338CA; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3); } .export-btn:active:not(:disabled) { transform: translateY(0); } .export-btn:disabled { opacity: 0.6; cursor: not-allowed; } .export-btn.loading { background: #6366F1; } .export-btn .spinner { animation: spin 1s linear infinite; } .export-hint { margin-top: 8px; font-size: 12px; color: #4F46E5; text-align: center; } /* ============================================ */ /* 视图切换器 */ /* ============================================ */ .view-switcher { display: flex; background: #F3F4F6; padding: 4px; border-radius: 8px; gap: 2px; } .view-switch-btn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: none; background: transparent; color: #6B7280; font-size: 13px; font-weight: 500; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; } .view-switch-btn:hover:not(.disabled) { color: #374151; } .view-switch-btn.active { background: #FFFFFF; color: #4F46E5; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .view-switch-btn.disabled { opacity: 0.5; cursor: not-allowed; } /* ============================================ */ /* 文档面板 */ /* ============================================ */ .document-panel { display: flex; flex-direction: column; height: 100%; background: #E5E7EB; } .document-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; } .document-empty .empty-icon { font-size: 48px; margin-bottom: 16px; } .document-empty h3 { font-size: 18px; font-weight: 600; color: #374151; margin-bottom: 8px; } .document-empty p { font-size: 14px; color: #6B7280; max-width: 300px; } /* 文档工具栏 */ .document-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: #F9FAFB; border-bottom: 1px solid #E5E7EB; } .toolbar-left { display: flex; align-items: center; } .generating-status { display: flex; align-items: center; gap: 8px; color: #6366F1; font-size: 13px; font-weight: 500; } .generating-status .spinner { animation: spin 1s linear infinite; } .toolbar-right { display: flex; align-items: center; gap: 8px; } .toolbar-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid #D1D5DB; background: #FFFFFF; color: #374151; font-size: 13px; font-weight: 500; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; } .toolbar-btn:hover:not(:disabled) { background: #F9FAFB; border-color: #9CA3AF; } .toolbar-btn:disabled { opacity: 0.5; cursor: not-allowed; } .toolbar-btn.primary { background: #4F46E5; border-color: #4F46E5; color: #FFFFFF; } .toolbar-btn.primary:hover:not(:disabled) { background: #4338CA; border-color: #4338CA; } /* 文档滚动区域 */ .document-scroll-area { flex: 1; min-height: 0; /* 关键:允许 flex 子元素收缩 */ overflow-y: auto; padding: 24px; background: linear-gradient(to bottom, #D1D5DB 0%, #E5E7EB 100%); } /* A4 纸张效果 */ .a4-paper { max-width: 210mm; min-height: 297mm; margin: 0 auto; padding: 25mm 20mm; background: #FFFFFF; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 20px 25px -5px rgba(0, 0, 0, 0.1); font-family: 'Noto Serif SC', 'SimSun', serif; color: #1F2937; line-height: 1.8; font-size: 15px; } /* 纸张内容样式 */ .paper-content h1 { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 32px; padding-bottom: 16px; line-height: 1.4; } .paper-content h2 { font-size: 18px; font-weight: 700; margin-top: 24px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #1F2937; } .paper-content h3 { font-size: 16px; font-weight: 600; margin-top: 16px; margin-bottom: 8px; } .paper-content p { text-align: justify; text-indent: 2em; margin-bottom: 12px; } .paper-content ul, .paper-content ol { margin-left: 2em; margin-bottom: 12px; } .paper-content li { margin-bottom: 4px; } .paper-content strong { font-weight: 700; } /* 章节头部(带讨论按钮) */ .section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; } .section-header h2 { flex: 1; } .section-discuss-btn { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid #D1D5DB; background: #FFFFFF; color: #6B7280; font-size: 11px; font-family: 'Inter', sans-serif; border-radius: 4px; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; flex-shrink: 0; margin-top: 4px; } .section-discuss-btn:hover { background: #F3F4F6; color: #4F46E5; border-color: #A5B4FC; } /* 打字机光标 */ .typing-cursor { display: inline; animation: blink 1s step-end infinite; color: #4F46E5; font-weight: 700; } @keyframes blink { 50% { opacity: 0; } } /* 滚动到底部按钮 */ .scroll-to-bottom-btn { position: absolute; bottom: 80px; right: 40px; display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: #4F46E5; color: white; border: none; border-radius: 20px; cursor: pointer; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4); font-size: 12px; font-weight: 500; transition: all 0.2s; z-index: 10; animation: fadeIn 0.2s ease; } .scroll-to-bottom-btn:hover { background: #4338CA; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5); } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* 生成中的内容区域 */ .paper-content.typing { min-height: 200px; } /* ============================================ */ /* 可拖拽分栏 */ /* ============================================ */ .resizable-split-pane { position: relative; } .resizable-split-pane.dragging { cursor: col-resize; } .split-pane-handle:hover { background: #E5E7EB; } /* ============================================ */ /* 响应式 */ /* ============================================ */ @media (max-width: 1024px) { .state-panel { display: none; } .sidebar.expanded { position: absolute; z-index: 20; height: 100%; box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1); } .document-panel { display: none; } .view-switcher { display: none; } }