/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Changa', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh; /* Full viewport height */
    overflow: hidden; /* Prevent scrolling */
    padding: 20px;
}

/* Header */
header {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: #007bff;
    margin: 0;
}

.header-right {
    position: relative;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #007bff;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 1;
    overflow: hidden;
    min-width: 150px;
}

.dropdown-content button {
    width: 100%;
    padding: 10px;
    text-align: left;
    border: none;
    background-color: transparent;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.dropdown-content button:hover {
    background-color: #f4f7f6;
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 800px;
    flex: 1; /* Take up remaining space */
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Scrollable chat area */
    padding: 20px;
    margin-bottom: 20px;
}

/* User Chat Box */
.user-chat-box {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-bottom: 20px;
    animation: slideInRight 0.5s ease;
}

.user-chat-box img {
    order: 2;
    margin-left: 10px;
    border-radius: 50%;
    border: 2px solid #007bff;
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease;
}

.user-chat-box img:hover {
    transform: scale(1.1);
}

.load{
    margin-right: 5px;
}
.user-chat-area {
    order: 1;
    max-width: 70%;
    background-color: #007bff;
    color: #fff;
    padding: 15px;
    border-radius: 15px 15px 0 15px;
    word-wrap: break-word;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.user-chat-area:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* AI Chat Box */
.ai-chat-box {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 20px;
    animation: slideInLeft 0.5s ease;
}

.ai-chat-box img {
    margin-right: 10px;
    border-radius: 50%;
    border: 2px solid #28a745;
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease;
}

.ai-chat-box img:hover {
    transform: scale(1.1);
}

.ai-chat-area {
    display: block;
    max-width: 70%;
    background-color: #28a745;
    color: #fff;
    padding: 15px;
    border-radius: 15px 15px 15px 0;
    word-wrap: break-word;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-chat-area:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Prompt Area */
.prompt-area {
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    gap: 8px;
    position: fixed; /* Fix the prompt area at the bottom */
    bottom: 10px; /* Position it slightly above the bottom */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center horizontally */
    z-index: 1000; /* Ensure it's above other elements */
}

.prompt-area input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 14px; /* Smaller font size for mobile */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.prompt-area input:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.prompt-area button {
    background: #007bff;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.prompt-area button:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.prompt-area button img {
    width: 30px; /* Smaller icons for mobile */
    height: 30px;
    filter: brightness(0) invert(1);
}

/* Media Queries for Mobile */
@media (max-width: 480px) {
    .prompt-area {
        width: 95%; /* Slightly smaller width for mobile */
        padding: 6px;
        gap: 6px;
        bottom: 5px; /* Adjust position for mobile */
    }

    .prompt-area input {
        padding: 6px 10px;
        font-size: 12px; /* Smaller font size for mobile */
    }

    .prompt-area button {
        padding: 6px;
    }

    .prompt-area button img {
        width: 18px; /* Smaller icons for mobile */
        height: 18px;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.choose{
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Image styling in chat */
.user-chat-area img.chooseimg {
    /* max-width: 3000px; */
    width: auto;
    height: auto;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.user-chat-area img.chooseimg:hover {
    transform: scale(1.02);
}

/* Image upload preview */
#image img.choose {
    width: auto;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007bff;
    padding: 2px;
}