| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783 |
- :root {
- --primary: #5468FF;
- --primary-light: #8590FF;
- --primary-dark: #3A4DB2;
- --student: #E9EFFF;
- --teacher: #EBFAEF;
- --teacher-accent: #4CAF50;
- --text-dark: #1A2138;
- --text-light: #5F6A8A;
- --background: #F9FAFC;
- --panel: #FFFFFF;
- --border: #E1E5EE;
- --shadow: 0 4px 12px rgba(84, 104, 255, 0.10);
- --hover-shadow: 0 6px 16px rgba(84, 104, 255, 0.18);
- --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
- }
- /*
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
- }
- body {
- background-color: var(--background);
- color: var(--text-dark);
- width: 100%;
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- }
- */
- .chat-container {
- width: 700px;
- height: 700px;
- display: flex;
- flex-direction: column;
- border-radius: 16px;
- background-color: var(--panel);
- box-shadow: var(--shadow);
- overflow: hidden;
- position: relative;
- }
- .header {
- padding: 16px 24px;
- background-color: var(--panel);
- border-bottom: 1px solid var(--border);
- display: flex;
- align-items: center;
- justify-content: space-between;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
- position: relative;
- z-index: 10;
- }
- .header-left {
- display: flex;
- align-items: center;
- gap: 12px;
- }
- .course-info {
- display: flex;
- flex-direction: column;
- }
- .course-title {
- font-weight: 600;
- font-size: 16px;
- color: var(--text-dark);
- }
- .course-participants {
- font-size: 12px;
- color: var(--text-light);
- }
- .header-actions {
- display: flex;
- gap: 12px;
- }
- .icon-button {
- width: 36px;
- height: 36px;
- border-radius: 50%;
- border: none;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: var(--background);
- color: var(--text-light);
- cursor: pointer;
- transition: var(--transition);
- }
- .icon-button:hover {
- background-color: var(--primary-light);
- color: white;
- transform: translateY(-2px);
- box-shadow: var(--hover-shadow);
- }
- .icon-button svg {
- width: 18px;
- height: 18px;
- }
- .tabs {
- display: flex;
- padding: 0 20px;
- background-color: var(--panel);
- border-bottom: 1px solid var(--border);
- position: relative;
- z-index: 5;
- }
- .tab {
- padding: 12px 16px;
- font-size: 14px;
- font-weight: 500;
- color: var(--text-light);
- cursor: pointer;
- border-bottom: 2px solid transparent;
- transition: var(--transition);
- position: relative;
- }
- .tab.active {
- color: var(--primary);
- border-bottom: 2px solid var(--primary);
- }
- .tab:hover:not(.active) {
- color: var(--text-dark);
- }
- .badge {
- position: absolute;
- top: 8px;
- right: 8px;
- background-color: var(--primary);
- color: white;
- font-size: 10px;
- font-weight: 500;
- padding: 1px 6px;
- border-radius: 10px;
- }
- .chat-content {
- flex: 1;
- overflow-y: auto;
- padding: 24px;
- display: flex;
- flex-direction: column;
- gap: 16px;
- scroll-behavior: smooth;
- }
- .chat-content::-webkit-scrollbar {
- width: 6px;
- }
- .chat-content::-webkit-scrollbar-track {
- background: transparent;
- }
- .chat-content::-webkit-scrollbar-thumb {
- background-color: var(--border);
- border-radius: 6px;
- }
- .message {
- display: flex;
- flex-direction: column;
- max-width: 80%;
- animation: fadeIn 0.3s ease-out;
- }
- @keyframes fadeIn {
- from {
- opacity: 0;
- transform: translateY(10px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- .message.student {
- align-self: flex-end;
- }
- .message.teacher {
- align-self: flex-start;
- }
- .message-header {
- display: flex;
- align-items: center;
- gap: 8px;
- margin-bottom: 4px;
- }
- .avatar {
- width: 28px;
- height: 28px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 600;
- font-size: 12px;
- color: white;
- flex-shrink: 0;
- }
- .student .avatar {
- background-color: var(--primary);
- }
- .teacher .avatar {
- background-color: var(--teacher-accent);
- }
- .sender-name {
- font-size: 13px;
- font-weight: 600;
- }
- .student .sender-name {
- color: var(--primary-dark);
- }
- .teacher .sender-name {
- color: var(--teacher-accent);
- }
- .timestamp {
- font-size: 11px;
- color: var(--text-light);
- margin-left: auto;
- }
- .message-bubble {
- padding: 12px 16px;
- border-radius: 16px;
- font-size: 14px;
- line-height: 1.5;
- position: relative;
- transition: var(--transition);
- }
- .student .message-bubble {
- background-color: var(--student);
- border-top-right-radius: 4px;
- }
- .teacher .message-bubble {
- background-color: var(--teacher);
- border-top-left-radius: 4px;
- }
- .message-bubble:hover {
- transform: translateY(-2px);
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
- }
- .message-actions {
- display: flex;
- gap: 8px;
- margin-top: 6px;
- justify-content: flex-end;
- opacity: 0;
- transition: var(--transition);
- }
- .message:hover .message-actions {
- opacity: 1;
- }
- .action-button {
- background: none;
- border: none;
- font-size: 12px;
- color: var(--text-light);
- cursor: pointer;
- padding: 2px 6px;
- border-radius: 4px;
- transition: var(--transition);
- }
- .action-button:hover {
- background-color: rgba(84, 104, 255, 0.1);
- color: var(--primary);
- }
- .embed-content {
- margin-top: 10px;
- border-radius: 8px;
- overflow: hidden;
- border: 1px solid var(--border);
- background-color: white;
- transition: var(--transition);
- }
- .embed-content:hover {
- box-shadow: var(--shadow);
- transform: translateY(-2px);
- }
- .embed-header {
- padding: 10px 12px;
- background-color: rgba(84, 104, 255, 0.05);
- display: flex;
- align-items: center;
- gap: 8px;
- border-bottom: 1px solid var(--border);
- }
- .embed-icon {
- width: 20px;
- height: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--primary);
- }
- .embed-title {
- font-size: 12px;
- font-weight: 500;
- flex: 1;
- }
- .embed-body {
- padding: 12px;
- }
- .embed-image {
- width: 100%;
- border-radius: 6px;
- height: auto;
- object-fit: cover;
- }
- .embed-text {
- font-size: 13px;
- color: var(--text-light);
- margin-top: 8px;
- line-height: 1.4;
- }
- .embed-footer {
- padding: 8px 12px;
- border-top: 1px solid var(--border);
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .embed-button {
- background-color: var(--primary-light);
- color: white;
- font-size: 12px;
- font-weight: 500;
- padding: 6px 12px;
- border-radius: 6px;
- border: none;
- cursor: pointer;
- transition: var(--transition);
- }
- .embed-button:hover {
- background-color: var(--primary);
- transform: translateY(-1px);
- box-shadow: 0 3px 8px rgba(84, 104, 255, 0.2);
- }
- .date-divider {
- display: flex;
- align-items: center;
- gap: 12px;
- margin: 16px 0;
- opacity: 0.7;
- }
- .divider-line {
- flex: 1;
- height: 1px;
- background-color: var(--border);
- }
- .divider-text {
- font-size: 12px;
- color: var(--text-light);
- white-space: nowrap;
- }
- .typing-indicator {
- display: flex;
- align-items: center;
- gap: 4px;
- font-size: 12px;
- color: var(--text-light);
- padding: 8px 12px;
- margin-bottom: 8px;
- }
- .typing-dot {
- width: 5px;
- height: 5px;
- background-color: var(--text-light);
- border-radius: 50%;
- animation: typingAnimation 1.4s infinite ease-in-out;
- }
- .typing-dot:nth-child(1) {
- animation-delay: 0s;
- }
- .typing-dot:nth-child(2) {
- animation-delay: 0.2s;
- }
- .typing-dot:nth-child(3) {
- animation-delay: 0.4s;
- }
- @keyframes typingAnimation {
- 0%,
- 100% {
- transform: translateY(0);
- opacity: 0.5;
- }
- 50% {
- transform: translateY(-4px);
- opacity: 1;
- }
- }
- .input-area {
- padding: 16px 24px 24px;
- background-color: var(--panel);
- border-top: 1px solid var(--border);
- z-index: 10;
- }
- .toolbar {
- display: flex;
- align-items: center;
- gap: 8px;
- margin-bottom: 12px;
- }
- .tool-button {
- background: none;
- border: none;
- cursor: pointer;
- width: 32px;
- height: 32px;
- border-radius: 4px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--text-light);
- transition: var(--transition);
- }
- .tool-button:hover {
- background-color: rgba(84, 104, 255, 0.1);
- color: var(--primary);
- }
- .tool-button svg {
- width: 18px;
- height: 18px;
- }
- .input-container {
- display: flex;
- gap: 12px;
- align-items: center;
- }
- .message-input {
- flex: 1;
- padding: 14px 16px;
- border-radius: 10px;
- border: 1px solid var(--border);
- background-color: var(--background);
- font-size: 14px;
- resize: none;
- transition: var(--transition);
- height: 50px;
- outline: none;
- }
- .message-input:focus {
- border-color: var(--primary-light);
- box-shadow: 0 0 0 2px rgba(84, 104, 255, 0.1);
- }
- .send-button {
- background-color: var(--primary);
- color: white;
- border: none;
- width: 50px;
- height: 50px;
- border-radius: 12px;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: var(--transition);
- }
- .send-button:hover {
- background-color: var(--primary-dark);
- transform: translateY(-2px);
- box-shadow: 0 4px 12px rgba(84, 104, 255, 0.2);
- }
- .poll-container {
- padding: 12px;
- background-color: rgba(84, 104, 255, 0.05);
- border-radius: 8px;
- margin-top: 8px;
- }
- .poll-question {
- font-weight: 500;
- margin-bottom: 10px;
- font-size: 13px;
- }
- .poll-options {
- display: flex;
- flex-direction: column;
- gap: 8px;
- }
- .poll-option {
- background-color: white;
- border: 1px solid var(--border);
- padding: 8px 12px;
- border-radius: 6px;
- font-size: 13px;
- position: relative;
- cursor: pointer;
- transition: var(--transition);
- display: flex;
- justify-content: space-between;
- }
- .poll-option:hover {
- border-color: var(--primary-light);
- background-color: rgba(84, 104, 255, 0.03);
- }
- .poll-option.selected {
- border-color: var(--primary);
- background-color: rgba(84, 104, 255, 0.1);
- }
- .poll-option.selected::before {
- content: '';
- position: absolute;
- left: 0;
- top: 0;
- height: 100%;
- width: 3px;
- background-color: var(--primary);
- border-top-left-radius: 6px;
- border-bottom-left-radius: 6px;
- }
- .poll-percent {
- font-size: 12px;
- font-weight: 500;
- color: var(--primary);
- }
- .poll-votes {
- margin-top: 10px;
- font-size: 12px;
- color: var(--text-light);
- text-align: right;
- }
- .resource-link {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 10px;
- background-color: var(--background);
- border-radius: 6px;
- cursor: pointer;
- transition: var(--transition);
- text-decoration: none;
- color: var(--text-dark);
- border: 1px solid var(--border);
- }
- .resource-link:hover {
- background-color: rgba(84, 104, 255, 0.05);
- border-color: var(--primary-light);
- transform: translateY(-2px);
- box-shadow: var(--shadow);
- }
- .resource-icon {
- width: 36px;
- height: 36px;
- background-color: rgba(84, 104, 255, 0.1);
- border-radius: 6px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--primary);
- }
- .resource-info {
- flex: 1;
- }
- .resource-title {
- font-size: 13px;
- font-weight: 500;
- }
- .resource-desc {
- font-size: 11px;
- color: var(--text-light);
- }
- /* Responsive Styles */
- @media (max-width: 700px) {
- .chat-container {
- width: 100%;
- height: 100%;
- border-radius: 0;
- }
- .message {
- max-width: 90%;
- }
- .header-actions {
- gap: 8px;
- }
- .icon-button {
- width: 32px;
- height: 32px;
- }
- .tabs {
- padding: 0 10px;
- }
- .tab {
- padding: 12px 10px;
- font-size: 13px;
- }
- }
- /* Animation for new messages */
- @keyframes popIn {
- 0% {
- transform: scale(0.8);
- opacity: 0;
- }
- 50% {
- transform: scale(1.05);
- }
- 100% {
- transform: scale(1);
- opacity: 1;
- }
- }
- .pop-in {
- animation: popIn 0.3s forwards;
- }
- /* Resource expansion animation */
- .resource-expanded {
- max-height: 0;
- overflow: hidden;
- transition: max-height 0.3s ease;
- }
- .resource-expanded.active {
- max-height: 200px;
- }
- /* Tooltip Styles */
- .tooltip {
- position: relative;
- }
- .tooltip::after {
- content: attr(data-tooltip);
- position: absolute;
- bottom: 130%;
- left: 50%;
- transform: translateX(-50%);
- padding: 5px 10px;
- border-radius: 4px;
- background-color: rgba(26, 33, 56, 0.9);
- color: white;
- font-size: 11px;
- white-space: nowrap;
- opacity: 0;
- visibility: hidden;
- transition: all 0.2s ease;
- pointer-events: none;
- z-index: 100;
- }
- .tooltip::before {
- content: '';
- position: absolute;
- bottom: 120%;
- left: 50%;
- transform: translateX(-50%);
- border-width: 4px;
- border-style: solid;
- border-color: rgba(26, 33, 56, 0.9) transparent transparent transparent;
- opacity: 0;
- visibility: hidden;
- transition: all 0.2s ease;
- pointer-events: none;
- z-index: 100;
- }
- .tooltip:hover::after,
- .tooltip:hover::before {
- opacity: 1;
- visibility: visible;
- }
- /* Reaction Styles */
- .reactions {
- display: flex;
- flex-wrap: wrap;
- gap: 4px;
- margin-top: 8px;
- }
- .reaction {
- font-size: 12px;
- padding: 2px 6px 2px 4px;
- background-color: rgba(84, 104, 255, 0.06);
- border-radius: 12px;
- display: flex;
- align-items: center;
- gap: 3px;
- cursor: pointer;
- transition: var(--transition);
- }
- .reaction:hover {
- background-color: rgba(84, 104, 255, 0.15);
- }
- .reaction.active {
- background-color: rgba(84, 104, 255, 0.2);
- font-weight: 500;
- }
|