html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.body {
    display: flex;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: fit-content;
    overflow: hidden;
    padding-right: 10px;
}

#chat-area {
    height: fit-content;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: rgba(240, 255, 240, 0.8);
    border-radius: 15px;
    padding: 10px;
    margin: auto;
    right: 10px;
    padding-right: 10px;
    overflow: hidden;
}

#chat-box {
    flex: 1;
    height: fit-content;
    width: 100%;
    min-height: 350px;
    overflow: hidden;
    gap: 10px;
    padding: 10px;
    display: flex;
    margin-right: 10px;
    flex-direction: column;
    justify-content: flex-end;
}

.msg {
    padding: 10px 15px;
    margin: 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 300;
    line-height: 1.4;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    position: relative;
}

.msg .timestamp {
    font-size: 5px;
    font-weight: 100;
    color: #888;
    position: absolute;
    bottom: 5px;
    right: 10px;
}

.message-user {
    padding: 6px;
    background-color: rgba(144,240,198, 0.8);
    align-self: flex-end;
    text-align: justify;
    width: fit-content;
    border-radius: 10px;
    max-width: 65%;
    color: black;
    font-size: 11px;
}

.message-bot {
    padding: 6px;
    background-color: rgba(77, 184, 208, 0.8);
    align-self: flex-start;
    text-align: justify;
    width: fit-content;
    border-radius: 10px;
    max-width: 65%;
    color: darkblue;
    font-size: 11px;
}

#message-input {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background-color: rgba(14,40,98, 0.3);
    border-radius: 10px;
    width: 100%;
    position: sticky;
    bottom: 0;
    margin-right: 10px;
    z-index: 2;
    box-sizing: border-box;
}

#input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
}
#input:focus {
    outline: none;
    box-shadow: 0 0 5px royalblue;
}
#send {
    padding: 10px 20px;
    background-color: royalblue;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

#send:hover {
    background-color: darkblue;
}

.typing-indicator {
    font-size: 16px;
    color: #888;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
    visibility: hidden;
}

.typing-indicator span {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin: 0 3px;
    border-radius: 50%;
    background-color: #888;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}
@media screen and (max-width: 600px) {
    #message-input {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px;
        background: white;
        border: 1px solid #ccc;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        border-radius: 25px;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    #input {
        width: 85%;
        font-size: 16px;
        padding: 10px;
        border: none;
        outline: none;
        border-radius: 20px;
    }

    #send {
        width: 45px;
        height: 45px;
        padding: 0;
        border-radius: 50%;
        background-color: royalblue;
        justify-content: center;
        align-items: center;
    }

    .send-icon {
        font-size: 16px;
    }            
    .msg {
        padding: 10px 15px;
        margin: 8px 0;
        border-radius: 12px;
        font-size: 7px;
        font-weight: 300;
        line-height: 1.4;
        word-wrap: break-word;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .msg .timestamp {
        font-size: 4px;
        font-weight: 100;
        color: #888;
        position: absolute;
        bottom: 5px;
        right: 10px;
    }   
}
