main.css 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  1. .inter-gc {
  2. font-family: "Inter", sans-serif;
  3. font-optical-sizing: auto;
  4. font-weight: 400;
  5. font-style: normal;
  6. }
  7. :root {
  8. --primary: #5468FF;
  9. --primary-light: #8590FF;
  10. --primary-dark: #3A4DB2;
  11. --student: #E9EFFF;
  12. --teacher: #EBFAEF;
  13. --teacher-accent: #4CAF50;
  14. --text-dark: #1A2138;
  15. --text-light: #5F6A8A;
  16. --background: #F9FAFC;
  17. --panel: #FFFFFF;
  18. --border: #E1E5EE;
  19. --shadow: 0 4px 12px rgba(84, 104, 255, 0.10);
  20. --hover-shadow: 0 6px 16px rgba(84, 104, 255, 0.18);
  21. --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  22. }
  23. /*
  24. * {
  25. margin: 0;
  26. padding: 0;
  27. box-sizing: border-box;
  28. font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  29. }
  30. body {
  31. background-color: var(--background);
  32. color: var(--text-dark);
  33. width: 100%;
  34. height: 100vh;
  35. display: flex;
  36. align-items: center;
  37. justify-content: center;
  38. overflow: hidden;
  39. }
  40. */
  41. .chat-container {
  42. /* width: 700px; */
  43. height: 900px;
  44. display: flex;
  45. flex-direction: column;
  46. border-radius: 16px;
  47. background-color: var(--panel);
  48. box-shadow: var(--shadow);
  49. overflow: hidden;
  50. position: relative;
  51. }
  52. .header {
  53. padding: 16px 24px;
  54. background-color: var(--panel);
  55. border-bottom: 1px solid var(--border);
  56. display: flex;
  57. align-items: center;
  58. justify-content: space-between;
  59. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  60. position: relative;
  61. z-index: 10;
  62. }
  63. .header-left {
  64. display: flex;
  65. align-items: center;
  66. gap: 12px;
  67. }
  68. .course-info {
  69. display: flex;
  70. flex-direction: column;
  71. }
  72. .course-title {
  73. font-weight: 600;
  74. font-size: 16px;
  75. color: var(--text-dark);
  76. }
  77. .course-participants {
  78. font-size: 12px;
  79. color: var(--text-light);
  80. }
  81. .header-actions {
  82. display: flex;
  83. gap: 12px;
  84. }
  85. .icon-button {
  86. width: 36px;
  87. height: 36px;
  88. border-radius: 50%;
  89. border: none;
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. background-color: var(--background);
  94. color: var(--text-light);
  95. cursor: pointer;
  96. transition: var(--transition);
  97. }
  98. .icon-button:hover {
  99. background-color: var(--primary-light);
  100. color: white;
  101. transform: translateY(-2px);
  102. box-shadow: var(--hover-shadow);
  103. }
  104. .icon-button svg {
  105. width: 18px;
  106. height: 18px;
  107. }
  108. .tabs {
  109. display: flex;
  110. padding: 0 20px;
  111. background-color: var(--panel);
  112. border-bottom: 1px solid var(--border);
  113. position: relative;
  114. z-index: 5;
  115. }
  116. .tab {
  117. padding: 12px 16px;
  118. font-size: 14px;
  119. font-weight: 500;
  120. color: var(--text-light);
  121. cursor: pointer;
  122. border-bottom: 2px solid transparent;
  123. transition: var(--transition);
  124. position: relative;
  125. }
  126. .tab.active {
  127. color: var(--primary);
  128. border-bottom: 2px solid var(--primary);
  129. }
  130. .tab:hover:not(.active) {
  131. color: var(--text-dark);
  132. }
  133. .badge {
  134. position: absolute;
  135. top: 8px;
  136. right: 8px;
  137. background-color: var(--primary);
  138. color: white;
  139. font-size: 10px;
  140. font-weight: 500;
  141. padding: 1px 6px;
  142. border-radius: 10px;
  143. }
  144. .chat-content {
  145. flex: 1;
  146. overflow-y: auto;
  147. padding: 24px;
  148. display: flex;
  149. flex-direction: column;
  150. gap: 16px;
  151. scroll-behavior: smooth;
  152. }
  153. .chat-content::-webkit-scrollbar {
  154. width: 6px;
  155. }
  156. .chat-content::-webkit-scrollbar-track {
  157. background: transparent;
  158. }
  159. .chat-content::-webkit-scrollbar-thumb {
  160. background-color: var(--border);
  161. border-radius: 6px;
  162. }
  163. .message {
  164. display: flex;
  165. flex-direction: column;
  166. max-width: 80%;
  167. animation: fadeIn 0.3s ease-out;
  168. }
  169. @keyframes fadeIn {
  170. from {
  171. opacity: 0;
  172. transform: translateY(10px);
  173. }
  174. to {
  175. opacity: 1;
  176. transform: translateY(0);
  177. }
  178. }
  179. .message.student {
  180. align-self: flex-end;
  181. }
  182. .message.teacher {
  183. align-self: flex-start;
  184. }
  185. .message-header {
  186. display: flex;
  187. align-items: center;
  188. gap: 8px;
  189. margin-bottom: 4px;
  190. }
  191. .avatar {
  192. width: 28px;
  193. height: 28px;
  194. border-radius: 50%;
  195. display: flex;
  196. align-items: center;
  197. justify-content: center;
  198. font-weight: 600;
  199. font-size: 12px;
  200. color: white;
  201. flex-shrink: 0;
  202. }
  203. .student .avatar {
  204. background-color: var(--primary);
  205. }
  206. .teacher .avatar {
  207. background-color: var(--teacher-accent);
  208. }
  209. .sender-name {
  210. font-size: 13px;
  211. font-weight: 600;
  212. }
  213. .student .sender-name {
  214. color: var(--primary-dark);
  215. }
  216. .teacher .sender-name {
  217. color: var(--teacher-accent);
  218. }
  219. .timestamp {
  220. font-size: 11px;
  221. color: var(--text-light);
  222. margin-left: auto;
  223. }
  224. .message-bubble {
  225. padding: 12px 16px;
  226. border-radius: 16px;
  227. font-size: 14px;
  228. line-height: 1.5;
  229. position: relative;
  230. transition: var(--transition);
  231. }
  232. .student .message-bubble {
  233. background-color: var(--student);
  234. border-top-right-radius: 4px;
  235. }
  236. .teacher .message-bubble {
  237. background-color: var(--teacher);
  238. border-top-left-radius: 4px;
  239. }
  240. .message-bubble:hover {
  241. transform: translateY(-2px);
  242. box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  243. }
  244. .message-actions {
  245. display: flex;
  246. gap: 8px;
  247. margin-top: 6px;
  248. justify-content: flex-end;
  249. opacity: 0;
  250. transition: var(--transition);
  251. }
  252. .message:hover .message-actions {
  253. opacity: 1;
  254. }
  255. .action-button {
  256. background: none;
  257. border: none;
  258. font-size: 12px;
  259. color: var(--text-light);
  260. cursor: pointer;
  261. padding: 2px 6px;
  262. border-radius: 4px;
  263. transition: var(--transition);
  264. }
  265. .action-button:hover {
  266. background-color: rgba(84, 104, 255, 0.1);
  267. color: var(--primary);
  268. }
  269. .embed-content {
  270. margin-top: 10px;
  271. border-radius: 8px;
  272. overflow: hidden;
  273. border: 1px solid var(--border);
  274. background-color: white;
  275. transition: var(--transition);
  276. }
  277. .embed-content:hover {
  278. box-shadow: var(--shadow);
  279. transform: translateY(-2px);
  280. }
  281. .embed-header {
  282. padding: 10px 12px;
  283. background-color: rgba(84, 104, 255, 0.05);
  284. display: flex;
  285. align-items: center;
  286. gap: 8px;
  287. border-bottom: 1px solid var(--border);
  288. }
  289. .embed-icon {
  290. width: 20px;
  291. height: 20px;
  292. display: flex;
  293. align-items: center;
  294. justify-content: center;
  295. color: var(--primary);
  296. }
  297. .embed-title {
  298. font-size: 12px;
  299. font-weight: 500;
  300. flex: 1;
  301. }
  302. .embed-body {
  303. padding: 12px;
  304. }
  305. .embed-image {
  306. width: 100%;
  307. border-radius: 6px;
  308. height: auto;
  309. object-fit: cover;
  310. }
  311. .embed-text {
  312. font-size: 13px;
  313. color: var(--text-light);
  314. margin-top: 8px;
  315. line-height: 1.4;
  316. }
  317. .embed-footer {
  318. padding: 8px 12px;
  319. border-top: 1px solid var(--border);
  320. display: flex;
  321. align-items: center;
  322. justify-content: space-between;
  323. }
  324. .embed-button {
  325. background-color: var(--primary-light);
  326. color: white;
  327. font-size: 12px;
  328. font-weight: 500;
  329. padding: 6px 12px;
  330. border-radius: 6px;
  331. border: none;
  332. cursor: pointer;
  333. transition: var(--transition);
  334. }
  335. .embed-button:hover {
  336. background-color: var(--primary);
  337. transform: translateY(-1px);
  338. box-shadow: 0 3px 8px rgba(84, 104, 255, 0.2);
  339. }
  340. .date-divider {
  341. display: flex;
  342. align-items: center;
  343. gap: 12px;
  344. margin: 16px 0;
  345. opacity: 0.7;
  346. }
  347. .divider-line {
  348. flex: 1;
  349. height: 1px;
  350. background-color: var(--border);
  351. }
  352. .divider-text {
  353. font-size: 12px;
  354. color: var(--text-light);
  355. white-space: nowrap;
  356. }
  357. .typing-indicator {
  358. display: flex;
  359. align-items: center;
  360. gap: 4px;
  361. font-size: 12px;
  362. color: var(--text-light);
  363. padding: 8px 12px;
  364. margin-bottom: 8px;
  365. }
  366. .typing-dot {
  367. width: 5px;
  368. height: 5px;
  369. background-color: var(--text-light);
  370. border-radius: 50%;
  371. animation: typingAnimation 1.4s infinite ease-in-out;
  372. }
  373. .typing-dot:nth-child(1) {
  374. animation-delay: 0s;
  375. }
  376. .typing-dot:nth-child(2) {
  377. animation-delay: 0.2s;
  378. }
  379. .typing-dot:nth-child(3) {
  380. animation-delay: 0.4s;
  381. }
  382. @keyframes typingAnimation {
  383. 0%,
  384. 100% {
  385. transform: translateY(0);
  386. opacity: 0.5;
  387. }
  388. 50% {
  389. transform: translateY(-4px);
  390. opacity: 1;
  391. }
  392. }
  393. .input-area {
  394. padding: 16px 24px 24px;
  395. background-color: var(--panel);
  396. border-top: 1px solid var(--border);
  397. z-index: 10;
  398. }
  399. .toolbar {
  400. display: flex;
  401. align-items: center;
  402. gap: 8px;
  403. margin-bottom: 12px;
  404. }
  405. .tool-button {
  406. background: none;
  407. border: none;
  408. cursor: pointer;
  409. width: 32px;
  410. height: 32px;
  411. border-radius: 4px;
  412. display: flex;
  413. align-items: center;
  414. justify-content: center;
  415. color: var(--text-light);
  416. transition: var(--transition);
  417. }
  418. .tool-button:hover {
  419. background-color: rgba(84, 104, 255, 0.1);
  420. color: var(--primary);
  421. }
  422. .tool-button svg {
  423. width: 18px;
  424. height: 18px;
  425. }
  426. .input-container {
  427. display: flex;
  428. gap: 12px;
  429. align-items: center;
  430. }
  431. .message-input {
  432. flex: 1;
  433. padding: 14px 16px;
  434. border-radius: 10px;
  435. border: 1px solid var(--border);
  436. background-color: var(--background);
  437. font-size: 14px;
  438. resize: none;
  439. transition: var(--transition);
  440. height: 50px;
  441. outline: none;
  442. }
  443. .message-input:focus {
  444. border-color: var(--primary-light);
  445. box-shadow: 0 0 0 2px rgba(84, 104, 255, 0.1);
  446. }
  447. .send-button {
  448. background-color: var(--primary);
  449. color: white;
  450. border: none;
  451. width: 50px;
  452. height: 50px;
  453. border-radius: 12px;
  454. cursor: pointer;
  455. display: flex;
  456. align-items: center;
  457. justify-content: center;
  458. transition: var(--transition);
  459. }
  460. .send-button:hover {
  461. background-color: var(--primary-dark);
  462. transform: translateY(-2px);
  463. box-shadow: 0 4px 12px rgba(84, 104, 255, 0.2);
  464. }
  465. .poll-container {
  466. padding: 12px;
  467. background-color: rgba(84, 104, 255, 0.05);
  468. border-radius: 8px;
  469. margin-top: 8px;
  470. }
  471. .poll-question {
  472. font-weight: 500;
  473. margin-bottom: 10px;
  474. font-size: 13px;
  475. }
  476. .poll-options {
  477. display: flex;
  478. flex-direction: column;
  479. gap: 8px;
  480. }
  481. .poll-option {
  482. background-color: white;
  483. border: 1px solid var(--border);
  484. padding: 8px 12px;
  485. border-radius: 6px;
  486. font-size: 13px;
  487. position: relative;
  488. cursor: pointer;
  489. transition: var(--transition);
  490. display: flex;
  491. justify-content: space-between;
  492. }
  493. .poll-option:hover {
  494. border-color: var(--primary-light);
  495. background-color: rgba(84, 104, 255, 0.03);
  496. }
  497. .poll-option.selected {
  498. border-color: var(--primary);
  499. background-color: rgba(84, 104, 255, 0.1);
  500. }
  501. .poll-option.selected::before {
  502. content: '';
  503. position: absolute;
  504. left: 0;
  505. top: 0;
  506. height: 100%;
  507. width: 3px;
  508. background-color: var(--primary);
  509. border-top-left-radius: 6px;
  510. border-bottom-left-radius: 6px;
  511. }
  512. .poll-percent {
  513. font-size: 12px;
  514. font-weight: 500;
  515. color: var(--primary);
  516. }
  517. .poll-votes {
  518. margin-top: 10px;
  519. font-size: 12px;
  520. color: var(--text-light);
  521. text-align: right;
  522. }
  523. .resource-link {
  524. display: flex;
  525. align-items: center;
  526. gap: 8px;
  527. padding: 10px;
  528. background-color: var(--background);
  529. border-radius: 6px;
  530. cursor: pointer;
  531. transition: var(--transition);
  532. text-decoration: none;
  533. color: var(--text-dark);
  534. border: 1px solid var(--border);
  535. }
  536. .resource-link:hover {
  537. background-color: rgba(84, 104, 255, 0.05);
  538. border-color: var(--primary-light);
  539. transform: translateY(-2px);
  540. box-shadow: var(--shadow);
  541. }
  542. .resource-icon {
  543. width: 36px;
  544. height: 36px;
  545. background-color: rgba(84, 104, 255, 0.1);
  546. border-radius: 6px;
  547. display: flex;
  548. align-items: center;
  549. justify-content: center;
  550. color: var(--primary);
  551. }
  552. .resource-info {
  553. flex: 1;
  554. }
  555. .resource-title {
  556. font-size: 13px;
  557. font-weight: 500;
  558. }
  559. .resource-desc {
  560. font-size: 11px;
  561. color: var(--text-light);
  562. }
  563. /* Responsive Styles */
  564. @media (max-width: 700px) {
  565. .chat-container {
  566. width: 100%;
  567. height: 100%;
  568. border-radius: 0;
  569. }
  570. .message {
  571. max-width: 90%;
  572. }
  573. .header-actions {
  574. gap: 8px;
  575. }
  576. .icon-button {
  577. width: 32px;
  578. height: 32px;
  579. }
  580. .tabs {
  581. padding: 0 10px;
  582. }
  583. .tab {
  584. padding: 12px 10px;
  585. font-size: 13px;
  586. }
  587. }
  588. /* Animation for new messages */
  589. @keyframes popIn {
  590. 0% {
  591. transform: scale(0.8);
  592. opacity: 0;
  593. }
  594. 50% {
  595. transform: scale(1.05);
  596. }
  597. 100% {
  598. transform: scale(1);
  599. opacity: 1;
  600. }
  601. }
  602. .pop-in {
  603. animation: popIn 0.3s forwards;
  604. }
  605. /* Resource expansion animation */
  606. .resource-expanded {
  607. max-height: 0;
  608. overflow: hidden;
  609. transition: max-height 0.3s ease;
  610. }
  611. .resource-expanded.active {
  612. max-height: 200px;
  613. }
  614. /* Tooltip Styles */
  615. .tooltip {
  616. position: relative;
  617. }
  618. .tooltip::after {
  619. content: attr(data-tooltip);
  620. position: absolute;
  621. bottom: 130%;
  622. left: 50%;
  623. transform: translateX(-50%);
  624. padding: 5px 10px;
  625. border-radius: 4px;
  626. background-color: rgba(26, 33, 56, 0.9);
  627. color: white;
  628. font-size: 11px;
  629. white-space: nowrap;
  630. opacity: 0;
  631. visibility: hidden;
  632. transition: all 0.2s ease;
  633. pointer-events: none;
  634. z-index: 100;
  635. }
  636. .tooltip::before {
  637. content: '';
  638. position: absolute;
  639. bottom: 120%;
  640. left: 50%;
  641. transform: translateX(-50%);
  642. border-width: 4px;
  643. border-style: solid;
  644. border-color: rgba(26, 33, 56, 0.9) transparent transparent transparent;
  645. opacity: 0;
  646. visibility: hidden;
  647. transition: all 0.2s ease;
  648. pointer-events: none;
  649. z-index: 100;
  650. }
  651. .tooltip:hover::after,
  652. .tooltip:hover::before {
  653. opacity: 1;
  654. visibility: visible;
  655. }
  656. /* Reaction Styles */
  657. .reactions {
  658. display: flex;
  659. flex-wrap: wrap;
  660. gap: 4px;
  661. margin-top: 8px;
  662. }
  663. .reaction {
  664. font-size: 12px;
  665. padding: 2px 6px 2px 4px;
  666. background-color: rgba(84, 104, 255, 0.06);
  667. border-radius: 12px;
  668. display: flex;
  669. align-items: center;
  670. gap: 3px;
  671. cursor: pointer;
  672. transition: var(--transition);
  673. }
  674. .reaction:hover {
  675. background-color: rgba(84, 104, 255, 0.15);
  676. }
  677. .reaction.active {
  678. background-color: rgba(84, 104, 255, 0.2);
  679. font-weight: 500;
  680. }
  681. @media (min-width: 1400px) {
  682. .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
  683. max-width: 1750px;
  684. }
  685. }
  686. .table th {
  687. font-size: smaller;
  688. background-color: #C3CCD4;
  689. }
  690. .btn-primary {
  691. --cui-btn-bg: #72889B;
  692. --cui-btn-border-color: #72889B;
  693. --cui-btn-hover-bg: #B1BCC7;
  694. --cui-btn-hover-border-color: #B1BCC7;
  695. }
  696. a {
  697. color: #52616f;
  698. }
  699. .footer {
  700. --cui-footer-bg: #B1BCC7;
  701. }
  702. .table thead {
  703. position: sticky;
  704. top: 40px;
  705. background: white;
  706. }
  707. .chat-input {
  708. padding: 15px 20px;
  709. border-top: 1px solid var(--border);
  710. display: flex;
  711. align-items: center;
  712. background-color: white;
  713. position: relative;
  714. z-index: 10;
  715. }
  716. .input-container {
  717. flex: 1;
  718. display: flex;
  719. align-items: center;
  720. background-color: var(--secondary);
  721. border-radius: 20px;
  722. padding: 0 15px;
  723. position: relative;
  724. }
  725. .input-container input {
  726. flex: 1;
  727. border: none;
  728. outline: none;
  729. height: 40px;
  730. background-color: transparent;
  731. padding: 0 10px;
  732. font-size: 15px;
  733. }
  734. .input-actions {
  735. display: flex;
  736. gap: 10px;
  737. }
  738. .input-btn {
  739. background: none;
  740. border: none;
  741. color: #888;
  742. cursor: pointer;
  743. transition: var(--transition);
  744. font-size: 18px;
  745. }
  746. .input-btn:hover {
  747. color: var(--primary);
  748. }
  749. .send-btn {
  750. background-color: var(--primary);
  751. color: white;
  752. width: 40px;
  753. height: 40px;
  754. border-radius: 50%;
  755. border: none;
  756. cursor: pointer;
  757. margin-left: 10px;
  758. transition: var(--transition);
  759. display: flex;
  760. align-items: center;
  761. justify-content: center;
  762. }
  763. .send-btn:hover {
  764. background-color: var(--primary-light);
  765. transform: scale(1.05);
  766. }
  767. .modal {
  768. --cui-modal-width: 80%;
  769. }