body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4;
}

.chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 800px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Scrollbar personalizada */
.chat-box {
    scrollbar-width: thin;
    scrollbar-color: #DB1615 #f9f9f9;
}
.chat-box::-webkit-scrollbar {
    width: 6px;
    background: #f9f9f9;
}
.chat-box::-webkit-scrollbar-thumb {
    background: #DB1615;
    border-radius: 6px;
}

.chat-box {
    flex-grow: 1;
    padding: 20px;
    background-color: #f9f9f9;
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #333;
}

.input-container {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ddd;
    align-items: center;
    gap: 10px;
}

.input-container input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}

.input-container button {
    padding: 10px 20px;
    background-color: #DB1615;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}
.input-container button:hover, #emojiButton:hover {
    background-color: #e94f4b;
}
.input-container button:focus, #emojiButton:focus {
    outline: 2px solid #222;
    outline-offset: 2px;
}

#emojiButton {
    background-color: #DB1615;
    border: none;
    margin-left: 10px;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
#emojiButton .emoji {
    font-size: 30px;
    line-height: 1;
}

.chat-box div {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    background-color: #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.chat-box div strong {
    font-weight: 600;
    color: #DB1615;
    margin-right: 10px;
}
.chat-box div .message-text {
    font-size: 14px;
    color: #333;
    word-wrap: break-word;
    max-width: 80%;
}
.chat-box div .time-ago {
    font-size: 12px;
    color: #888;
    margin-left: auto;
    align-self: flex-start;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .input-container {
        flex-direction: column;
    }
    .input-container input {
        width: 100%;
        margin-bottom: 10px;
    }
    .input-container button {
        width: 100%;
        margin-left: 0;
    }
    #emojiButton {
        display: none;
    }
    .chat-box div {
        flex-direction: column;
        align-items: flex-start;
    }
    .chat-box div .time-ago {
        align-self: flex-end;
        margin-top: 5px;
    }
    .chat-box {
        padding: 8px;
    }
}

/* Emoji container */
.emoji-container {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 20px;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}
.emoji-container .emoji {
    font-size: 20px;
    margin: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.emoji-container .emoji:hover {
    background-color: #f0f0f0;
}
