/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

/* Body */
body {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    /* Gradient background */
    color: #f1f1f1;
    font-size: 16px;
    overflow: hidden;
    transition: background 0.5s ease;
}

/* Chat Container */
.chat-container {
    width: 90%;
    max-width: 1100px;
    height: 80%;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 25px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

/* Fade-in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User and AI Chat Boxes */
.user-chat-box,
.ai-chat-box {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.user-chat-box {
    justify-content: flex-end;
    /* Align to the right */
}

.ai-chat-box {
    justify-content: flex-start;
    /* Align to the left */
}

/* Profile Image */
.profile-img {
    width: 45px;
    /* Fixed size for profile image */
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
    /* Space between image and message */
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hover effect on profile image */
.profile-img:hover {
    transform: scale(1.1);
    /* Slight zoom on hover */
}

/* Chat Bubbles */
.user-chat-area {
    padding: 18px;
    background: linear-gradient(135deg, #00bcd4, #00e676);
    /* Blue-Green gradient */
    color: white;
    border-radius: 20px 20px 0 20px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.15);
    animation: bubblePop 0.3s ease-out;
    font-weight: 500;
    max-width: 80%;
    position: relative;
}

.ai-chat-area {
    padding: 18px;
    background: linear-gradient(135deg, #ff4081, #8e24aa);
    /* Pink-Purple gradient */
    color: white;
    border-radius: 20px 20px 20px 0;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.15);
    animation: bubblePop 0.3s ease-out;
    font-weight: 500;
    max-width: 80%;
    position: relative;
}

/* Bubble Pop Animation */
@keyframes bubblePop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Area */
.prompt-area {
    width: 90%;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-radius: 35px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

/* Input Field */
.prompt-area input {
    flex: 1;
    padding: 15px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    background: #1a1a1a;
    color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.prompt-area input:focus {
    border: 2px solid #00bcd4;
    box-shadow: 0 4px 30px rgba(0, 188, 212, 0.3);
    outline: none;
}

/* Button */
.prompt-area button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff4081, #8e24aa);
    /* Dynamic gradient */
    color: white;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Button Hover */
.prompt-area button:hover {
    background: linear-gradient(135deg, #8e24aa, #ff4081);
    /* Reverse gradient */
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

/* Button Active */
.prompt-area button:active {
    transform: scale(0.95);
}

/* Scrollbar Customization */
.chat-container::-webkit-scrollbar {
    width: 12px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00bcd4, #00e676);
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8e24aa, #ff4081);
}

/* Mobile-First Responsive Design */
@media (max-width: 600px) {

    .user-chat-box,
    .ai-chat-box {
        max-width: 85%;
    }

    .chat-container {
        height: 70%;
    }

    .prompt-area input {
        font-size: 14px;
    }

    .prompt-area button {
        width: 50px;
        height: 50px;
    }
}