body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #c2d0da;
    overflow: hidden;
}

#chat-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.chat-message.local-message {
    align-items: flex-end;
}

.chat-message.remote-message {
    align-items: flex-start;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.local-message .chat-bubble {
    background-color: #1e87f0;
    color: white;
    border-bottom-right-radius: 5px;
}

.remote-message .chat-bubble {
    background-color: #e5e5e5;
    color: #333;
    border-bottom-left-radius: 5px;
}

.chat-message-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.chat-sender-name {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
}

.local-message .chat-sender-name {
    color: #cce4fc;
}

.chat-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin-top: 5px;
    cursor: pointer;
}

.chat-timestamp {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
}

.local-message .chat-timestamp {
    color: #cce4fc;
}

.chat-unavailable-text {
    font-style: italic;
    color: #777;
}

.chat-link {
    color: inherit;
    text-decoration: underline;
    word-break: break-all;
}

.chat-link:hover {
    opacity: 0.85;
}

.local-message .chat-unavailable-text {
    color: #cce4fc;
}

/* Custom Scrollbar for message area */
#messageArea::-webkit-scrollbar {
    width: 6px;
}

#messageArea::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#messageArea::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#messageArea::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.chat-message.system-message {
    align-items: center;
    margin-bottom: 15px;
}

.system-bubble {
    background-color: transparent;
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
    box-shadow: none;
    padding: 2px 10px;
}

.system-text {
    text-align: center;
}

#chatNameInput::selection {
    background-color: #1e87f0;
    color: #ffffff;
}

#chatNameInput::-moz-selection {
    background-color: #1e87f0;
    color: #ffffff;
}