@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    width: 100%;
    height: 100vh;
    background-image: url('background.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;

}

.main-container {
    width: 70%;
    max-width: 2500px;
    height: 90%;
    /* background-color: transparent; */
    border-radius: 20px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;

}

.chat-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-chat {
    width: 60%;
    align-self: flex-end;
}

.user-chat-area {
    width: 100%;
    padding: 20px;
    background: rgb(114, 204, 199);
    font-size: 1.2rem;
    color: black;
    border-radius: 40px 0 40px 40px;
    box-shadow: 2px 2px 10px black;
}
.user-chat-area:empty {
    display: none;
}

.Ai-chat {
    width: 60%;
}

.Ai-chat-area {
    width: 80%;
    padding: 20px;
    background: rgb(114, 204, 199);
    font-size: 1.2rem;
    color: black;
    border-radius: 0 40px 40px 40px;
    box-shadow: 2px 2px 10px black;
}

.prompt-area {
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}




.prompt-area input {
    flex: 1;
    height: 50px;
    background-color: rgb(114, 204, 199);
    outline: none;
    border: none;
    border-radius: 50px;
    padding: 0 20px;
    color: black;
    font-size: 1rem;
    box-shadow: 2px 2px 10px black;
}

.prompt-area button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgb(114, 204, 199);
    cursor: pointer;
    border: none;
    box-shadow: 2px 2px 10px black;
    transition: 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.prompt-area button img {
    width: 70%;
    height: 70%;
}

.prompt-area button:hover {
    background-color: rgb(93, 177, 173);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgb(114, 204, 199);
    
    border-radius: 10px;
}

.chatbot-icon {
    position: absolute;
    top: 60px;
    left: 100px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: 0.3s ease;
}

.chatbot-icon img {
    width: 150px;
    height: 150px;
}

.chatbot-icon:hover {
    background-color: rgb(93, 177, 173);
}
.home-icon {
    position: absolute;
    top: 30px;
    right: 65px;
    font-size: 65px;
    text-decoration: none;
    color: rgb(33, 180, 160);
}







/* Responsive Design for all elements */

/* Tablet devices (width between 768px and 1024px) */
@media (max-width: 1024px) {
    .main-container {
        width: 90%;
        height: 90%;
        padding: 15px;
    }

    .chat-container {
        gap: 15px;
    }

    .user-chat, .Ai-chat, .prompt-area {
        width: 80%;
    }

    .user-chat-area, .Ai-chat-area {
        font-size: 1rem;
        padding: 15px;
        box-shadow: 1px 1px 6px black;
        border-radius: 30px 0 30px 30px;
    }

    .Ai-chat-area {
        width: 90%;
        border-radius: 0 30px 30px 30px;
    }

    .prompt-area input {
        font-size: 0.9rem;
        height: 45px;
        padding: 0 15px;
        box-shadow: 1px 1px 6px black;
    }

    .prompt-area button {
        width: 45px;
        height: 45px;
        box-shadow: 1px 1px 6px black;
    }

    .prompt-area button img {
        width: 60%;
        height: 60%;
    }

    .chatbot-icon {
        top: 30px;
        left: 30px;
        width: 40px;
        height: 40px;
    }

    .chatbot-icon img {
        width: 100px;
        height: 100px;
    }

    .home-icon {
        top: 20px;
        right: 30px;
        font-size: 50px;
    }
}

