.chat-container { font-family: Arial, sans-serif; width: 100%; background-repeat: no-repeat; background-position: center 42%; background-size: 40% auto; /*padding: 20px;*/ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; overflow-y: auto; border: 2px dashed #666666; position: relative; height: 600px; } .chat-container::-webkit-scrollbar { display: none; /* WebKit 浏览器 */ } .chat-container-phone { font-family: Arial, sans-serif; width: 96%; background-repeat: no-repeat; background-position: center 42%; background-size: 60% auto; /*padding: 20px;*/ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; overflow-y: auto; border: 2px dashed #666666; position: relative; height: 600px; left: 2%; } .tips { position: sticky; top: 0px; left: 0px; width: 100%; display: block; line-height: 2rem; padding-left: 1.5rem; padding-right: 1.5rem; color: #c7254e; font-size: 1rem; background: rgba(100,100,100,0.3); z-index: 10; } .tips-phone { position: sticky; top: 0px; left: 0px; width: 100%; display: block; line-height: 1.4rem; padding-left: 0.5rem; padding-right: 0.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; color: #c7254e; font-size: 0.8rem; background: rgba(100,100,100,0.3); z-index: 10; } .message { display: flex; margin-bottom: 15px; } .avatar { width: 45px; height: 45px; border-radius: 50%; padding: 10px; } .message-content { background-color: rgba(58,58,58,0.8); padding: 10px 10px; border-radius: 10px; display: flex; flex-direction: column; align-items: flex-start; max-width: 70%; color: #8495a3; z-index: 9; } .nickname { font-weight: bold; margin-bottom: 1rem; color: #999999; } .nickname-phone { font-weight: bold; margin-bottom: 0.5rem; color: #999999; } .info{ font-size: 1rem; } .info-phone{ font-size: 0.9rem; margin-bottom: 0.5rem; line-height: 25px; } .time { font-size: 0.8em; color: #999999; } .time-phone { font-size: 0.8em; color: #999999; } .chatBoxOutside{ bottom: 0px; width: 100%; margin: auto; left: 0; right: 0; background-color: #1b1b1b; padding: 10px 20px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 0 0 10px 10px; height: 160px; z-index: 10; } .chatBoxExample{ width: 80%; height: 30px; margin-bottom: 0.5rem; white-space: nowrap; /* 防止内容换行 */ overflow-y: hidden; /* 隐藏纵向滚动条 */ display: flex; scroll-behavior: smooth; overflow-x: scroll; -webkit-overflow-scrolling: touch; scrollbar-width: none; /* Firefox */ -ms-overflow-style: none; /* IE/Edge */ scroll-snap-type: x mandatory; scrollbar-width: none; float: left; } .chatBoxExample::-webkit-scrollbar { display: none; /* WebKit 浏览器 */ } .chatBoxStop{ position: relative; float: right; /*padding: 0px 10px;*/ text-align: center; border-radius: 5px; height: 30px; line-height: 30px; color: #ccc; background: #3a3a3a; font-size: 0.8rem; cursor: pointer; width: 20%; border-radius: 0 20px 20px 0; } .chatBoxExample-list{ flex: 0 0 auto; /* 禁止伸缩 */ height: 30px; line-height: 30px; text-align: center; padding: 0 1rem; margin-right: 1rem; font-size: 0.8rem; float: left; background: #212121; border-radius: 20px; color: #999; /*max-width: 10rem;*/ white-space: nowrap; /* 防止文本换行 */ overflow: hidden; /* 隐藏溢出的文本 */ text-overflow: ellipsis; /* 显示省略号 */ cursor: pointer; display: inline-block; /*禁止选中文本*/ -webkit-user-select: none; /* Chrome, Safari, Opera */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; width: 33%; scroll-snap-align: start; display: inline-block; } .chatBoxExample-list:hover{ background: #3a3a3a; } .chatBoxInside{ width: 100%; height: 100px; display: block; left: 0; right: 0; } input[type="text"]{ outline: none; position: relative; width: 100%; height: 100%; /* 关键修改:移除line-height,添加顶部对齐 */ line-height: normal; /* 取消原有100%行高 */ padding: 0px 80px 40px 20px; /* 上右下左,顶部留10px间距 */ text-align: left; /* 确保文字左对齐 */ vertical-align: top; /* 顶部对齐 */ /* 原有其他样式保持不变 */ border-radius: 10px 0 0 10px; border: none; font-size: 1rem; color: #999999; background: #212121; box-sizing: border-box; } .multiline-input { /* 基础样式保持原有input效果 */ width: 100%; height: 60px; /* 固定高度 */ padding: 10px 60px 10px 20px; font-size: 1rem; color: #999999; background: #212121; border: none; border-radius: 10px 0 0 10px; box-sizing: border-box; outline: none; /* 关键Hack:强制换行显示 */ white-space: pre-wrap; /* 允许换行 */ overflow-y: auto; /* 显示滚动条 */ line-height: 1.5; /* 行高调整 */ resize: none; /* 禁止拖动调整 */ } /* 滚动条样式 (仅WebKit有效) */ .multiline-input::-webkit-scrollbar { width: 6px; background: #3a3a3a; } .multiline-input::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; } input[type="text"]:focus { outline: none; position: relative; width: 100%; left: 0%; height: 100%; line-height: 100%; border-radius: 10px 10px 10px 10px; border: none; padding-left: 20px; padding-right: 20px; padding-top: 0px; font-size: 1rem; color: #999999; float: left; background: #3a3a3a; box-sizing: border-box; } #askButton { position: absolute; /* 绝对定位 */ right: 40px; /* 距离右侧10px */ bottom: 40px; /* 距离底部10px */ width: 60px; /* 按钮宽度 */ height: 30px; /* 按钮高度 */ line-height: 30px; text-align: center; color: white; border-radius: 5px; cursor: pointer; z-index: 2; /* 确保在输入框上方 */ } #ragButton { position: absolute; /* 绝对定位 */ left: 40px; /* 距离右侧10px */ bottom: 40px; /* 距离底部10px */ width: 60px; /* 按钮宽度 */ height: 30px; /* 按钮高度 */ line-height: 30px; text-align: center; color: white; border-radius: 5px; cursor: pointer; z-index: 2; /* 确保在输入框上方 */ } .button-send { background: #6c757d; border: none; border-radius: 0 10px 10px 0; outline: none; color: #ffffff; text-align: center; height: 100%; line-height: 40px; width: 20%; float: left; font-size: 1rem; z-index: 99999; pointer-events: none; cursor: not-allowed; } /*文本排版样式*/ .para-break { height: 0; /* 保持结构但隐藏元素 */ margin-bottom: 0.4em; display: block; } .semi-break { margin-bottom: 0.2em; display: block; } .colon-break { margin-bottom: 0.1em; display: block; } /* 中文标点挤压优化 */ :lang(zh) { text-spacing: ideograph-alpha ideograph-numeric; } /* 基础分割线样式 */ .think-divider { border: 3px; height: 2px; background: linear-gradient(90deg, transparent, #ddd, transparent); margin: 1.5em 0; } .chat-br{ height: 0.1em; } .chat-think{ color: #007bff; margin-bottom: 1rem; text-align: right; } .chat-answer{ color: #007bff; margin-bottom: 1rem; text-align: right; } /*质控采纳与否*/ .quality{ width: 100%; height: 40px; line-height: 40px; margin-top: 10px; } .accept{ color: #007bff; float: left; cursor: pointer; } .refuse{ color: #c7254e; float: right; cursor: pointer; } .color-flash { animation: colorPulse 2s infinite; } @keyframes colorPulse { 0% { background-color: #212121; } 50% { background-color: #3a3a3a; } 100% { background-color: #212121; } } /*不采纳质控的弹窗*/ .alertBox{ width: 100%; height: 100%; z-index: 999; background: rgba(0,0,0,0.8); position: fixed; left: 0px; top: 0px; display: none; } .alertBoxBackground{ width: 100%; height: 100%; cursor: pointer; } .alertBoxChild{ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70%; } .alertBoxInput{ height: 40px; line-height: 40px; width: 80% } .alertBoxButton{ background: #6c757d; border: none; border-radius: 0 10px 10px 0; outline: none; color: #ffffff; text-align: center; height: 40px; line-height: 40px; width: 20%; float: left; font-size: 1rem; z-index: 99999; cursor: pointer; } /*ajax预加载遮罩层*/ .alertBoxAjax{ width: 100%; height: 100%; z-index: 999; background: rgba(0,0,0,0.8); position: fixed; left: 0px; top: 0px; display: none; } .alertBoxBackgroundAjax{ width: 100%; height: 100%; cursor: pointer; } .alertBoxChildAjax{ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70%; } .alertBoxButtonAjax{ background: #6c757d; border: none; border-radius: 10px 10px 10px 10px; outline: none; color: #ffffff; text-align: center; height: 40px; line-height: 40px; width: 100%; float: left; font-size: 1rem; z-index: 99999; } .ragnameBox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; font-family: Arial, sans-serif; } .ragnameBoxBackground { position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); } .ragnameBoxChild { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80%; max-width: 400px; background: #2a2a2a; border-radius: 10px; padding: 20px; box-shadow: 0 0 20px rgba(0,0,0,0.3); animation: fadeIn 0.3s ease; } /* 输入框样式 */ .ragnameBoxInput { width: 100%; height: 40px; line-height: 40px; padding: 0 15px; margin-bottom: 15px; border: 1px solid #444; border-radius: 5px; background: #333; color: #fff; font-size: 14px; outline: none; transition: all 0.3s; } .ragnameBoxInput:focus { border-color: #007bff; box-shadow: 0 0 5px rgba(0,123,255,0.5); } /* 按钮样式 */ .ragnameBoxButton { background: #007bff; border: none; border-radius: 5px; color: white; text-align: center; height: 40px; line-height: 40px; width: 100%; font-size: 16px; cursor: pointer; transition: all 0.3s; } .ragnameBoxButton:hover { background: #0069d9; } /*知识库质控的弹窗*/ .ragnameBox{ width: 100%; height: 100%; z-index: 999; background: rgba(0,0,0,0.8); position: fixed; left: 0px; top: 0px; display: none; } .ragnameBoxBackground{ width: 100%; height: 100%; cursor: pointer; } .ragnameBoxChild{ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70%; } .ragnameBoxInput{ height: 40px; line-height: 40px; width: 80% } .ragnameBoxButton{ background: #6c757d; border: none; border-radius: 0 10px 10px 0; outline: none; color: #ffffff; text-align: center; height: 40px; line-height: 40px; width: 20%; float: left; font-size: 1rem; z-index: 99999; cursor: pointer; } /*ajax预加载遮罩层*/ .ragnameBoxAjax{ width: 100%; height: 100%; z-index: 999; background: rgba(0,0,0,0.8); position: fixed; left: 0px; top: 0px; } .ragnameBoxBackgroundAjax{ width: 100%; height: 100%; cursor: pointer; } .ragnameBoxChildAjax{ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70%; } .ragnameBoxButtonAjax{ background: #6c757d; border: none; border-radius: 10px 10px 10px 10px; outline: none; color: #ffffff; text-align: center; height: 40px; line-height: 40px; width: 100%; float: left; font-size: 1rem; z-index: 99999; }