chat.css 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* 思考过程容器样式 */
  2. .thought-container {
  3. position: relative;
  4. margin: 10px 0;
  5. padding: 15px 15px 15px 20px;
  6. background-color: rgba(0, 0, 0, 0.03);
  7. border-radius: 8px;
  8. font-size: 14px;
  9. color: #666;
  10. line-height: 1.6;
  11. width: 100%;
  12. box-sizing: border-box;
  13. overflow-wrap: break-word;
  14. word-wrap: break-word;
  15. word-break: normal;
  16. white-space: normal;
  17. hyphens: auto;
  18. transition: max-height 0.3s ease;
  19. text-align: left;
  20. }
  21. /* 思考过程容器的内容区域 */
  22. .thought-container-content {
  23. display: block;
  24. width: 100%;
  25. }
  26. .thought-container p {
  27. margin: 0;
  28. padding: 0;
  29. display: inline;
  30. white-space: normal;
  31. overflow-wrap: break-word;
  32. word-wrap: break-word;
  33. word-break: normal;
  34. }
  35. /* 给每个段落之间添加空格 */
  36. .thought-container p:after {
  37. content: " ";
  38. white-space: normal;
  39. }
  40. .thought-container br {
  41. display: none;
  42. }
  43. .thought-container::before {
  44. content: "思考中...";
  45. display: block;
  46. font-size: 0.9rem;
  47. color: #7952b3;
  48. font-weight: 600;
  49. margin-bottom: 8px;
  50. font-style: normal;
  51. letter-spacing: 0.03em;
  52. }
  53. .thought-container p:last-child {
  54. margin-bottom: 0;
  55. }
  56. /* 思考过程切换按钮 */
  57. .thought-toggle {
  58. position: absolute;
  59. top: 8px;
  60. left: 8px;
  61. width: 24px;
  62. height: 24px;
  63. background: rgba(255, 255, 255, 0.7);
  64. border: 1px solid #ddd;
  65. border-radius: 50%;
  66. cursor: pointer;
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. padding: 0;
  71. transition: all 0.2s ease;
  72. z-index: 20;
  73. }
  74. .thought-toggle:hover {
  75. background: rgba(255, 255, 255, 0.9);
  76. transform: scale(1.05);
  77. }
  78. .thought-toggle:focus {
  79. outline: none;
  80. box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  81. }
  82. .thought-toggle svg {
  83. width: 16px;
  84. height: 16px;
  85. color: #666;
  86. transition: transform 0.2s ease;
  87. }
  88. /* 暗色模式适配 */
  89. @media (prefers-color-scheme: dark) {
  90. .thought-container {
  91. background-color: rgba(255, 255, 255, 0.05);
  92. color: #aaa;
  93. }
  94. .thought-toggle {
  95. background: rgba(0, 0, 0, 0.3);
  96. border-color: #444;
  97. }
  98. .thought-toggle:hover {
  99. background: rgba(0, 0, 0, 0.4);
  100. }
  101. .thought-toggle svg {
  102. color: #aaa;
  103. }
  104. }