/* Mobile devices (width below 768px) */
@media (max-width: 768px) {
    .main-container {
        width: 95%;
        height: 95%;
        padding: 10px;
        flex-direction: column;
        justify-content: flex-start;
    }

    .chat-container {
        gap: 10px;
        flex: 1;
    }

    .user-chat, .Ai-chat, .prompt-area {
        width: 300px;
    }

    .user-chat-area, .Ai-chat-area {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px;
        box-shadow: 1px 1px 6px black;
        border-radius: 20px;
    }

    .prompt-area {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .prompt-area input {
        width: 100%;
        height: 45px;
        font-size: 0.9rem;
    }

    .prompt-area button {
        width: 45px;
        height: 45px;
    }

    .prompt-area button img {
        width: 60%;
        height: 60%;
    }

    .chatbot-icon {
        top: 20px;
        left: 20px;
        width: 35px;
        height: 35px;
    }

    .chatbot-icon img {
        width: 80px;
        height: 80px;
    }

    .home-icon {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
}

/* Very small devices (phones under 480px) */
@media (max-width: 480px) {
    .main-container {
        width: 98%;
        height: 98%;
        padding: 8px;
    }

    .chat-container {
        gap: 8px;
    }

    .user-chat-area, .Ai-chat-area {
        font-size: 0.8rem;
        padding: 8px;
    }

    .prompt-area input {
        font-size: 0.8rem;
        height: 40px;
    }

    .prompt-area button {
        width: 40px;
        height: 40px;
    }

    .prompt-area button img {
        width: 55%;
        height: 55%;
    }

    .chatbot-icon {
        top: 15px;
        left: 15px;
        width: 30px;
        height: 30px;
    }

    .chatbot-icon img {
        width: 70px;
        height: 70px;
    }

    .home-icon {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* Improve scrollbar for mobile */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 5px;
    }

    ::-webkit-scrollbar-thumb {
        background-color: rgb(93, 177, 173);
        border-radius: 5px;
    }
}
/* داخل media queries - تعديلات إضافية مفيدة */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .main-container {
        /* min-height: 90vh;
        max-height: 100vh; */
        padding: 10px;
        border-radius: 15px;
        height: 85vh;
    }

    .prompt-area input {
        font-size: 1rem;
    }

    .user-chat-area, .Ai-chat-area {
        font-size: 1rem;
    }

    .chat-container {
        padding-bottom: 10px; /* لتفادي التصادم مع زر الإدخال */
    }
    .user-chat {
        align-self: flex-end;
        display: flex;
        justify-content: flex-end;
    }
    
    .Ai-chat {
        align-self: flex-start;
        display: flex;
        justify-content: flex-start;
    }
}
.user-chat {
    align-self: flex-end;
    display: flex;
    justify-content: flex-end;
}

.Ai-chat {
    align-self: flex-start;
    display: flex;
    justify-content: flex-start;
}

.prompt-area {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    margin-top: 50px;
    flex-wrap: wrap;
}

.prompt-area input {
    flex: 1;
    height: 50px;
    background-color: rgb(114, 204, 199);
    outline: none;
    border: none;
    border-radius: 50px;
    padding: 0 20px;
    color: black;
    font-size: 1rem;
    box-shadow: 2px 2px 10px black;
}

.prompt-area .send-button,
.prompt-area .file-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgb(114, 204, 199);
    cursor: pointer;
    border: none;
    box-shadow: 2px 2px 10px black;
    display: flex;
    justify-content: center;
    align-items: center;
}

.prompt-area .send-button img,
.prompt-area .file-button img {
    width: 70%;
    height: 70%;
}

@media (max-width: 768px) {
    .prompt-area {
        flex-direction: column;
        align-items: stretch;
    }

    .prompt-area input {
        width: 300px;
    }

    .prompt-area .send-button,
    .prompt-area .file-button {
        width: 45px;
        height: 45px;
        align-self: center;
    }
}
@media (max-width: 600px) {
    .prompt-area {
      flex-wrap: wrap;
      gap: 8px;
      justify-content: space-between;
    }

    input[type="text"] {
      flex: 20%;
      order: 2;
      flex: 1 1 100%;
      order: 2;
    }
    }

    .send-button {
      order: 2;
      width: 36px;
      height: 36px;
    }
    

    .buttons {
      order: 1;
    }
  


    .file-preview {
        margin-top: 10px;
        padding: 8px 10px;
        background-color: #f0f0f0;
        border-radius: 8px;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        color: #444;
        gap: 8px;
    }
   