/* General Styles */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } body { background-color: #000; /* Background color of the chat interface */ color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; } /* Chat Container */ .chat-container { display: flex; flex-direction: column; gap: 10px; padding: 20px; width: 100%; /* Ensure it takes full width of the parent */ max-width: 900px; /* Allow a comfortable maximum width */ margin: auto; height: 80vh; overflow-y: auto; background-color: #1E3E62; border-radius: 10px; } /* Message Bubbles */ .message-bubble { display: flex; align-items: center; max-width: 80%; /* Limit each message to 80% of the chat container */ padding: 10px; border-radius: 10px; word-wrap: break-word; margin-bottom: 10px; font-size: 100%; /* Reduce text size to 75% of original */ } /* Outgoing Messages (Your Prompt) */ .message-bubble.outgoing { background-color: #0B192C; align-self: flex-end; /* Align the bubble to the right */ display: flex; flex-direction: row-reverse; /* Avatar on the right */ max-width: 80%; /* Set max width to 80% of container */ margin-left: auto; /* Push the bubble to the right */ color: #fff; } /* Ensure the avatar is on the right side for outgoing messages */ .message-bubble.outgoing .chat-details img { margin-left: 10px; /* Space between message and avatar */ margin-right: 0; /* Remove right margin */ width: 35px; height: 35px; border-radius: 50%; object-fit: cover; } /* Incoming Messages (Her Reply) */ .message-bubble.incoming { background-color: #FF6500; align-self: flex-start; /* Align the bubble to the left */ display: flex; flex-direction: row; /* Default row direction */ max-width: 80%; /* Set max width to 80% of container */ color: #000; border: 2px solid #0B192C; } /* Ensure the avatar is on the left side for incoming messages */ .message-bubble.incoming .chat-details img { margin-right: 10px; /* Space between avatar and message */ margin-left: 0; /* Remove left margin */ width: 35px; height: 35px; border-radius: 50%; object-fit: cover; } /* Ensure that the message text stays aligned properly */ .message-content p { margin: 0; padding: 5px 10px; font-size: inherit; } /* Typing Input Container */ .input-container { display: flex; padding: 10px; background-color: #343541; /* Match the theme color */ width: 100%; max-width: 900px; /* Matches the chat container width */ margin-top: 10px; border-radius: 10px; } /* Input Textarea */ #user-input { flex-grow: 1; padding: 10px; border: none; border-radius: 5px; font-size: 1rem; outline: none; background-color: #555; color: #fff; } /* Send Button */ #send-btn { margin-left: 10px; padding: 10px 15px; background-color: #acecbe; border: none; border-radius: 5px; cursor: pointer; color: #000; } /* Typing Animation (Dots) */ .typing-animation { display: inline-flex; align-items: center; gap: 3px; } .typing-dot { width: 8px; height: 8px; background-color: #acecbe; border-radius: 50%; animation: animateDots 1.2s linear infinite; } @keyframes animateDots { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } } /* Scrollbar Styling */ :where(.chat-container, textarea)::-webkit-scrollbar { width: 6px; } :where(.chat-container, textarea)::-webkit-scrollbar-track { background: #444654; border-radius: 25px; } :where(.chat-container, textarea)::-webkit-scrollbar-thumb { background: #acecbe; border-radius: 25px; }