@media (max-width: 600px) {
    .modal {
        position: fixed;
        z-index: 1;
        /* Use Flexbox to center the modal content */
        display: none;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.4);
    }

    .modal.show {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .modal-content {
        margin: 0 auto;
    }

    .chat-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .chat-input {
        padding: 0 0;
        /* Add left and right padding */
        position: relative;
    }

    /* Adjust the right padding of the input box to reserve space for the send button */
    .chat-input input[type="text"] {
        padding: 10px 40px 10px 10px;
        /* Reserve space for send button on the right */
        width: 100%;
        box-sizing: border-box;
    }

    /* Send button styles */
    .chat-input .send-button {
        position: absolute;
        right: 10px;
        width: 30px;
        /* Adjust send button width for mobile devices */
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    /* Ensure the icon inside the send button fits the button */
    .chat-input .send-button i {
        font-size: 16px;
        /* Adjust icon size to fit the button */
    }

    .message .bubble {
        max-width: 80%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Adjust modal-content for mobile devices */
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 10px;
        padding: 15px;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 8px;
        box-sizing: border-box;
    }

    .custom-model-input {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    /* Adjust close button position for mobile */
    .modal .close {
        top: 5px;
        right: 10px;
        font-size: 24px;
    }
}