: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: 900px; 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; } @media (min-width: 1400px) { .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl { max-width: 1750px; } } .table th { font-size: smaller; background-color: #C3CCD4; } .btn-primary { --cui-btn-bg: #72889B; --cui-btn-border-color: #72889B; --cui-btn-hover-bg: #B1BCC7; --cui-btn-hover-border-color: #B1BCC7; } a { color: #52616f; } .footer { --cui-footer-bg: #B1BCC7; } .table thead { position: sticky; top: 40px; background: white; }