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

body{
    width: 100%;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    position: relative;
}

/* Floating Icons Background */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    user-select: none;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.chat-container{
    width: 100%;
    height: 80%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px 20px 0 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    position: relative;
    z-index: 10;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.user-chatBox i{
    font-size: 24px;
    color: #667eea;
    margin-right: 10px;
}

.ai-chatBox i{
    font-size: 24px;
    color: #4facfe;
    margin-right: 10px;
    position: absolute;
    left: 0;
    top: 15px;
}

.user-chatBox{
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin-bottom: 15px;
}

.userChatArea{
    max-width: 70%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 5px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: slideInRight 0.3s ease-out;
    z-index: 20;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chooseimg{
    max-width: 200px;
    border-radius: 10px;
    margin: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ai-chatBox{
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
}

.aiChatArea{
    max-width: 70%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 20px 20px 20px 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-left: 35px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: slideInLeft 0.3s ease-out;
    z-index: 20;
}

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

.user-chatBox i{
    position: absolute;
    right: 15px;
    top: 15px;
}

.prompt-area{
    height: 20%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 30px;
    position: relative;
    z-index: 10;
}

#promptTextarea{
    flex: 1;
    max-width: 60%;
    height: 50px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    font-size: 14px;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: inherit;
}

#promptTextarea:focus {
    background: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#promptTextarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#promptTextarea::placeholder {
    color: #999;
}

#submit{
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#submit:hover{
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#submit:active {
    transform: translateY(0) scale(0.98);
}

#submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#image_button{
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

#image_button:hover{
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.05);
}

.chooseClass{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

#image_button img{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Loading animation */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.loading::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    animation: loading 1s infinite ease-in-out;
    box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor;
    animation-delay: 0s, 0.1s, 0.2s;
}

@keyframes loading {
    0%, 80%, 100% {
        opacity: 0;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .chat-container {
        padding: 20px 15px;
    }
    
    .prompt-area {
        padding: 15px;
        gap: 10px;
    }
    
    #promptTextarea {
        max-width: 70%;
        height: 45px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    #submit, #image_button {
        width: 45px;
        height: 45px;
    }
    
    .userChatArea, .aiChatArea {
        max-width: 85%;
        padding: 14px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .userChatArea, .aiChatArea {
        max-width: 95%;
        padding: 12px 14px;
        font-size: 12px;
    }
    
    #promptTextarea {
        max-width: 75%;
        height: 40px;
        padding: 10px 14px;
        font-size: 12px;
    }
    
    #submit, #image_button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}