@import "https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap"; :root { --background-primary: #ffffff; --background-secondary: #f5f7fb; --background-tertiary: #e6ebf5; --background-accent: #e6ebf5; --text-normal: #2e3338; --text-muted: #747f8d; --interactive-normal: #4f5660; --interactive-hover: #2e3338; --interactive-active: #060607; --brand: #5865f2; --brand-hover: #4752c4; --online: #3ba55c; --offline: #747f8d; --unread: #f04747; --group-chat: #9147ff; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: "Poppins", sans-serif; background-color: var(--background-primary); color: var(--text-normal); height: 100vh; display: flex; overflow: hidden; } #side { width: 320px; background-color: var(--background-secondary); display: flex; flex-direction: column; border-right: 1px solid var(--background-tertiary); } #chat { flex: 1; display: flex; flex-direction: column; background-color: var(--background-primary); } #users { flex: 1; overflow-y: auto; padding: 8px 0; } #messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; } #message-container { padding: 16px; display: flex; align-items: center; gap: 8px; } .friend-button { width: 100%; padding: 8px; margin: 0; border: none; border-radius: 4px; background: transparent; color: var(--text-normal); cursor: pointer; display: flex; align-items: center; gap: 12px; text-align: left; transition: background-color 0.2s ease; } .friend-button:hover { background-color: var(--background-accent); } .friend-button.active { background-color: var(--background-accent); } .profile-logo-container { position: relative; width: 32px; height: 32px; flex-shrink: 0; margin: 7px; } .profile-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; } .group-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background-color: var(--group-chat); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; } .friend-text { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 2px; } .friend-name { font-family: "Poppins", sans-serif; font-weight: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; } .last-message { font-size: 12px; font-family: "Poppins", sans-serif; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; } .status-dot { width: 10px; height: 10px; border-radius: 50%; position: absolute; bottom: 0; right: 0; border: 2px solid var(--background-secondary); } .status-dot.online { background-color: var(--online); } .status-dot.offline { background-color: var(--offline); } .unread-dot { background-color: var(--unread); color: white; font-size: 12px; font-weight: 600; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; margin-left: auto; } .message { max-width: 70%; margin-bottom: 16px; padding: 8px 16px; border-radius: 4px; word-wrap: break-word; position: relative; } .message.sender { background-color: #ecf3fe; color: #333; margin-left: auto; border-top-left-radius: 20px; border-top-right-radius: 2px; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; font-size: 15px; } .message.receiver { background-color: #f2f2f2; color: #333; margin-right: auto; font-size: 15px; border-top-left-radius: 2px; border-top-right-radius: 20px; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; } .message-timestamp { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-align: right; } .sender-name { font-size: 12px; font-weight: bold; color: var(--text-normal); margin-bottom: 4px; } .day-separator { display: flex; align-items: center; margin: 16px 0; color: var(--text-muted); font-size: 12px; } .day-separator::before, .day-separator::after { content: ''; flex: 1; height: 1px; background-color: var(--background-tertiary); margin: 0 8px; } #typing-indicator { font-size: 12px; color: var(--text-muted); padding: 0 16px; height: 20px; } input { flex: 1; padding: 10px 16px; background-color: var(--background-secondary); border: none; border-radius: 8px; color: var(--text-normal); font-size: 14px; } input:focus { outline: none; } button { padding: 10px 16px; background-color: var(--brand); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 500; transition: background-color 0.2s ease; } button:hover { background-color: var(--brand-hover); } #add-friend-btn { margin: 8px; background-color: var(--background-tertiary); color: var(--text-normal); } #add-friend-btn:hover { background-color: var(--background-accent); } #create-group-btn { margin: 8px; background-color: var(--group-chat); color: white; } #chat-header h2 { font-weight: 550; font-family: "Poppins", sans-serif; } #create-group-btn:hover { background-color: #7d2ae8; } #chat-header { padding: 12px 16px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 100; background-color: rgba(255, 255, 255, 0.15); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); margin: 8px; margin-bottom: 0px; } /* Scrollbar styling */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--background-tertiary); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--background-accent); } /* Preloader styles */ #preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--background-primary); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 1; transition: opacity 0.8s ease-out; } #preloader.fade-out { opacity: 0; } #preloader img { max-width: 160px; } .chat-link { color: #00aff4; text-decoration: none; } .chat-link:hover { text-decoration: underline; } /* Call related styles */ #call-controls { display: flex; gap: 10px; margin-left: auto; } .call-header-btn { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--interactive-normal); transition: all 0.2s ease; padding: 5px; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; } .call-header-btn:hover { color: var(--interactive-hover); background-color: var(--background-tertiary); } #chat-header-actions { display: flex; gap: 8px; margin-left: auto; } #call-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); z-index: 1000; display: none; flex-direction: column; align-items: center; justify-content: center; } #video-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; width: 90%; max-width: 1200px; } .video-container { position: relative; width: 45%; max-width: 500px; background-color: #000; border-radius: 8px; overflow: hidden; } .video-container video { width: 100%; height: auto; display: block; } .video-label { position: absolute; bottom: 10px; left: 10px; color: white; background-color: rgba(0, 0, 0, 0.5); padding: 5px 10px; border-radius: 4px; font-size: 14px; } #call-actions { margin-top: 20px; display: flex; gap: 15px; } .call-action-btn { width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; } #end-call-btn { background-color: #f04747; color: white; } #mute-btn, #video-off-btn { background-color: var(--background-tertiary); color: var(--text-normal); } #mute-btn.active, #video-off-btn.active { background-color: var(--brand); color: white; } #call-info { color: white; margin-bottom: 20px; text-align: center; } #call-timer { font-size: 24px; font-weight: bold; } #call-status { font-size: 16px; margin-top: 5px; } .ringing-animation { animation: pulse 1.5s infinite; } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } /* Incoming call modal */ #incoming-call-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 20px; border-radius: 8px; z-index: 1001; text-align: center; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); display: none; } #incoming-call-modal h3 { margin-bottom: 15px; } #incoming-call-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; } #accept-call-btn { background-color: #3ba55c; color: white; } #reject-call-btn { background-color: #f04747; color: white; } /* Image message styles */ .message-image { max-width: 100%; max-height: 300px; border-radius: 8px; margin-top: 8px; cursor: pointer; transition: transform 0.2s; } .message-image:hover { transform: scale(1.02); } .image-preview-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 2000; cursor: pointer; } .image-preview { max-width: 90%; max-height: 90%; } /* Video message styles */ .message-video { max-width: 100%; max-height: 300px; border-radius: 8px; margin-top: 8px; cursor: pointer; background-color: #000; position: relative; } .video-thumbnail { width: 100%; height: auto; border-radius: 8px; } .video-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 48px; opacity: 0.8; text-shadow: 0 0 8px rgba(0, 0, 0, 0.5); } /* Video preview modal */ .video-preview-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 2000; } .video-preview { max-width: 90%; max-height: 90%; } .video-preview video { max-width: 100%; max-height: 80vh; } .close-preview { position: absolute; top: 20px; right: 20px; color: white; font-size: 24px; cursor: pointer; } /* File upload button */ #file-upload { display: none; } #file-upload-btn { padding: 10px; border-radius: 8px; background-color: var(--background-secondary); color: var(--text-normal); cursor: pointer; display: flex; align-items: center; justify-content: center; } #file-upload-btn:hover { background-color: var(--background-tertiary); } /* Upload progress */ .upload-progress { width: 100%; height: 4px; background-color: var(--background-tertiary); border-radius: 2px; margin-top: 8px; overflow: hidden; display: none; } .upload-progress-bar { height: 100%; background-color: var(--brand); width: 0%; transition: width 0.3s ease; } /* Message container layout */ #message-input-container { display: flex; align-items: center; gap: 8px; width: 100%; } #message { flex: 1; } /* File type indicator */ .file-type-indicator { font-size: 12px; color: var(--text-muted); margin-top: 4px; } /* User profile section */ #user-profile { padding: 16px; border-top: 1px solid var(--background-tertiary); display: flex; align-items: center; gap: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 100; background-color: rgba(255, 255, 255, 0.15); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); margin: 8px; margin-bottom: 10px; } #user-profile-container { position: relative; width: 40px; height: 40px; } #user-profile-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; cursor: pointer; } #user-profile-name { font-weight: 500; font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #profile-photo-upload { display: none; } .profile-photo-menu { position: absolute; bottom: 100%; left: 0; background-color: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); padding: 8px 0; z-index: 100; display: none; min-width: 160px; } .profile-photo-menu-item { padding: 8px 16px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px; } .profile-photo-menu-item:hover { background-color: var(--background-secondary); } #user-profile-container:hover .profile-photo-menu { display: block; } /* Settings Menu Styles */ .settings-menu { position: absolute; bottom: 110%; left: 0px; padding: 12px; z-index: 100; display: none; max-height: 80vh; overflow-y: auto; border: 1px solid var(--background-tertiary); } .settings-close-btn { position: absolute; top: 8px; right: 8px; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; } .settings-close-btn:hover { background-color: var(--background-accent); } .settings-tabs { display: flex; border-bottom: 1px solid var(--background-tertiary); margin-bottom: 12px; padding-bottom: 8px; } .settings-tab { padding: 8px 16px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-muted); border-radius: 4px; } .settings-tab.active { color: var(--text-normal); background-color: var(--background-accent); } .settings-section { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--background-tertiary); } .settings-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .settings-section-title { font-weight: 500; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; } .settings-item { margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; } .settings-item label { font-size: 13px; color: var(--text-muted); } .settings-item input { padding: 8px 12px; background-color: var(--background-primary); border: 1px solid var(--background-tertiary); border-radius: 4px; font-size: 14px; } .settings-item button { padding: 8px 12px; font-size: 13px; background-color: var(--brand); color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 4px; } .toggle-item { display: flex; align-items: center; justify-content: space-between; } /* Switch toggle */ .switch { position: relative; display: inline-block; width: 50px; height: 24px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--background-tertiary); transition: .4s; border-radius: 24px; } .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .slider { background-color: var(--brand); } input:checked + .slider:before { transform: translateX(26px); } /* Friends List Styles */ .friends-list { max-height: 300px; overflow-y: auto; } .friend-item { display: flex; align-items: center; justify-content: space-between; padding: 8px; border-radius: 4px; margin-bottom: 4px; } .friend-item:hover { background-color: var(--background-accent); } .friend-info { display: flex; align-items: center; gap: 8px; } .friend-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; } .friend-name { font-size: 14px; } .unfriend-btn { background-color: var(--unread); color: white; border: none; border-radius: 4px; padding: 4px 8px; font-size: 12px; cursor: pointer; } .unfriend-btn:hover { background-color: #d63a3a; } /* Dark Mode Variables */ .dark-mode { --background-primary: #36393f; --background-secondary: #2f3136; --background-tertiary: #202225; --background-accent: #4f545c; --text-normal: #dcddde; --text-muted: #a3a6aa; --interactive-normal: #b9bbbe; --interactive-hover: #dcddde; --interactive-active: #ffffff; --brand: #5865f2; --brand-hover: #4752c4; --online: #3ba55c; --offline: #747f8d; --unread: #f04747; --group-chat: #7d2ae8; } .dark-mode .message.sender { background-color: #0d4a96; color: white; } .dark-mode .message.receiver { background-color: #4f545c; color: white; } /* Group chat modal styles */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1002; justify-content: center; align-items: center; } .modal-content { background-color: var(--background-primary); padding: 20px; border-radius: 8px; width: 90%; max-width: 500px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .modal-title { font-size: 18px; font-weight: 600; } .close-modal { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); transition: all 0.2s ease; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; } .close-modal:hover { background-color: white; color: black; } .modal-body { margin-bottom: 20px; } .modal-footer { display: flex; justify-content: flex-end; gap: 10px; } .modal-footer button { font-family: "Poppins", sans-serif; font-weight: 500; /* You can adjust this if needed */ } .form-group { margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; font-weight: 500; } .form-control { width: 100%; padding: 10px; border: 1px solid var(--background-tertiary); border-radius: 4px; background-color: var(--background-secondary); color: var(--text-normal); } .form-control:focus { outline: none; border-color: var(--brand); } .checkbox-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--background-tertiary); border-radius: 4px; padding: 10px; } .checkbox-item { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--background-tertiary); } .checkbox-item:last-child { border-bottom: none; } .checkbox-item input { margin-right: 10px; } .group-info { display: flex; align-items: center; margin-bottom: 15px; } .group-avatar { width: 50px; height: 50px; border-radius: 50%; background-color: var(--group-chat); color: white; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold; margin-right: 15px; cursor: pointer; } .group-avatar-input { display: none; } .group-name-input { flex: 1; } /* Group info styles */ .group-members { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; } .group-member { display: flex; align-items: center; background-color: var(--background-secondary); padding: 5px 10px; border-radius: 20px; font-size: 12px; } .group-member-avatar { width: 20px; height: 20px; border-radius: 50%; margin-right: 5px; object-fit: cover; } /* Group management modal */ .group-management { display: flex; flex-direction: column; gap: 15px; } .group-management-actions { display: flex; gap: 10px; } .group-management-btn { padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; border: none; } .group-management-btn.leave { background-color: #f04747; color: white; } .group-management-btn.add { background-color: var(--brand); color: white; } .group-management-btn.edit { background-color: var(--background-tertiary); color: var(--text-normal); } #search-container { position: relative; padding: 1px; } #search-container i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; border-bottom: 1px solid var(--background-tertiary); } #chat-search { width: 94%; padding: 8px 8px 8px 32px; background-color: var(--background-tertiary); border: none; border-radius: 5px; color: var(--text-normal); font-size: 13px; margin: 10px; font-family: "Poppins", sans-serif; } /* Remove the existing button styles and replace with these: */ #button-container { display: flex; gap: 8px; padding: 8px; border-bottom: 1px solid var(--background-tertiary); } #add-friend-btn, #create-group-btn { flex: 1; padding: 10px 12px; border: none; border-radius: 8px; cursor: pointer; font-family: "Poppins", sans-serif; font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease; height: 40px; } #add-friend-btn { background-color: var(--background-tertiary); color: var(--text-normal); } #add-friend-btn:hover { background-color: var(--background-accent); } #create-group-btn { background-color: var(--group-chat); color: white; } #create-group-btn:hover { background-color: #7d2ae8; } /* Add this to your CSS */ #user-profile-container { position: relative; transition: all 0.3s ease; } #user-profile-container.extended { height: 400px; /* Adjust as needed */ width: 600px; /* Adjust as needed */ border-radius: 8px; z-index: 1000; padding: 16px; display: flex; flex-direction: column; align-items: center; } #user-profile-container.extended #user-profile-photo { width: 80px; height: 80px; margin-bottom: 16px; } .settings-content-container { width: 100%; overflow-y: auto; flex-grow: 1; display: none; } #user-profile-container.extended .settings-content-container { display: block; } #user-profile-container.extended .profile-photo-menu { display: none; }