Spaces:
Sleeping
Sleeping
| /* Cosmic Chatbot - Styles CSS */ | |
| @import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap'); | |
| @import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap'); | |
| :root { | |
| /* Dark Theme (Deep Space) */ | |
| --dark-bg-primary: #0f0f1a; | |
| --dark-bg-secondary: #1a1a2e; | |
| --dark-accent-primary: #7b2cbf; | |
| --dark-accent-secondary: #c77dff; | |
| --dark-text-primary: #e6e6fa; | |
| --dark-text-secondary: #b8b8d4; | |
| --dark-border: #2a2a4a; | |
| --dark-shadow: rgba(123, 44, 191, 0.2); | |
| --dark-gradient: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%); | |
| --dark-card-bg: rgba(26, 26, 46, 0.7); | |
| --dark-input-bg: rgba(15, 15, 26, 0.6); | |
| /* Light Theme (Cosmic Nebula) */ | |
| --light-bg-primary: #f0f8ff; | |
| --light-bg-secondary: #e6e6fa; | |
| --light-accent-primary: #7b2cbf; | |
| --light-accent-secondary: #5a189a; | |
| --light-text-primary: #1a1a2e; | |
| --light-text-secondary: #3a3a5a; | |
| --light-border: #d4d4f0; | |
| --light-shadow: rgba(123, 44, 191, 0.1); | |
| --light-gradient: linear-gradient(135deg, #f0f8ff 0%, #e6e6fa 100%); | |
| --light-card-bg: rgba(230, 230, 250, 0.7); | |
| --light-input-bg: rgba(240, 248, 255, 0.6); | |
| /* Default Theme (starts with dark) */ | |
| --bg-primary: var(--dark-bg-primary); | |
| --bg-secondary: var(--dark-bg-secondary); | |
| --accent-primary: var(--dark-accent-primary); | |
| --accent-secondary: var(--dark-accent-secondary); | |
| --text-primary: var(--dark-text-primary); | |
| --text-secondary: var(--dark-text-secondary); | |
| --border: var(--dark-border); | |
| --shadow: var(--dark-shadow); | |
| --gradient: var(--dark-gradient); | |
| --card-bg: var(--dark-card-bg); | |
| --input-bg: var(--dark-input-bg); | |
| /* Animation Speeds */ | |
| --animation-slow: 3s; | |
| --animation-medium: 1.5s; | |
| --animation-fast: 0.6s; | |
| /* Sizes */ | |
| --border-radius-sm: 0.5rem; | |
| --border-radius-md: 1rem; | |
| --border-radius-lg: 1.5rem; | |
| --spacing-xs: 0.25rem; | |
| --spacing-sm: 0.5rem; | |
| --spacing-md: 1rem; | |
| --spacing-lg: 1.5rem; | |
| --spacing-xl: 2rem; | |
| } | |
| /* Base Styles */ | |
| * { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| body { | |
| font-family: 'Quicksand', sans-serif; | |
| background: var(--gradient); | |
| color: var(--text-primary); | |
| margin: 0; | |
| padding: 0; | |
| min-height: 100vh; | |
| transition: all 0.5s ease; | |
| position: relative; | |
| overflow-x: hidden; | |
| } | |
| body::before { | |
| content: ''; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background-image: | |
| radial-gradient(circle at 15% 15%, rgba(123, 44, 191, 0.1) 0%, transparent 20%), | |
| radial-gradient(circle at 85% 85%, rgba(199, 125, 255, 0.1) 0%, transparent 20%); | |
| pointer-events: none; | |
| z-index: -1; | |
| } | |
| /* Stars Animation */ | |
| .stars { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| pointer-events: none; | |
| z-index: -1; | |
| } | |
| .star { | |
| position: absolute; | |
| background-color: var(--text-primary); | |
| border-radius: 50%; | |
| opacity: 0; | |
| animation: twinkle var(--animation-slow) infinite ease-in-out; | |
| } | |
| @keyframes twinkle { | |
| 0%, 100% { opacity: 0; transform: scale(0.5); } | |
| 50% { opacity: 0.8; transform: scale(1); } | |
| } | |
| /* Floating Particles */ | |
| .particles { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| pointer-events: none; | |
| z-index: -1; | |
| } | |
| .particle { | |
| position: absolute; | |
| background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); | |
| border-radius: 50%; | |
| opacity: 0.3; | |
| filter: blur(3px); | |
| animation: float var(--animation-medium) infinite ease-in-out; | |
| } | |
| @keyframes float { | |
| 0%, 100% { transform: translateY(0) translateX(0); } | |
| 50% { transform: translateY(-20px) translateX(10px); } | |
| } | |
| /* Main Container */ | |
| .app-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: var(--spacing-md); | |
| position: relative; | |
| z-index: 1; | |
| } | |
| /* Header */ | |
| .app-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: var(--spacing-md) 0; | |
| margin-bottom: var(--spacing-lg); | |
| } | |
| .app-title { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .app-title h1 { | |
| font-weight: 700; | |
| font-size: 1.8rem; | |
| background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); | |
| -webkit-background-clip: text; | |
| background-clip: text; | |
| color: transparent; | |
| text-shadow: 0 2px 10px var(--shadow); | |
| } | |
| .app-logo { | |
| width: 40px; | |
| height: 40px; | |
| animation: pulse var(--animation-medium) infinite alternate; | |
| } | |
| @keyframes pulse { | |
| 0% { transform: scale(1); } | |
| 100% { transform: scale(1.1); } | |
| } | |
| .app-controls { | |
| display: flex; | |
| gap: var(--spacing-md); | |
| align-items: center; | |
| } | |
| .theme-toggle { | |
| background: none; | |
| border: none; | |
| color: var(--text-primary); | |
| cursor: pointer; | |
| font-size: 1.5rem; | |
| transition: transform 0.3s ease; | |
| } | |
| .theme-toggle:hover { | |
| transform: rotate(30deg); | |
| } | |
| .feature-toggle { | |
| background: var(--card-bg); | |
| border: 1px solid var(--border); | |
| color: var(--text-primary); | |
| padding: var(--spacing-xs) var(--spacing-sm); | |
| border-radius: var(--border-radius-sm); | |
| cursor: pointer; | |
| font-size: 0.9rem; | |
| transition: all 0.3s ease; | |
| backdrop-filter: blur(10px); | |
| } | |
| .feature-toggle:hover { | |
| background: var(--accent-primary); | |
| color: white; | |
| } | |
| /* Chat Container */ | |
| .chat-container { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| background: var(--card-bg); | |
| border-radius: var(--border-radius-lg); | |
| border: 1px solid var(--border); | |
| overflow: hidden; | |
| box-shadow: 0 10px 30px var(--shadow); | |
| backdrop-filter: blur(10px); | |
| } | |
| /* Messages Area */ | |
| .messages { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: var(--spacing-lg); | |
| display: flex; | |
| flex-direction: column; | |
| gap: var(--spacing-md); | |
| scroll-behavior: smooth; | |
| } | |
| .messages::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| .messages::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| .messages::-webkit-scrollbar-thumb { | |
| background: var(--accent-primary); | |
| border-radius: 10px; | |
| } | |
| .message { | |
| max-width: 80%; | |
| padding: var(--spacing-md) var(--spacing-lg); | |
| border-radius: var(--border-radius-md); | |
| line-height: 1.6; | |
| animation: fadeIn var(--animation-fast) ease-out; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .user-message { | |
| align-self: flex-end; | |
| background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); | |
| color: white; | |
| border-top-right-radius: 4px; | |
| } | |
| .user-message::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0)); | |
| pointer-events: none; | |
| } | |
| .bot-message { | |
| align-self: flex-start; | |
| background: var(--input-bg); | |
| color: var(--text-primary); | |
| border: 1px solid var(--border); | |
| border-top-left-radius: 4px; | |
| } | |
| .message-time { | |
| font-size: 0.7rem; | |
| opacity: 0.7; | |
| margin-top: var(--spacing-xs); | |
| text-align: right; | |
| } | |
| .message-avatar { | |
| width: 28px; | |
| height: 28px; | |
| border-radius: 50%; | |
| position: absolute; | |
| bottom: -10px; | |
| background: var(--accent-primary); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 0.8rem; | |
| color: white; | |
| } | |
| .user-message .message-avatar { | |
| right: -10px; | |
| } | |
| .bot-message .message-avatar { | |
| left: -10px; | |
| } | |
| /* Code Block Styling */ | |
| .code-block { | |
| font-family: 'Space Mono', monospace; | |
| background: var(--bg-primary); | |
| padding: var(--spacing-md); | |
| border-radius: var(--border-radius-sm); | |
| margin: var(--spacing-sm) 0; | |
| position: relative; | |
| overflow-x: auto; | |
| } | |
| .code-block::before { | |
| content: 'Python'; | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| background: var(--accent-primary); | |
| color: white; | |
| font-size: 0.7rem; | |
| padding: 2px 8px; | |
| border-bottom-left-radius: var(--border-radius-sm); | |
| } | |
| .copy-code { | |
| position: absolute; | |
| top: var(--spacing-xs); | |
| right: var(--spacing-xs); | |
| background: var(--accent-secondary); | |
| color: white; | |
| border: none; | |
| border-radius: var(--border-radius-sm); | |
| padding: 2px 6px; | |
| font-size: 0.7rem; | |
| cursor: pointer; | |
| opacity: 0; | |
| transition: opacity 0.3s ease; | |
| } | |
| .code-block:hover .copy-code { | |
| opacity: 1; | |
| } | |
| /* Typing Indicator */ | |
| .typing { | |
| display: flex; | |
| gap: var(--spacing-xs); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| align-self: flex-start; | |
| background: var(--input-bg); | |
| border-radius: var(--border-radius-md); | |
| margin-bottom: var(--spacing-md); | |
| } | |
| .typing-dot { | |
| width: 8px; | |
| height: 8px; | |
| background: var(--accent-primary); | |
| border-radius: 50%; | |
| animation: typing var(--animation-fast) infinite ease-in-out; | |
| } | |
| .typing-dot:nth-child(1) { animation-delay: 0s; } | |
| .typing-dot:nth-child(2) { animation-delay: 0.2s; } | |
| .typing-dot:nth-child(3) { animation-delay: 0.4s; } | |
| @keyframes typing { | |
| 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; } | |
| 30% { transform: translateY(-5px); opacity: 1; } | |
| } | |
| /* Input Area */ | |
| .input-area { | |
| display: flex; | |
| gap: var(--spacing-sm); | |
| padding: var(--spacing-md); | |
| background: var(--bg-secondary); | |
| border-top: 1px solid var(--border); | |
| position: relative; | |
| } | |
| .input-area::before { | |
| content: ''; | |
| position: absolute; | |
| top: -1px; | |
| left: 0; | |
| width: 100%; | |
| height: 1px; | |
| background: linear-gradient(90deg, transparent, var(--accent-primary), transparent); | |
| } | |
| #chatInput { | |
| flex: 1; | |
| border: 1px solid var(--border); | |
| background: var(--input-bg); | |
| color: var(--text-primary); | |
| padding: var(--spacing-md); | |
| border-radius: var(--border-radius-md); | |
| outline: none; | |
| font-family: 'Quicksand', sans-serif; | |
| transition: all 0.3s ease; | |
| backdrop-filter: blur(5px); | |
| } | |
| #chatInput:focus { | |
| border-color: var(--accent-primary); | |
| box-shadow: 0 0 0 2px var(--shadow); | |
| } | |
| #chatInput::placeholder { | |
| color: var(--text-secondary); | |
| opacity: 0.7; | |
| } | |
| #fileInput { | |
| display: none; | |
| } | |
| .input-button { | |
| background: var(--input-bg); | |
| border: 1px solid var(--border); | |
| color: var(--text-primary); | |
| width: 45px; | |
| height: 45px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| backdrop-filter: blur(5px); | |
| } | |
| .input-button:hover { | |
| background: var(--accent-primary); | |
| color: white; | |
| transform: translateY(-2px); | |
| } | |
| .input-button i { | |
| font-size: 1.2rem; | |
| } | |
| .send-btn { | |
| background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); | |
| border: none; | |
| color: white; | |
| } | |
| /* Feature Showcase */ | |
| .feature-showcase { | |
| display: none; | |
| padding: var(--spacing-lg); | |
| background: var(--card-bg); | |
| border-radius: var(--border-radius-lg); | |
| margin-bottom: var(--spacing-lg); | |
| border: 1px solid var(--border); | |
| box-shadow: 0 10px 30px var(--shadow); | |
| backdrop-filter: blur(10px); | |
| } | |
| .feature-showcase.active { | |
| display: block; | |
| animation: slideDown var(--animation-fast) ease-out; | |
| } | |
| @keyframes slideDown { | |
| from { opacity: 0; transform: translateY(-20px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .feature-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: var(--spacing-md); | |
| } | |
| .feature-card { | |
| background: var(--input-bg); | |
| border: 1px solid var(--border); | |
| border-radius: var(--border-radius-md); | |
| padding: var(--spacing-md); | |
| transition: all 0.3s ease; | |
| cursor: pointer; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .feature-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 5px 15px var(--shadow); | |
| } | |
| .feature-card::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 4px; | |
| height: 100%; | |
| background: var(--accent-primary); | |
| } | |
| .feature-card h3 { | |
| margin-bottom: var(--spacing-sm); | |
| font-weight: 600; | |
| } | |
| .feature-card p { | |
| font-size: 0.9rem; | |
| color: var(--text-secondary); | |
| } | |
| .feature-icon { | |
| font-size: 2rem; | |
| margin-bottom: var(--spacing-sm); | |
| background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); | |
| -webkit-background-clip: text; | |
| background-clip: text; | |
| color: transparent; | |
| } | |
| /* File Upload Preview */ | |
| .file-preview { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| background: var(--input-bg); | |
| border-radius: var(--border-radius-sm); | |
| margin-bottom: var(--spacing-sm); | |
| border: 1px dashed var(--border); | |
| animation: fadeIn var(--animation-fast) ease-out; | |
| } | |
| .file-preview-icon { | |
| font-size: 1.2rem; | |
| color: var(--accent-primary); | |
| } | |
| .file-preview-name { | |
| flex: 1; | |
| font-size: 0.9rem; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .file-preview-remove { | |
| background: none; | |
| border: none; | |
| color: var(--text-secondary); | |
| cursor: pointer; | |
| font-size: 1rem; | |
| transition: color 0.3s ease; | |
| } | |
| .file-preview-remove:hover { | |
| color: #ff4d4d; | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| .app-header { | |
| flex-direction: column; | |
| gap: var(--spacing-sm); | |
| text-align: center; | |
| } | |
| .message { | |
| max-width: 90%; | |
| } | |
| .feature-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| /* Dark/Light Theme Transitions */ | |
| .theme-transition { | |
| transition: background 0.5s ease, | |
| color 0.5s ease, | |
| border-color 0.5s ease, | |
| box-shadow 0.5s ease; | |
| } | |
| /* Light Theme Class */ | |
| body.light-theme { | |
| --bg-primary: var(--light-bg-primary); | |
| --bg-secondary: var(--light-bg-secondary); | |
| --accent-primary: var(--light-accent-primary); | |
| --accent-secondary: var(--light-accent-secondary); | |
| --text-primary: var(--light-text-primary); | |
| --text-secondary: var(--light-text-secondary); | |
| --border: var(--light-border); | |
| --shadow: var(--light-shadow); | |
| --gradient: var(--light-gradient); | |
| --card-bg: var(--light-card-bg); | |
| --input-bg: var(--light-input-bg); | |
| } | |
| /* Accessibility */ | |
| @media (prefers-reduced-motion: reduce) { | |
| * { | |
| animation-duration: 0.01ms ; | |
| animation-iteration-count: 1 ; | |
| transition-duration: 0.01ms ; | |
| scroll-behavior: auto ; | |
| } | |
| } | |
| /* Image Display */ | |
| .image-preview { | |
| max-width: 100%; | |
| border-radius: var(--border-radius-sm); | |
| margin: var(--spacing-sm) 0; | |
| } | |
| /* Markdown Content */ | |
| .markdown-content { | |
| line-height: 1.6; | |
| } | |
| .markdown-content h1, | |
| .markdown-content h2, | |
| .markdown-content h3 { | |
| margin-top: var(--spacing-md); | |
| margin-bottom: var(--spacing-sm); | |
| } | |
| .markdown-content p { | |
| margin-bottom: var(--spacing-sm); | |
| } | |
| .markdown-content ul, | |
| .markdown-content ol { | |
| margin-left: var(--spacing-lg); | |
| margin-bottom: var(--spacing-sm); | |
| } | |
| .markdown-content a { | |
| color: var(--accent-primary); | |
| text-decoration: none; | |
| } | |
| .markdown-content a:hover { | |
| text-decoration: underline; | |
| } | |
| /* Tooltip */ | |
| .tooltip { | |
| position: relative; | |
| } | |
| .tooltip::after { | |
| content: attr(data-tooltip); | |
| position: absolute; | |
| bottom: 100%; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| padding: var(--spacing-xs) var(--spacing-sm); | |
| border-radius: var(--border-radius-sm); | |
| font-size: 0.8rem; | |
| white-space: nowrap; | |
| opacity: 0; | |
| pointer-events: none; | |
| transition: opacity 0.3s ease; | |
| z-index: 10; | |
| box-shadow: 0 2px 10px var(--shadow); | |
| border: 1px solid var(--border); | |
| } | |
| .tooltip:hover::after { | |
| opacity: 1; | |
| } | |
| /* Loading Spinner */ | |
| .loading-spinner { | |
| width: 30px; | |
| height: 30px; | |
| border: 3px solid rgba(255, 255, 255, 0.3); | |
| border-radius: 50%; | |
| border-top-color: var(--accent-primary); | |
| animation: spin 1s ease-in-out infinite; | |
| margin: 0 auto; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |