index.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. /* ==================== Tailwind CSS 配置 ==================== */
  2. @layer tailwind-base, semi, tailwind-components, tailwind-utils;
  3. @layer tailwind-base {
  4. @tailwind base;
  5. }
  6. @layer tailwind-components {
  7. @tailwind components;
  8. }
  9. @layer tailwind-utils {
  10. @tailwind utilities;
  11. }
  12. /* ==================== 全局基础样式 ==================== */
  13. :root {
  14. --sidebar-width: 180px;
  15. --sidebar-width-collapsed: 60px;
  16. --sidebar-current-width: var(--sidebar-width);
  17. }
  18. body.sidebar-collapsed {
  19. --sidebar-current-width: var(--sidebar-width-collapsed);
  20. }
  21. body {
  22. font-family: Lato, 'Helvetica Neue', Arial, Helvetica, 'Microsoft YaHei', sans-serif;
  23. color: var(--semi-color-text-0);
  24. background-color: var(--semi-color-bg-0);
  25. }
  26. code {
  27. font-family:
  28. source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
  29. }
  30. /* ==================== 布局相关样式 ==================== */
  31. .semi-layout::-webkit-scrollbar,
  32. .semi-layout-content::-webkit-scrollbar,
  33. .semi-sider::-webkit-scrollbar {
  34. display: none;
  35. width: 0;
  36. height: 0;
  37. }
  38. .semi-layout,
  39. .semi-layout-content,
  40. .semi-sider {
  41. -ms-overflow-style: none;
  42. scrollbar-width: none;
  43. }
  44. /* ==================== 导航和侧边栏样式 ==================== */
  45. /* 导航项样式 */
  46. .semi-input-textarea-wrapper,
  47. .semi-navigation-sub-title,
  48. .semi-chat-inputBox-sendButton,
  49. .semi-page-item,
  50. .semi-navigation-item,
  51. .semi-tag-closable,
  52. .semi-input-wrapper,
  53. .semi-tabs-tab-button,
  54. .semi-select,
  55. .semi-button,
  56. .semi-datepicker-range-input {
  57. border-radius: 10px !important;
  58. }
  59. .semi-navigation-item {
  60. margin-bottom: 4px !important;
  61. padding: 4px 12px !important;
  62. }
  63. .semi-navigation-sub-title {
  64. padding: 0 !important;
  65. }
  66. .semi-navigation-item-icon {
  67. justify-items: center;
  68. align-items: center;
  69. }
  70. .semi-navigation-item-icon-info {
  71. margin-right: 0;
  72. }
  73. .semi-navigation-item,
  74. .semi-navigation-sub-title {
  75. height: 100% !important;
  76. }
  77. .semi-navigation-item-collapsed {
  78. height: 44px !important;
  79. }
  80. #root>section>header>section>div>div>div>div.semi-navigation-header-list-outer>div.semi-navigation-list-wrapper>ul>div>a>li>span {
  81. font-weight: 600 !important;
  82. }
  83. /* 自定义侧边栏样式 */
  84. .sidebar-container {
  85. height: 100%;
  86. display: flex;
  87. flex-direction: column;
  88. transition: width 0.3s ease;
  89. }
  90. .sidebar-nav {
  91. flex: 1;
  92. width: 100%;
  93. background: var(--semi-color-bg-0);
  94. height: 100%;
  95. overflow: hidden;
  96. border-right: none;
  97. overflow-y: auto;
  98. scrollbar-width: none;
  99. -ms-overflow-style: none;
  100. }
  101. .sidebar-nav::-webkit-scrollbar {
  102. display: none;
  103. }
  104. /* 侧边栏导航项样式 */
  105. .sidebar-nav-item {
  106. border-radius: 6px;
  107. margin: 3px 8px;
  108. transition: all 0.15s ease;
  109. padding: 8px 12px;
  110. }
  111. .sidebar-nav-item:hover {
  112. background-color: rgba(var(--semi-blue-0), 0.08);
  113. color: var(--semi-color-primary);
  114. }
  115. .sidebar-nav-item-selected {
  116. background-color: rgba(var(--semi-blue-0), 0.12);
  117. color: var(--semi-color-primary);
  118. font-weight: 500;
  119. }
  120. /* 图标容器样式 */
  121. .sidebar-icon-container {
  122. width: 22px;
  123. height: 22px;
  124. display: flex;
  125. align-items: center;
  126. justify-content: center;
  127. margin-right: 10px;
  128. transition: all 0.2s ease;
  129. }
  130. .sidebar-sub-icon-container {
  131. width: 18px;
  132. height: 18px;
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. margin-right: 10px;
  137. margin-left: 1px;
  138. transition: all 0.2s ease;
  139. }
  140. /* 分割线样式 */
  141. .sidebar-divider {
  142. margin: 4px 8px;
  143. opacity: 0.15;
  144. }
  145. /* 分组标签样式 */
  146. .sidebar-group-label {
  147. padding: 4px 15px 8px;
  148. color: var(--semi-color-text-2);
  149. font-size: 12px;
  150. text-transform: uppercase;
  151. letter-spacing: 0.5px;
  152. opacity: 0.8;
  153. }
  154. /* 底部折叠按钮 */
  155. .sidebar-collapse-button {
  156. display: flex;
  157. justify-content: center;
  158. align-items: center;
  159. padding: 12px;
  160. cursor: pointer;
  161. background-color: var(--semi-color-bg-0);
  162. position: sticky;
  163. bottom: 0;
  164. z-index: 10;
  165. box-shadow: 0 -10px 10px -5px var(--semi-color-bg-0);
  166. backdrop-filter: blur(4px);
  167. border-top: 1px solid rgba(var(--semi-grey-0), 0.08);
  168. }
  169. .sidebar-collapse-button-inner {
  170. width: 28px;
  171. height: 28px;
  172. border-radius: 9999px;
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. background-color: var(--semi-color-fill-0);
  177. transition: all 0.2s ease;
  178. }
  179. .sidebar-collapse-icon-container {
  180. display: inline-block;
  181. transition: transform 0.3s ease;
  182. }
  183. /* 侧边栏区域容器 */
  184. .sidebar-section {
  185. padding-top: 12px;
  186. }
  187. /* ==================== 聊天界面样式 ==================== */
  188. .semi-chat {
  189. padding-top: 0 !important;
  190. padding-bottom: 0 !important;
  191. height: 100%;
  192. max-width: 100% !important;
  193. width: 100% !important;
  194. overflow: hidden !important;
  195. }
  196. .semi-chat-chatBox {
  197. max-width: 100% !important;
  198. overflow: hidden !important;
  199. }
  200. .semi-chat-chatBox-wrap {
  201. max-width: 100% !important;
  202. overflow: hidden !important;
  203. }
  204. .semi-chat-chatBox-content {
  205. min-width: auto;
  206. word-break: break-word;
  207. max-width: 100% !important;
  208. overflow-wrap: break-word !important;
  209. }
  210. .semi-chat-content {
  211. max-width: 100% !important;
  212. overflow: hidden !important;
  213. }
  214. .semi-chat-list {
  215. max-width: 100% !important;
  216. overflow-x: hidden !important;
  217. }
  218. .semi-chat-container {
  219. overflow-x: hidden !important;
  220. }
  221. .semi-chat-chatBox-action {
  222. column-gap: 0 !important;
  223. }
  224. .semi-chat-inputBox-clearButton.semi-button .semi-icon {
  225. font-size: 20px !important;
  226. }
  227. /* 隐藏所有聊天相关区域的滚动条 */
  228. .semi-chat::-webkit-scrollbar,
  229. .semi-chat-chatBox::-webkit-scrollbar,
  230. .semi-chat-chatBox-wrap::-webkit-scrollbar,
  231. .semi-chat-chatBox-content::-webkit-scrollbar,
  232. .semi-chat-content::-webkit-scrollbar,
  233. .semi-chat-list::-webkit-scrollbar,
  234. .semi-chat-container::-webkit-scrollbar {
  235. display: none;
  236. }
  237. .semi-chat,
  238. .semi-chat-chatBox,
  239. .semi-chat-chatBox-wrap,
  240. .semi-chat-chatBox-content,
  241. .semi-chat-content,
  242. .semi-chat-list,
  243. .semi-chat-container {
  244. -ms-overflow-style: none;
  245. scrollbar-width: none;
  246. }
  247. /* ==================== 组件特定样式 ==================== */
  248. /* Tabs组件样式 */
  249. .semi-tabs-content {
  250. padding: 0 !important;
  251. height: calc(100% - 40px) !important;
  252. flex: 1 !important;
  253. }
  254. .semi-tabs-content .semi-tabs-pane {
  255. height: 100% !important;
  256. overflow: hidden !important;
  257. }
  258. .semi-tabs-content .semi-tabs-pane>div {
  259. height: 100% !important;
  260. }
  261. /* 表格样式 */
  262. .tableShow {
  263. display: revert;
  264. }
  265. .tableHiddle {
  266. display: none !important;
  267. }
  268. /* 页脚样式 */
  269. .custom-footer {
  270. font-size: 1.1em;
  271. }
  272. /* 卡片内容容器通用样式 */
  273. .card-content-container {
  274. position: relative;
  275. }
  276. .card-content-fade-indicator {
  277. position: absolute;
  278. bottom: 0;
  279. left: 0;
  280. right: 0;
  281. height: 30px;
  282. background: linear-gradient(transparent, var(--semi-color-bg-1));
  283. pointer-events: none;
  284. z-index: 1;
  285. opacity: 0;
  286. transition: opacity 0.3s ease;
  287. }
  288. /* ==================== 调试面板特定样式 ==================== */
  289. .debug-panel .semi-tabs {
  290. height: 100% !important;
  291. display: flex !important;
  292. flex-direction: column !important;
  293. }
  294. .debug-panel .semi-tabs-bar {
  295. flex-shrink: 0 !important;
  296. }
  297. .debug-panel .semi-tabs-content {
  298. flex: 1 !important;
  299. overflow: hidden !important;
  300. }
  301. /* ==================== 滚动条样式统一管理 ==================== */
  302. /* 表格滚动条样式 */
  303. .semi-table-body::-webkit-scrollbar {
  304. width: 6px;
  305. height: 6px;
  306. }
  307. .semi-table-body::-webkit-scrollbar-thumb {
  308. background: rgba(var(--semi-grey-2), 0.3);
  309. border-radius: 2px;
  310. }
  311. .semi-table-body::-webkit-scrollbar-thumb:hover {
  312. background: rgba(var(--semi-grey-2), 0.5);
  313. }
  314. .semi-table-body::-webkit-scrollbar-track {
  315. background: transparent;
  316. }
  317. /* 侧边抽屉滚动条样式 */
  318. .semi-sidesheet-body::-webkit-scrollbar {
  319. width: 6px;
  320. height: 6px;
  321. }
  322. .semi-sidesheet-body::-webkit-scrollbar-thumb {
  323. background: rgba(var(--semi-grey-2), 0.3);
  324. border-radius: 2px;
  325. }
  326. .semi-sidesheet-body::-webkit-scrollbar-thumb:hover {
  327. background: rgba(var(--semi-grey-2), 0.5);
  328. }
  329. .semi-sidesheet-body::-webkit-scrollbar-track {
  330. background: transparent;
  331. }
  332. /* 隐藏卡片内容区域的滚动条 */
  333. .model-test-scroll,
  334. .card-content-scroll,
  335. .model-settings-scroll,
  336. .thinking-content-scroll,
  337. .custom-request-textarea .semi-input,
  338. .custom-request-textarea textarea,
  339. .notice-content-scroll {
  340. -ms-overflow-style: none;
  341. scrollbar-width: none;
  342. }
  343. .model-test-scroll::-webkit-scrollbar,
  344. .card-content-scroll::-webkit-scrollbar,
  345. .model-settings-scroll::-webkit-scrollbar,
  346. .thinking-content-scroll::-webkit-scrollbar,
  347. .custom-request-textarea .semi-input::-webkit-scrollbar,
  348. .custom-request-textarea textarea::-webkit-scrollbar,
  349. .notice-content-scroll::-webkit-scrollbar {
  350. display: none;
  351. }
  352. /* 图片列表滚动条样式 */
  353. .image-list-scroll::-webkit-scrollbar {
  354. width: 6px;
  355. height: 6px;
  356. }
  357. .image-list-scroll::-webkit-scrollbar-thumb {
  358. background: var(--semi-color-tertiary-light-default);
  359. border-radius: 3px;
  360. }
  361. .image-list-scroll::-webkit-scrollbar-thumb:hover {
  362. background: var(--semi-color-tertiary);
  363. }
  364. .image-list-scroll::-webkit-scrollbar-track {
  365. background: transparent;
  366. }
  367. /* ==================== 同步倍率 - 渠道选择器 ==================== */
  368. .components-transfer-source-item,
  369. .components-transfer-selected-item {
  370. display: flex;
  371. align-items: center;
  372. padding: 8px;
  373. }
  374. .semi-transfer-left-list,
  375. .semi-transfer-right-list {
  376. -ms-overflow-style: none;
  377. scrollbar-width: none;
  378. }
  379. .semi-transfer-left-list::-webkit-scrollbar,
  380. .semi-transfer-right-list::-webkit-scrollbar {
  381. display: none;
  382. }
  383. .components-transfer-source-item .semi-checkbox,
  384. .components-transfer-selected-item .semi-checkbox {
  385. display: flex;
  386. align-items: center;
  387. width: 100%;
  388. }
  389. .components-transfer-source-item .semi-avatar,
  390. .components-transfer-selected-item .semi-avatar {
  391. margin-right: 12px;
  392. flex-shrink: 0;
  393. }
  394. .components-transfer-source-item .info,
  395. .components-transfer-selected-item .info {
  396. flex: 1;
  397. overflow: hidden;
  398. display: flex;
  399. flex-direction: column;
  400. justify-content: center;
  401. }
  402. .components-transfer-source-item .name,
  403. .components-transfer-selected-item .name {
  404. font-weight: 500;
  405. white-space: nowrap;
  406. overflow: hidden;
  407. text-overflow: ellipsis;
  408. }
  409. .components-transfer-source-item .email,
  410. .components-transfer-selected-item .email {
  411. font-size: 12px;
  412. color: var(--semi-color-text-2);
  413. display: flex;
  414. align-items: center;
  415. }
  416. .components-transfer-selected-item .semi-icon-close {
  417. margin-left: 8px;
  418. cursor: pointer;
  419. color: var(--semi-color-text-2);
  420. }
  421. .components-transfer-selected-item .semi-icon-close:hover {
  422. color: var(--semi-color-text-0);
  423. }
  424. /* ==================== 未读通知闪光效果 ==================== */
  425. @keyframes sweep-shine {
  426. 0% {
  427. background-position: 200% 0;
  428. }
  429. 100% {
  430. background-position: -200% 0;
  431. }
  432. }
  433. .shine-text {
  434. background: linear-gradient(90deg, currentColor 0%, currentColor 40%, rgba(255, 255, 255, 0.9) 50%, currentColor 60%, currentColor 100%);
  435. background-size: 200% 100%;
  436. -webkit-background-clip: text;
  437. background-clip: text;
  438. -webkit-text-fill-color: transparent;
  439. animation: sweep-shine 4s linear infinite;
  440. }
  441. .dark .shine-text {
  442. background: linear-gradient(90deg, currentColor 0%, currentColor 40%, #facc15 50%, currentColor 60%, currentColor 100%);
  443. background-size: 200% 100%;
  444. -webkit-background-clip: text;
  445. background-clip: text;
  446. -webkit-text-fill-color: transparent;
  447. }
  448. /* ==================== ScrollList 定制样式 ==================== */
  449. .semi-scrolllist,
  450. .semi-scrolllist * {
  451. -ms-overflow-style: none;
  452. /* IE, Edge */
  453. scrollbar-width: none;
  454. /* Firefox */
  455. background: transparent !important;
  456. }
  457. .semi-scrolllist::-webkit-scrollbar,
  458. .semi-scrolllist *::-webkit-scrollbar {
  459. width: 0 !important;
  460. height: 0 !important;
  461. display: none !important;
  462. }
  463. .semi-scrolllist-body {
  464. padding: 1px !important;
  465. }
  466. .semi-scrolllist-list-outer {
  467. padding-right: 0 !important;
  468. }
  469. /* ==================== Banner 背景模糊球 ==================== */
  470. .blur-ball {
  471. position: absolute;
  472. width: 360px;
  473. height: 360px;
  474. border-radius: 50%;
  475. filter: blur(120px);
  476. pointer-events: none;
  477. z-index: -1;
  478. }
  479. .blur-ball-indigo {
  480. background: #6366f1;
  481. /* indigo-500 */
  482. top: 40px;
  483. left: 50%;
  484. transform: translateX(-50%);
  485. opacity: 0.5;
  486. }
  487. .blur-ball-teal {
  488. background: #14b8a6;
  489. /* teal-400 */
  490. top: 200px;
  491. left: 30%;
  492. opacity: 0.4;
  493. }
  494. /* 浅色主题下让模糊球更柔和 */
  495. html:not(.dark) .blur-ball-indigo {
  496. opacity: 0.25;
  497. }
  498. html:not(.dark) .blur-ball-teal {
  499. opacity: 0.2;
  500. }
  501. /* ==================== 表格卡片滚动设置 ==================== */
  502. .table-scroll-card {
  503. display: flex;
  504. flex-direction: column;
  505. height: calc(100vh - 110px);
  506. max-height: calc(100vh - 110px);
  507. }
  508. .table-scroll-card .semi-card-body {
  509. flex: 1 1 auto;
  510. overflow-y: auto;
  511. -ms-overflow-style: none;
  512. scrollbar-width: none;
  513. }
  514. .table-scroll-card .semi-card-body::-webkit-scrollbar {
  515. display: none;
  516. }
  517. @media (max-width: 767px) {
  518. .table-scroll-card {
  519. height: calc(100vh - 77px);
  520. max-height: calc(100vh - 77px);
  521. }
  522. }