/* General Chat Styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #555;
    --bg-light: #ffffff;
    --bg-dark: #121212;
    --text-light: #111;
    --text-dark: #eee;
    --accent-color: #60c5f2;
}

/* Light/Dark Mode */
body.light {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Chat Container */
.ai-chat-container {
    width: 90%;
    max-width: 500px;
    height: 600px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    background-color: inherit;
}

/* Header */
.chat-header {
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2em;
}

#themeToggleBtn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Chat Body */
.chat-body {
    flex-grow: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    background-color: inherit;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-out;
}

.message.user {
    background-color: #e1f5fe;
    color: #111;
    align-self: flex-end;
}

.message.ai {
    background-color: #f1f1f1;
    color: #111;
    align-self: flex-start;
}

/* Input Container */
.chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
}

.chat-input-container input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.chat-input-container button {
    margin-left: 5px;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: #fff;
    cursor: pointer;
}

/* Scrollbar */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 3px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media(max-width:600px){
    .ai-chat-container { width: 95%; height: 80vh; }
}
