body {
    font-family: Arial, sans-serif;
    }
    .chat-box {
    display: flex;
    flex-direction: column;
    height: auto;
    justify-content: flex-end;
    padding: 20px;
    }
    .message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    }
    .timestamp {
     float:right;
    }
    .message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
   position: absolute;
   margin-left: -18px;
          }
    .message .text-container {
    background-color: #f1f0f0;
    border-radius: 20px;
    padding: 10px;
    max-width: 60%;
    }
    .message .username {
    font-weight: bold;
    margin-right: 5px;
    }
    .username {
     margin-bottom: 4px;
    }
    .message .text {
    word-wrap: break-word;
    }
    /* Position user's messages on the left */
    .message.sent {
    margin-left: auto;
    align-self: flex-end;
    }
    /* Position other users' messages on the right */
    .message:not(.sent) {
    margin-right: auto;
    align-self: flex-start;
    }
    /* Style user's messages differently */
    .message.sent .text-container {
    background-color: #007bff;
    color: #fff;
    }
    .input-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    background-color: #f6f7f9;
    }
    .input-box input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 20px;
    border: none;
    margin-right: 10px;
    }
    .input-box button {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    }

    .text-row {
     max-width: 300px;
     min-width: 140px;
     padding-left: 20px;
     padding-right:10px;
     padding-bottom: 5px;
     padding-top: 5px;
    }

    .message .text-container {
     margin-bottom: 10px;
    }