Spaces:
Running
Running
/* General Reset and Base Styles */ | |
*, | |
*::before, | |
*::after { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
body { | |
font-family: 'Arial', sans-serif; | |
background-color: var(--bg-color); | |
color: var(--text-color); | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
min-height: 100vh; | |
} | |
.app-container { | |
width: 100%; | |
max-width: 600px; | |
height: 90vh; | |
display: flex; | |
flex-direction: column; | |
border-radius: 10px; | |
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); | |
background-color: var(--bg-color); | |
overflow: hidden; | |
} | |
.app-header { | |
background-color: var(--header-bg-color); | |
padding: 15px; | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
border-bottom: 1px solid var(--border-color); | |
} | |
.header-content h1 { | |
font-size: 1.5rem; | |
font-weight: bold; | |
} | |
.header-actions { | |
display: flex; | |
gap: 10px; | |
} | |
.icon-button { | |
background: none; | |
border: none; | |
color: var(--text-color); | |
font-size: 1.2rem; | |
cursor: pointer; | |
transition: color 0.3s; | |
} | |
.icon-button:hover { | |
color: var(--primary-color); | |
} | |
.chat-container { | |
flex: 1; | |
display: flex; | |
flex-direction: column; | |
padding: 15px; | |
overflow-y: auto; | |
} | |
.messages-container { | |
flex: 1; | |
padding-bottom: 20px; | |
} | |
.welcome-message { | |
text-align: center; | |
margin-bottom: 20px; | |
font-size: 1.2rem; | |
} | |
.message { | |
padding: 12px 15px; | |
margin: 10px 0; | |
border-radius: 8px; | |
max-width: 80%; | |
word-wrap: break-word; | |
position: relative; | |
} | |
.user-message { | |
background-color: var(--user-message-bg); | |
color: var(--user-message-color); | |
align-self: flex-end; | |
} | |
.bot-message { | |
background-color: var(--bot-message-bg); | |
color: var(--bot-message-color); | |
align-self: flex-start; | |
} | |
.copy-button { | |
position: absolute; | |
top: 5px; | |
right: 5px; | |
background: none; | |
border: none; | |
color: var(--text-color); | |
font-size: 1rem; | |
cursor: pointer; | |
opacity: 0.7; | |
transition: opacity 0.3s; | |
} | |
.copy-button:hover { | |
opacity: 1; | |
} | |
.typing-indicator { | |
display: flex; | |
justify-content: flex-start; | |
padding: 10px; | |
} | |
.typing-bubble { | |
display: flex; | |
align-items: center; | |
background-color: var(--bot-message-bg); | |
border-radius: 8px; | |
padding: 5px 12px; | |
} | |
.dots span { | |
display: inline-block; | |
width: 8px; | |
height: 8px; | |
margin: 0 3px; | |
background-color: var(--text-color); | |
border-radius: 50%; | |
animation: blink 1.5s infinite; | |
} | |
.dots span:nth-child(2) { | |
animation-delay: 0.2s; | |
} | |
.dots span:nth-child(3) { | |
animation-delay: 0.4s; | |
} | |
@keyframes blink { | |
0%, 100% { | |
opacity: 0; | |
} | |
50% { | |
opacity: 1; | |
} | |
} | |
.chat-input-container { | |
display: flex; | |
padding: 15px; | |
border-top: 1px solid var(--border-color); | |
} | |
.textarea-wrapper { | |
flex-grow: 1; | |
} | |
textarea { | |
resize: none; | |
width: 100%; | |
padding: 12px 15px; | |
border-radius: 8px; | |
border: 1px solid var(--border-color); | |
background-color: var(--input-bg-color); | |
color: var(--text-color); | |
font-size: 1rem; | |
outline: none; | |
transition: border-color 0.3s ease-in-out; | |
} | |
textarea:focus { | |
border-color: var(--primary-color); | |
} | |
.input-actions { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
margin-top: 12px; | |
} | |
.char-counter { | |
font-size: 0.9rem; | |
color: var(--text-color); | |
} | |
.send-button { | |
background: none; | |
border: none; | |
color: var(--primary-color); | |
font-size: 1.2rem; | |
cursor: pointer; | |
transition: color 0.3s ease; | |
} | |
.send-button:hover { | |
color: var(--primary-color-hover); | |
} | |
.toast-container { | |
position: fixed; | |
bottom: 20px; | |
right: 20px; | |
display: flex; | |
flex-direction: column; | |
gap: 10px; | |
} | |
.toast { | |
padding: 12px 15px; | |
border-radius: 8px; | |
color: #fff; | |
opacity: 1; | |
transition: opacity 0.3s ease; | |
} | |
.toast.success { | |
background-color: #4caf50; | |
} | |
.toast.error { | |
background-color: #f44336; | |
} | |
.toast.info { | |
background-color: #2196f3; | |
} | |
/* Dark Mode */ | |
:root.dark { | |
--bg-color: #121212; | |
--text-color: #e0e0e0; | |
--header-bg-color: #1e1e1e; | |
--border-color: #333; | |
--primary-color: #bb86fc; | |
--primary-color-hover: #3700b3; | |
--user-message-bg: #424242; | |
--user-message-color: #ffffff; | |
--bot-message-bg: #3700b3; | |
--bot-message-color: #ffffff; | |
--input-bg-color: #1e1e1e; | |
} | |
/* Light Mode */ | |
:root.light { | |
--bg-color: #ffffff; | |
--text-color: #000000; | |
--header-bg-color: #f5f5f5; | |
--border-color: #ccc; | |
--primary-color: #6200ea; | |
--primary-color-hover: #3700b3; | |
--user-message-bg: #e0e0e0; | |
--user-message-color: #000000; | |
--bot-message-bg: #6200ea; | |
--bot-message-color: #ffffff; | |
--input-bg-color: #f5f5f5; | |
} | |
/* Responsive Design */ | |
@media (max-width: 600px) { | |
.app-container { | |
width: 100%; | |
height: 100vh; | |
border-radius: 0; | |
} | |
.header-content h1 { | |
font-size: 1.3rem; | |
} | |
.icon-button { | |
font-size: 1rem; | |
} | |
.chat-input-container { | |
flex-direction: column; | |
} | |
.input-actions { | |
flex-direction: column; | |
align-items: flex-start; | |
} | |
.char-counter { | |
margin-bottom: 10px; | |
} | |
.send-button { | |
align-self: flex-end; | |
} | |
} |