index.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  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-tagInput,
  47. .semi-input-textarea-wrapper,
  48. .semi-navigation-sub-title,
  49. .semi-chat-inputBox-sendButton,
  50. .semi-page-item,
  51. .semi-navigation-item,
  52. .semi-tag-closable,
  53. .semi-input-wrapper,
  54. .semi-tabs-tab-button,
  55. .semi-select,
  56. .semi-button,
  57. .semi-datepicker-range-input {
  58. border-radius: 10px !important;
  59. }
  60. .semi-navigation-item {
  61. margin-bottom: 4px !important;
  62. padding: 4px 12px !important;
  63. }
  64. .semi-navigation-sub-title {
  65. padding: 0 !important;
  66. }
  67. .semi-navigation-item-icon {
  68. justify-items: center;
  69. align-items: center;
  70. }
  71. .semi-navigation-item-icon-info {
  72. margin-right: 0;
  73. }
  74. .semi-navigation-item,
  75. .semi-navigation-sub-title {
  76. height: 100% !important;
  77. }
  78. .semi-navigation-item-collapsed {
  79. height: 44px !important;
  80. }
  81. #root>section>header>section>div>div>div>div.semi-navigation-header-list-outer>div.semi-navigation-list-wrapper>ul>div>a>li>span {
  82. font-weight: 600 !important;
  83. }
  84. /* 自定义侧边栏样式 */
  85. .sidebar-container {
  86. height: 100%;
  87. display: flex;
  88. flex-direction: column;
  89. transition: width 0.3s ease;
  90. }
  91. .sidebar-nav {
  92. flex: 1;
  93. width: 100%;
  94. background: var(--semi-color-bg-0);
  95. height: 100%;
  96. overflow: hidden;
  97. border-right: none;
  98. overflow-y: auto;
  99. scrollbar-width: none;
  100. -ms-overflow-style: none;
  101. }
  102. .sidebar-nav::-webkit-scrollbar {
  103. display: none;
  104. }
  105. /* 侧边栏导航项样式 */
  106. .sidebar-nav-item {
  107. border-radius: 6px;
  108. margin: 3px 8px;
  109. transition: all 0.15s ease;
  110. padding: 8px 12px;
  111. }
  112. .sidebar-nav-item:hover {
  113. background-color: rgba(var(--semi-blue-0), 0.08);
  114. color: var(--semi-color-primary);
  115. }
  116. .sidebar-nav-item-selected {
  117. background-color: rgba(var(--semi-blue-0), 0.12);
  118. color: var(--semi-color-primary);
  119. font-weight: 500;
  120. }
  121. /* 图标容器样式 */
  122. .sidebar-icon-container {
  123. width: 22px;
  124. height: 22px;
  125. display: flex;
  126. align-items: center;
  127. justify-content: center;
  128. margin-right: 10px;
  129. transition: all 0.2s ease;
  130. }
  131. .sidebar-sub-icon-container {
  132. width: 18px;
  133. height: 18px;
  134. display: flex;
  135. align-items: center;
  136. justify-content: center;
  137. margin-right: 10px;
  138. margin-left: 1px;
  139. transition: all 0.2s ease;
  140. }
  141. /* 分割线样式 */
  142. .sidebar-divider {
  143. margin: 4px 8px;
  144. opacity: 0.15;
  145. }
  146. /* 分组标签样式 */
  147. .sidebar-group-label {
  148. padding: 4px 15px 8px;
  149. color: var(--semi-color-text-2);
  150. font-size: 12px;
  151. text-transform: uppercase;
  152. letter-spacing: 0.5px;
  153. opacity: 0.8;
  154. }
  155. /* 底部折叠按钮 */
  156. .sidebar-collapse-button {
  157. display: flex;
  158. justify-content: center;
  159. align-items: center;
  160. padding: 12px;
  161. cursor: pointer;
  162. background-color: var(--semi-color-bg-0);
  163. position: sticky;
  164. bottom: 0;
  165. z-index: 10;
  166. box-shadow: 0 -10px 10px -5px var(--semi-color-bg-0);
  167. backdrop-filter: blur(4px);
  168. border-top: 1px solid rgba(var(--semi-grey-0), 0.08);
  169. }
  170. .sidebar-collapse-button-inner {
  171. width: 28px;
  172. height: 28px;
  173. border-radius: 9999px;
  174. display: flex;
  175. align-items: center;
  176. justify-content: center;
  177. background-color: var(--semi-color-fill-0);
  178. transition: all 0.2s ease;
  179. }
  180. .sidebar-collapse-icon-container {
  181. display: inline-block;
  182. transition: transform 0.3s ease;
  183. }
  184. /* 侧边栏区域容器 */
  185. .sidebar-section {
  186. padding-top: 12px;
  187. }
  188. /* ==================== 聊天界面样式 ==================== */
  189. .semi-chat {
  190. padding-top: 0 !important;
  191. padding-bottom: 0 !important;
  192. height: 100%;
  193. max-width: 100% !important;
  194. width: 100% !important;
  195. overflow: hidden !important;
  196. }
  197. .semi-chat-chatBox {
  198. max-width: 100% !important;
  199. overflow: hidden !important;
  200. }
  201. .semi-chat-chatBox-wrap {
  202. max-width: 100% !important;
  203. overflow: hidden !important;
  204. }
  205. .semi-chat-chatBox-content {
  206. min-width: auto;
  207. word-break: break-word;
  208. max-width: 100% !important;
  209. overflow-wrap: break-word !important;
  210. }
  211. .semi-chat-content {
  212. max-width: 100% !important;
  213. overflow: hidden !important;
  214. }
  215. .semi-chat-list {
  216. max-width: 100% !important;
  217. overflow-x: hidden !important;
  218. }
  219. .semi-chat-container {
  220. overflow-x: hidden !important;
  221. }
  222. .semi-chat-chatBox-action {
  223. column-gap: 0 !important;
  224. }
  225. .semi-chat-inputBox-clearButton.semi-button .semi-icon {
  226. font-size: 20px !important;
  227. }
  228. /* 隐藏所有聊天相关区域的滚动条 */
  229. .semi-chat::-webkit-scrollbar,
  230. .semi-chat-chatBox::-webkit-scrollbar,
  231. .semi-chat-chatBox-wrap::-webkit-scrollbar,
  232. .semi-chat-chatBox-content::-webkit-scrollbar,
  233. .semi-chat-content::-webkit-scrollbar,
  234. .semi-chat-list::-webkit-scrollbar,
  235. .semi-chat-container::-webkit-scrollbar {
  236. display: none;
  237. }
  238. .semi-chat,
  239. .semi-chat-chatBox,
  240. .semi-chat-chatBox-wrap,
  241. .semi-chat-chatBox-content,
  242. .semi-chat-content,
  243. .semi-chat-list,
  244. .semi-chat-container {
  245. -ms-overflow-style: none;
  246. scrollbar-width: none;
  247. }
  248. /* ==================== 组件特定样式 ==================== */
  249. /* SelectableButtonGroup */
  250. .sbg-button .semi-button-content {
  251. min-width: 0 !important;
  252. }
  253. .sbg-content {
  254. display: flex;
  255. align-items: center;
  256. gap: 4px;
  257. width: 100%;
  258. min-width: 0;
  259. }
  260. .sbg-ellipsis {
  261. flex: 1;
  262. min-width: 0;
  263. overflow: hidden;
  264. white-space: nowrap;
  265. text-overflow: ellipsis;
  266. }
  267. /* Tabs组件样式 */
  268. .semi-tabs-content {
  269. padding: 0 !important;
  270. height: calc(100% - 40px) !important;
  271. flex: 1 !important;
  272. }
  273. .semi-tabs-content .semi-tabs-pane {
  274. height: 100% !important;
  275. overflow: hidden !important;
  276. }
  277. .semi-tabs-content .semi-tabs-pane>div {
  278. height: 100% !important;
  279. }
  280. /* 表格样式 */
  281. .tableShow {
  282. display: revert;
  283. }
  284. .tableHiddle {
  285. display: none !important;
  286. }
  287. /* 页脚样式 */
  288. .custom-footer {
  289. font-size: 1.1em;
  290. }
  291. /* 卡片内容容器通用样式 */
  292. .card-content-container {
  293. position: relative;
  294. }
  295. .card-content-fade-indicator {
  296. position: absolute;
  297. bottom: 0;
  298. left: 0;
  299. right: 0;
  300. height: 30px;
  301. background: linear-gradient(transparent, var(--semi-color-bg-1));
  302. pointer-events: none;
  303. z-index: 1;
  304. opacity: 0;
  305. transition: opacity 0.3s ease;
  306. }
  307. /* ==================== 调试面板特定样式 ==================== */
  308. .debug-panel .semi-tabs {
  309. height: 100% !important;
  310. display: flex !important;
  311. flex-direction: column !important;
  312. }
  313. .debug-panel .semi-tabs-bar {
  314. flex-shrink: 0 !important;
  315. }
  316. .debug-panel .semi-tabs-content {
  317. flex: 1 !important;
  318. overflow: hidden !important;
  319. }
  320. /* ==================== 滚动条样式统一管理 ==================== */
  321. /* 表格滚动条样式 */
  322. .semi-table-body::-webkit-scrollbar {
  323. width: 6px;
  324. height: 6px;
  325. }
  326. .semi-table-body::-webkit-scrollbar-thumb {
  327. background: rgba(var(--semi-grey-2), 0.3);
  328. border-radius: 2px;
  329. }
  330. .semi-table-body::-webkit-scrollbar-thumb:hover {
  331. background: rgba(var(--semi-grey-2), 0.5);
  332. }
  333. .semi-table-body::-webkit-scrollbar-track {
  334. background: transparent;
  335. }
  336. /* 侧边抽屉滚动条样式 */
  337. .semi-sidesheet-body::-webkit-scrollbar {
  338. width: 6px;
  339. height: 6px;
  340. }
  341. .semi-sidesheet-body::-webkit-scrollbar-thumb {
  342. background: rgba(var(--semi-grey-2), 0.3);
  343. border-radius: 2px;
  344. }
  345. .semi-sidesheet-body::-webkit-scrollbar-thumb:hover {
  346. background: rgba(var(--semi-grey-2), 0.5);
  347. }
  348. .semi-sidesheet-body::-webkit-scrollbar-track {
  349. background: transparent;
  350. }
  351. /* 隐藏内容区域滚动条 */
  352. .pricing-scroll-hide,
  353. .model-test-scroll,
  354. .card-content-scroll,
  355. .model-settings-scroll,
  356. .thinking-content-scroll,
  357. .custom-request-textarea .semi-input,
  358. .custom-request-textarea textarea,
  359. .notice-content-scroll {
  360. -ms-overflow-style: none;
  361. scrollbar-width: none;
  362. }
  363. .pricing-scroll-hide::-webkit-scrollbar,
  364. .model-test-scroll::-webkit-scrollbar,
  365. .card-content-scroll::-webkit-scrollbar,
  366. .model-settings-scroll::-webkit-scrollbar,
  367. .thinking-content-scroll::-webkit-scrollbar,
  368. .custom-request-textarea .semi-input::-webkit-scrollbar,
  369. .custom-request-textarea textarea::-webkit-scrollbar,
  370. .notice-content-scroll::-webkit-scrollbar {
  371. display: none;
  372. }
  373. /* 图片列表滚动条样式 */
  374. .image-list-scroll::-webkit-scrollbar {
  375. width: 6px;
  376. height: 6px;
  377. }
  378. .image-list-scroll::-webkit-scrollbar-thumb {
  379. background: var(--semi-color-tertiary-light-default);
  380. border-radius: 3px;
  381. }
  382. .image-list-scroll::-webkit-scrollbar-thumb:hover {
  383. background: var(--semi-color-tertiary);
  384. }
  385. .image-list-scroll::-webkit-scrollbar-track {
  386. background: transparent;
  387. }
  388. /* ==================== 同步倍率 - 渠道选择器 ==================== */
  389. .components-transfer-source-item,
  390. .components-transfer-selected-item {
  391. display: flex;
  392. align-items: center;
  393. padding: 8px;
  394. }
  395. .semi-transfer-left-list,
  396. .semi-transfer-right-list {
  397. -ms-overflow-style: none;
  398. scrollbar-width: none;
  399. }
  400. .semi-transfer-left-list::-webkit-scrollbar,
  401. .semi-transfer-right-list::-webkit-scrollbar {
  402. display: none;
  403. }
  404. .components-transfer-source-item .semi-checkbox,
  405. .components-transfer-selected-item .semi-checkbox {
  406. display: flex;
  407. align-items: center;
  408. width: 100%;
  409. }
  410. .components-transfer-source-item .semi-avatar,
  411. .components-transfer-selected-item .semi-avatar {
  412. margin-right: 12px;
  413. flex-shrink: 0;
  414. }
  415. .components-transfer-source-item .info,
  416. .components-transfer-selected-item .info {
  417. flex: 1;
  418. overflow: hidden;
  419. display: flex;
  420. flex-direction: column;
  421. justify-content: center;
  422. }
  423. .components-transfer-source-item .name,
  424. .components-transfer-selected-item .name {
  425. font-weight: 500;
  426. white-space: nowrap;
  427. overflow: hidden;
  428. text-overflow: ellipsis;
  429. }
  430. .components-transfer-source-item .email,
  431. .components-transfer-selected-item .email {
  432. font-size: 12px;
  433. color: var(--semi-color-text-2);
  434. display: flex;
  435. align-items: center;
  436. }
  437. .components-transfer-selected-item .semi-icon-close {
  438. margin-left: 8px;
  439. cursor: pointer;
  440. color: var(--semi-color-text-2);
  441. }
  442. .components-transfer-selected-item .semi-icon-close:hover {
  443. color: var(--semi-color-text-0);
  444. }
  445. /* ==================== 未读通知闪光效果 ==================== */
  446. @keyframes sweep-shine {
  447. 0% {
  448. background-position: 200% 0;
  449. }
  450. 100% {
  451. background-position: -200% 0;
  452. }
  453. }
  454. .shine-text {
  455. background: linear-gradient(90deg, currentColor 0%, currentColor 40%, rgba(255, 255, 255, 0.9) 50%, currentColor 60%, currentColor 100%);
  456. background-size: 200% 100%;
  457. -webkit-background-clip: text;
  458. background-clip: text;
  459. -webkit-text-fill-color: transparent;
  460. animation: sweep-shine 4s linear infinite;
  461. }
  462. .dark .shine-text {
  463. background: linear-gradient(90deg, currentColor 0%, currentColor 40%, #facc15 50%, currentColor 60%, currentColor 100%);
  464. background-size: 200% 100%;
  465. -webkit-background-clip: text;
  466. background-clip: text;
  467. -webkit-text-fill-color: transparent;
  468. }
  469. /* ==================== ScrollList 定制样式 ==================== */
  470. .semi-scrolllist,
  471. .semi-scrolllist * {
  472. -ms-overflow-style: none;
  473. /* IE, Edge */
  474. scrollbar-width: none;
  475. /* Firefox */
  476. background: transparent !important;
  477. }
  478. .semi-scrolllist::-webkit-scrollbar,
  479. .semi-scrolllist *::-webkit-scrollbar {
  480. width: 0 !important;
  481. height: 0 !important;
  482. display: none !important;
  483. }
  484. .semi-scrolllist-body {
  485. padding: 1px !important;
  486. }
  487. .semi-scrolllist-list-outer {
  488. padding-right: 0 !important;
  489. }
  490. /* ==================== Banner 背景模糊球 ==================== */
  491. .blur-ball {
  492. position: absolute;
  493. width: 360px;
  494. height: 360px;
  495. border-radius: 50%;
  496. filter: blur(120px);
  497. pointer-events: none;
  498. z-index: -1;
  499. }
  500. .blur-ball-indigo {
  501. background: #6366f1;
  502. /* indigo-500 */
  503. top: 40px;
  504. left: 50%;
  505. transform: translateX(-50%);
  506. opacity: 0.5;
  507. }
  508. .blur-ball-teal {
  509. background: #14b8a6;
  510. /* teal-400 */
  511. top: 200px;
  512. left: 30%;
  513. opacity: 0.4;
  514. }
  515. /* 浅色主题下让模糊球更柔和 */
  516. html:not(.dark) .blur-ball-indigo {
  517. opacity: 0.25;
  518. }
  519. html:not(.dark) .blur-ball-teal {
  520. opacity: 0.2;
  521. }
  522. /* ==================== 卡片马卡龙模糊球(类封装) ==================== */
  523. /* 使用方式:给容器加上 with-pastel-balls 类即可,无需在 JSX 中插入额外节点 */
  524. .with-pastel-balls {
  525. position: relative;
  526. overflow: hidden;
  527. /* 默认变量(明亮模式) */
  528. --pb1: #ffd1dc;
  529. /* 粉 */
  530. --pb2: #e5d4ff;
  531. /* 薰衣草 */
  532. --pb3: #d1fff6;
  533. /* 薄荷 */
  534. --pb4: #ffe5d9;
  535. /* 桃 */
  536. --pb-opacity: 0.55;
  537. --pb-blur: 60px;
  538. }
  539. .with-pastel-balls::before {
  540. content: '';
  541. position: absolute;
  542. inset: 0;
  543. pointer-events: none;
  544. z-index: 0;
  545. background:
  546. radial-gradient(circle at -5% -10%, var(--pb1) 0%, transparent 60%),
  547. radial-gradient(circle at 105% -10%, var(--pb2) 0%, transparent 55%),
  548. radial-gradient(circle at 5% 110%, var(--pb3) 0%, transparent 55%),
  549. radial-gradient(circle at 105% 110%, var(--pb4) 0%, transparent 50%);
  550. filter: blur(var(--pb-blur));
  551. opacity: var(--pb-opacity);
  552. transform: translateZ(0);
  553. }
  554. /* 暗黑模式下更柔和的色彩和透明度 */
  555. html.dark .with-pastel-balls {
  556. /* 使用与明亮模式一致的“刚才那组”马卡龙色,但整体更柔和 */
  557. --pb1: #ffd1dc;
  558. /* 粉 */
  559. --pb2: #e5d4ff;
  560. /* 薰衣草 */
  561. --pb3: #d1fff6;
  562. /* 薄荷 */
  563. --pb4: #ffe5d9;
  564. /* 桃 */
  565. --pb-opacity: 0.36;
  566. --pb-blur: 65px;
  567. }
  568. /* 暗黑模式下用更柔和的混合模式避免突兀的高亮 */
  569. html.dark .with-pastel-balls::before {
  570. mix-blend-mode: screen;
  571. }
  572. /* ==================== 表格卡片滚动设置 ==================== */
  573. .table-scroll-card {
  574. display: flex;
  575. flex-direction: column;
  576. height: calc(100vh - 110px);
  577. max-height: calc(100vh - 110px);
  578. }
  579. .table-scroll-card .semi-card-body {
  580. flex: 1 1 auto;
  581. overflow-y: auto;
  582. -ms-overflow-style: none;
  583. scrollbar-width: none;
  584. }
  585. .table-scroll-card .semi-card-body::-webkit-scrollbar {
  586. display: none;
  587. }
  588. @media (max-width: 767px) {
  589. .table-scroll-card {
  590. height: calc(100vh - 77px);
  591. max-height: calc(100vh - 77px);
  592. }
  593. }
  594. /* ==================== 模型定价页面布局 ==================== */
  595. .pricing-layout {
  596. height: calc(100vh - 60px);
  597. overflow: hidden;
  598. margin-top: 60px;
  599. }
  600. .pricing-sidebar {
  601. min-width: 460px;
  602. max-width: 460px;
  603. height: calc(100vh - 60px);
  604. background-color: var(--semi-color-bg-0);
  605. overflow: auto;
  606. }
  607. .pricing-content {
  608. height: calc(100vh - 60px);
  609. background-color: var(--semi-color-bg-0);
  610. display: flex;
  611. flex-direction: column;
  612. }
  613. .pricing-pagination-divider {
  614. border-color: var(--semi-color-border);
  615. }
  616. .pricing-content-mobile {
  617. height: 100%;
  618. display: flex;
  619. flex-direction: column;
  620. overflow: auto;
  621. }
  622. .pricing-search-header {
  623. padding: 1rem;
  624. background-color: var(--semi-color-bg-0);
  625. flex-shrink: 0;
  626. position: sticky;
  627. top: 0;
  628. z-index: 5;
  629. }
  630. .pricing-view-container {
  631. flex: 1;
  632. overflow: auto;
  633. }
  634. .pricing-view-container-mobile {
  635. flex: 1;
  636. overflow: auto;
  637. min-height: 0;
  638. }