body{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e0e0e0;
    background-color: #1a1a1a;
    font-family: Arial, sans-serif;
    height: 100vh;
}

.chat-container{
    width: 100%;
    max-width: 25rem;
    display: flex;
    flex-direction: column;
    background-color: #2a2a2a;
    box-shadow: 0 0 0.625rem rgba(255, 255, 255, 0.1);
    border-radius: 0.625rem;
    height: 90vh;
    overflow: hidden;
}

.chat-header{
    background-color: #3a3a3a;
    color: #fff;
    width: 100%;
    padding: 0.938rem;
    text-align: center;
}

.chat-header h1{
    font-size: 1.5rem;
    margin: 0;
}

.chat-messages{
    flex-grow: 1;
    padding: 1.25rem;
    overflow-y: auto;
}

.message{
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.938rem;
}

.message-content{
    padding: 0.625rem;
    border-radius: 0.313rem;
    max-width: 70%;
}

.user-message{
    flex-direction: row-reverse;
}

.user-message .message-content{
    background-color: #4a90e2;
    margin-right: 0.625rem;
}

.bot-message .message-content {
    background-color: #3a3a3a;
    margin-left: 0.625rem;
}

.profile-image{
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
    object-fit: cover;
}

.chat-input-container{
    display: flex;
    padding: 0.938rem;
    background-color: #2a2a2a;
}

#user-input{
    flex-grow: 1;
    padding: 0.625rem;
    border: 1px solid #4a4a4a;
    border-radius: 0.313rem;
    font-size: 1rem;
    background-color: #3a3a3a;
    color: #e0e0e0;
    outline: none;
}

#send-button{
    padding: 0.625rem 1.25rem;
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 0.313rem;
    margin-left: 0.625rem;
    cursor: pointer;
}

#send-button:hover{
    background-color: #3a7bc8;
}

#send-button:disabled{
    background-color: #2a5a8a;
    cursor: not-allowed;
}

/* Media Queries for Smaller Devices (Phones) */

/* For screens smaller than 480px */
@media (max-width: 480px) {
    .chat-container {
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }

    .chat-header h1 {
        font-size: 1.25rem; /* Smaller font size for smaller screens */
    }

    .message-content {
        max-width: 90%; /* Allow more space for message content */
    }

    #user-input {
        font-size: 0.875rem; /* Slightly smaller font for better readability */
        padding: 0.5rem; /* Reduced padding for more space */
    }

    #send-button {
        padding: 0.5rem 1rem; /* Reduced padding for a better fit */
    }

    .profile-image {
        width: 1.5rem; /* Smaller profile image for compactness */
        height: 1.5rem;
    }
}

/* For very small screens (e.g., phones with widths around 320px) */
@media (max-width: 320px) {
    .chat-container {
        max-width: 100%;
        padding: 0.5rem; /* Reduced padding for smaller screens */
    }

    .chat-header h1 {
        font-size: 1.125rem; /* Slightly smaller header text */
    }

    .message-content {
        max-width: 85%; /* Reduce the message content width further */
    }

    #user-input {
        font-size: 0.75rem; /* Even smaller font for extreme small screens */
        padding: 0.4rem; /* Further reduced padding */
    }

    #send-button {
        padding: 0.5rem; /* Further reduce button padding */
    }

    .profile-image {
        width: 1.25rem; /* Smaller profile images */
        height: 1.25rem;
    }
}

/* Scrollbar styles */
::-webkit-scrollbar{
    width: 8px;
}

::-webkit-scrollbar-track{
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb{
    background-color: #4a4a4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover{
    background: #5a5a5a;
}
