chat.less 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. page {
  2. background: linear-gradient(180deg, #E3F2FD 0%, #E8F5E9 50%, #FFF3E0 100%);
  3. height: 100%;
  4. }
  5. .chat-container {
  6. display: flex;
  7. flex-direction: column;
  8. height: calc(100vh - 88px);
  9. // margin-top: 88px;
  10. box-sizing: border-box;
  11. }
  12. .chat-scroll {
  13. flex: 1;
  14. overflow-y: auto;
  15. }
  16. .message-list {
  17. padding: 16px;
  18. }
  19. .message-row {
  20. display: flex;
  21. margin-bottom: 16px;
  22. align-items: flex-start;
  23. }
  24. .ai-row {
  25. justify-content: flex-start;
  26. }
  27. .user-row {
  28. justify-content: flex-end;
  29. }
  30. /* AI头像 - 蓝色机器人 */
  31. .avatar {
  32. width: 40px;
  33. height: 40px;
  34. border-radius: 50%;
  35. flex-shrink: 0;
  36. display: flex;
  37. align-items: center;
  38. justify-content: center;
  39. overflow: hidden;
  40. }
  41. .ai-avatar {
  42. margin-right: 10px;
  43. background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%);
  44. border: 2px solid #fff;
  45. box-shadow: 0 2px 8px rgba(66, 165, 245, 0.3);
  46. }
  47. .ai-avatar-image {
  48. width: 70%;
  49. height: 70%;
  50. object-fit: contain;
  51. }
  52. .user-avatar {
  53. margin-left: 10px;
  54. background: linear-gradient(135deg, #66BB6A 0%, #81C784 100%);
  55. border: 2px solid #fff;
  56. box-shadow: 0 2px 8px rgba(102, 187, 106, 0.3);
  57. }
  58. .avatar-text {
  59. color: #fff;
  60. font-size: 12px;
  61. font-weight: 600;
  62. }
  63. .avatar-fallback {
  64. color: #fff;
  65. font-size: 12px;
  66. font-weight: 600;
  67. }
  68. .message-content {
  69. max-width: 75%;
  70. }
  71. /* AI消息气泡 - 白色 */
  72. .bubble {
  73. padding: 12px 16px;
  74. border-radius: 18px;
  75. word-wrap: break-word;
  76. box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  77. }
  78. .ai-bubble {
  79. background-color: #FFFFFF;
  80. border-bottom-left-radius: 4px;
  81. }
  82. /* 用户消息气泡 - 蓝色 */
  83. .user-bubble {
  84. background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
  85. color: #FFFFFF;
  86. border-bottom-right-radius: 4px;
  87. }
  88. .message-text {
  89. font-size: 15px;
  90. line-height: 1.5;
  91. color: inherit;
  92. }
  93. /* FAQ卡片 - 白色圆角 */
  94. .faq-card {
  95. background: rgba(255, 255, 255, 0.9);
  96. border-radius: 16px;
  97. padding: 14px 12px;
  98. margin-top: 8px;
  99. width: 280px;
  100. backdrop-filter: blur(10px);
  101. border: 1px solid rgba(255, 255, 255, 0.8);
  102. box-shadow: 0 4px 16px rgba(33, 150, 243, 0.1);
  103. }
  104. .faq-header {
  105. margin-bottom: 10px;
  106. padding-left: 2px;
  107. }
  108. .faq-title {
  109. font-size: 15px;
  110. font-weight: 700;
  111. color: #2196F3;
  112. letter-spacing: 0.5px;
  113. }
  114. .faq-list {
  115. display: flex;
  116. flex-direction: column;
  117. gap: 8px;
  118. }
  119. .faq-item {
  120. display: flex;
  121. align-items: center;
  122. padding: 10px 12px;
  123. background-color: #FFFFFF;
  124. border-radius: 10px;
  125. box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  126. cursor: pointer;
  127. transition: all 0.2s ease;
  128. }
  129. .faq-item:active {
  130. transform: scale(0.98);
  131. background-color: #F5F9FC;
  132. }
  133. .faq-icon {
  134. width: 18px;
  135. height: 18px;
  136. background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
  137. border-radius: 4px;
  138. display: flex;
  139. align-items: center;
  140. justify-content: center;
  141. margin-right: 10px;
  142. flex-shrink: 0;
  143. }
  144. .faq-icon-text {
  145. color: #fff;
  146. font-size: 10px;
  147. font-weight: 700;
  148. }
  149. .faq-text {
  150. flex: 1;
  151. font-size: 13px;
  152. color: #333;
  153. font-weight: 500;
  154. }
  155. .faq-arrow {
  156. font-size: 14px;
  157. color: #CCC;
  158. margin-left: 4px;
  159. }
  160. /* 用户图片 */
  161. .user-image {
  162. max-width: 180px;
  163. border-radius: 12px;
  164. overflow: hidden;
  165. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  166. }
  167. .user-image image {
  168. width: 100%;
  169. max-height: 180px;
  170. display: block;
  171. }
  172. /* 输入区域 - 圆角灰色 */
  173. .input-area {
  174. background-color: #FFFFFF;
  175. border-top: 1px solid rgba(0,0,0,0.04);
  176. padding: 10px 16px;
  177. padding-bottom: calc(10px + env(safe-area-inset-bottom));
  178. }
  179. .input-container {
  180. display: flex;
  181. align-items: center;
  182. background-color: #F5F7FA;
  183. border-radius: 24px;
  184. padding: 6px 10px;
  185. }
  186. .input-wrapper {
  187. flex: 1;
  188. display: flex;
  189. align-items: center;
  190. padding: 0 4px;
  191. }
  192. .voice-btn {
  193. width: 30px;
  194. height: 30px;
  195. display: flex;
  196. align-items: center;
  197. justify-content: center;
  198. margin-right: 4px;
  199. }
  200. .voice-icon {
  201. font-size: 16px;
  202. color: #666;
  203. }
  204. .chat-input {
  205. flex: 1;
  206. height: 34px;
  207. font-size: 15px;
  208. color: #333;
  209. background: transparent;
  210. }
  211. .placeholder {
  212. color: #AAA;
  213. font-size: 15px;
  214. }
  215. .image-btn {
  216. width: 34px;
  217. height: 34px;
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. background-color: #FFFFFF;
  222. border-radius: 50%;
  223. box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  224. margin-left: 4px;
  225. }
  226. .image-icon {
  227. font-size: 18px;
  228. color: #666;
  229. }
  230. /* 加载中状态 */
  231. .loading-row {
  232. align-items: center;
  233. }
  234. .loading-bubble {
  235. background-color: #FFFFFF;
  236. border-radius: 16px;
  237. padding: 12px 18px;
  238. border-bottom-left-radius: 4px;
  239. box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  240. }
  241. .loading-dots {
  242. display: flex;
  243. align-items: center;
  244. gap: 5px;
  245. }
  246. .dot {
  247. width: 7px;
  248. height: 7px;
  249. background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
  250. border-radius: 50%;
  251. animation: bounce 1.4s ease-in-out infinite both;
  252. }
  253. .dot:nth-child(1) {
  254. animation-delay: -0.32s;
  255. }
  256. .dot:nth-child(2) {
  257. animation-delay: -0.16s;
  258. }
  259. @keyframes bounce {
  260. 0%, 80%, 100% {
  261. transform: scale(0.6);
  262. opacity: 0.5;
  263. }
  264. 40% {
  265. transform: scale(1);
  266. opacity: 1;
  267. }
  268. }