    body, html {
        height: 100%;
        margin: 0;
        padding: 0;
    }
    .chatroom-center {
        min-height: 100vh;
        min-width: 100vw;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
    }
    #chat-messages::-webkit-scrollbar { width: 8px; }
    #chat-messages::-webkit-scrollbar-track { background: transparent; }
    #chat-messages::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
    .user-message {
        align-self: flex-end;
        background-color: #1F3BB3;
        color: white;
        padding: 10px;
        border-radius: 20px 20px 0 20px;
        margin-bottom: 5px;
        max-width: 75%;
        margin-right: 10px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        font-size: 14px;
    }
    .bot-message {
        align-self: flex-start;
        background-color: #e5e5ea;
        color: black;
        padding: 10px;
        border-radius: 20px 20px 20px 0;
        margin-bottom: 5px;
        max-width: 80%;
        margin-left: 10px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        font-size: 14px;
    }
    .card.chat-card {
    max-width: 100%;
    height: 70vh;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    /* Add this: */
    overflow: hidden;
}

#chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Add this: */
    overflow: hidden;
}

#chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
    width: 1000px;
    height: 100%;
    max-width: 1000px;
    max-height: 600px;
    min-width: 1000px;
    min-height: 600px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    /* Remove height: 600px if you want it to fill the parent */
}
    @media (max-width: 600px) {
        .chat-card { height: 90vh !important; min-height: 0 !important; }
        #user-input-container { padding: 6px 0 0 0; }
    }