Spaces:
Running
Running
| @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap'); | |
| :root { | |
| --primary-color: #6a11cb; | |
| --secondary-color: #2575fc; | |
| --text-color: #333; | |
| --bg-color: #f0f2f5; | |
| --chat-bg: #ffffff; | |
| --user-message-bg: #2575fc; | |
| --ai-message-bg: #f1f3f5; | |
| --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| --gradient: linear-gradient(to right, var(--primary-color), var(--secondary-color)); | |
| } | |
| body { | |
| font-family: 'Poppins', sans-serif; | |
| line-height: 1.6; | |
| color: var(--text-color); | |
| background-color: var(--bg-color); | |
| margin: 0; | |
| padding: 0; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| min-height: 100vh; | |
| background-image: var(--gradient); | |
| background-attachment: fixed; | |
| } | |
| .chat-container { | |
| background-color: var(--chat-bg); | |
| border-radius: 20px; | |
| box-shadow: var(--shadow); | |
| width: 90%; | |
| max-width: 800px; | |
| height: 80vh; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .chat-header { | |
| background-image: var(--gradient); | |
| color: white; | |
| padding: 20px; | |
| text-align: center; | |
| } | |
| .chat-header h1 { | |
| margin: 0; | |
| font-size: 24px; | |
| font-weight: 600; | |
| } | |
| .model-selector { | |
| display: flex; | |
| justify-content: center; | |
| gap: 10px; | |
| margin-top: 10px; | |
| } | |
| .select, .button { | |
| font-family: 'Poppins', sans-serif; | |
| font-size: 14px; | |
| padding: 8px 12px; | |
| border-radius: 20px; | |
| border: none; | |
| outline: none; | |
| transition: all 0.3s ease; | |
| } | |
| .select { | |
| background-color: white; | |
| color: var(--text-color); | |
| } | |
| .button { | |
| background-color: white; | |
| color: var(--primary-color); | |
| cursor: pointer; | |
| } | |
| .button:hover:not(:disabled) { | |
| background-color: var(--secondary-color); | |
| color: white; | |
| } | |
| .button:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| .progress-container { | |
| width: 100%; | |
| background-color: #e0e0e0; | |
| padding: 3px; | |
| border-radius: 3px; | |
| box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2); | |
| } | |
| .progress-bar { | |
| display: block; | |
| height: 10px; | |
| background: var(--gradient); | |
| border-radius: 3px; | |
| transition: width 0.3s ease-in-out; | |
| } | |
| .status { | |
| padding: 10px; | |
| text-align: center; | |
| font-size: 14px; | |
| color: var(--primary-color); | |
| background-color: var(--bg-color); | |
| } | |
| .chat-box { | |
| flex-grow: 1; | |
| padding: 20px; | |
| overflow-y: auto; | |
| background-color: var(--chat-bg); | |
| } | |
| .welcome-message { | |
| text-align: center; | |
| color: var(--text-color); | |
| padding: 20px; | |
| background-color: rgba(255, 255, 255, 0.8); | |
| border-radius: 10px; | |
| margin-bottom: 20px; | |
| } | |
| .message { | |
| max-width: 80%; | |
| margin-bottom: 15px; | |
| padding: 12px 16px; | |
| border-radius: 20px; | |
| font-size: 14px; | |
| line-height: 1.4; | |
| position: relative; | |
| } | |
| .user-message { | |
| background-color: var(--user-message-bg); | |
| color: white; | |
| align-self: flex-end; | |
| margin-left: auto; | |
| border-bottom-right-radius: 0; | |
| } | |
| .assistant-message { | |
| background-color: var(--ai-message-bg); | |
| color: var(--text-color); | |
| align-self: flex-start; | |
| border-bottom-left-radius: 0; | |
| box-shadow: var(--shadow); | |
| } | |
| .chat-input-container { | |
| display: flex; | |
| padding: 20px; | |
| background-color: var(--chat-bg); | |
| border-top: 1px solid var(--bg-color); | |
| } | |
| .input { | |
| flex-grow: 1; | |
| font-family: 'Poppins', sans-serif; | |
| font-size: 14px; | |
| padding: 12px 20px; | |
| border: none; | |
| border-radius: 25px; | |
| background-color: var(--bg-color); | |
| color: var(--text-color); | |
| outline: none; | |
| } | |
| .send-button { | |
| background-image: var(--gradient); | |
| color: white; | |
| border-radius: 50%; | |
| width: 50px; | |
| height: 50px; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| margin-left: 10px; | |
| transition: all 0.3s ease; | |
| } | |
| .send-button:hover:not(:disabled) { | |
| transform: scale(1.1); | |
| } | |
| .chat-stats { | |
| font-size: 12px; | |
| color: var(--text-color); | |
| text-align: center; | |
| padding: 5px; | |
| background-color: var(--bg-color); | |
| } | |
| .hidden { | |
| display: none; | |
| } | |
| /* Scrollbar Styles */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: var(--chat-bg); | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background-image: var(--gradient); | |
| border-radius: 20px; | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(20px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .message { | |
| animation: fadeIn 0.3s ease-out; | |
| } | |
| @keyframes typing { | |
| 0% { content: ''; } | |
| 25% { content: '.'; } | |
| 50% { content: '..'; } | |
| 75% { content: '...'; } | |
| 100% { content: ''; } | |
| } | |
| .typing::after { | |
| content: ''; | |
| animation: typing 1s infinite; | |
| } | |
| .message p { | |
| margin: 0 0 10px 0; | |
| } | |
| .message ul, .message ol { | |
| margin: 0 0 10px 0; | |
| padding-left: 20px; | |
| } | |
| .message pre { | |
| background-color: #f4f4f4; | |
| padding: 10px; | |
| border-radius: 5px; | |
| overflow-x: auto; | |
| } | |
| .message code { | |
| background-color: #f4f4f4; | |
| padding: 2px 4px; | |
| border-radius: 3px; | |
| } | |
| .message blockquote { | |
| border-left: 4px solid #ccc; | |
| margin: 0 0 10px 0; | |
| padding-left: 10px; | |
| color: #666; | |
| } |