/* 🌟 Global Styles */
body {
    background-image: url('./photos/b.jpg'); /* Ensure correct path */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    transition: background 0.3s ease-in-out;
}

/* 🌟 Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
}

/* 🌟 Chatbox */
.chatbox {
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.15); /* Glass Effect */
    backdrop-filter: blur(12px);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* 📱 Mobile Chatbox */
.chatbox.mobile-chatbox {
    width: 100%;
    height: 90vh;
    background-image: url('./photos/dark.jpg'); /* Dark Mode */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    border: 2px solid #444;
}

/* 🌞 Light Mode Mobile Chatbox */
.light-mode .chatbox.mobile-chatbox {
    background-image: url('./photos/light.jpg'); /* Light Mode */
    background-size: cover;
    border: 2px solid #ccc;
}

/* 🌟 Chat Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(42, 42, 42, 0.7);
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    border-radius: 8px 8px 0 0;
}

/* 🌞 Light Mode Chat Header */
.light-mode .chat-header {
    background: rgba(255, 255, 255, 0.9);
    color: black;
}

/* 🌟 Chat Messages */
#chat {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: url('https://i.imgur.com/0R5r8mX.png') no-repeat center center;
    background-size: cover;
    border-radius: 0 0 10px 10px;
    height: 60vh;
}

/* 🌞 Light Mode Chat Background */
.light-mode #chat {
    background: url('https://i.imgur.com/0R5r8mX.png') no-repeat center center;
    background-size: cover;
}

/* 🌟 Input Area */
.input-area {
    display: flex;
    padding: 10px;
    background: rgba(42, 42, 42, 0.8);
    gap: 8px;
    border-radius: 0 0 10px 10px;
}

/* 🌞 Light Mode Input Area */
.light-mode .input-area {
    background: rgba(220, 220, 220, 0.9);
}

/* 🌟 Input Field */
input {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    outline: none;
    font-size: 16px;
}

/* 🌞 Light Mode Input Field */
.light-mode input {
    background: rgba(0, 0, 0, 0.1);
    color: black;
}

/* 🌟 Buttons */
button {
    padding: 12px 15px;
    background: #4a4a4a;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

/* 🌞 Light Mode Button */
.light-mode button {
    background: #bbb;
    color: black;
}

button:hover {
    background: #5a5a5a;
}

/* 🌞 Light Mode Button Hover */
.light-mode button:hover {
    background: #999;
}

/* 🌟 Chat Messages */
.message {
    max-width: 75%;
    padding: 12px;
    border-radius: 20px;
    word-wrap: break-word;
    font-size: 16px;
    display: inline-block;
}

/* 📩 User Message */
.user-message {
    background-color: #0084ff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    border-top-left-radius: 20px;
    padding: 10px 14px;
}

/* 🤖 Bot Message */
.bot-message {
    background-color: rgba(58, 58, 58, 0.85);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 20px;
    padding: 10px 14px;
}

/* 🌞 Light Mode User Message */
.light-mode .user-message {
    background-color: #0084ff;
    color: black;
}

/* 🌞 Light Mode Bot Message */
.light-mode .bot-message {
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
}

/* 📱 Mobile Responsiveness */
@media (max-width: 480px) {
    .chatbox {
        padding: 10px;
    }
}

/* ✨ Smooth Chat Clearing Animation */
@keyframes fadeOutShrink {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 0; transform: scale(0); }
}

/* Apply this class when clearing chat */
.clear-animation {
    animation: fadeOutShrink 0.1s ease-out forwards;
}
