Spaces:
Running
Running
| /* ======================================== | |
| MODERN AI CHATBOT - CUSTOMIZABLE STYLES | |
| ======================================== */ | |
| :root { | |
| /* ===== COLOR THEME ===== */ | |
| --primary: #6366f1; /* Deep Indigo */ | |
| --primary-dark: #4f46e5; /* Darker Indigo */ | |
| --primary-light: #818cf8; /* Light Indigo */ | |
| --secondary: #ec4899; /* Vibrant Magenta/Pink */ | |
| --secondary-dark: #db2777; /* Dark Magenta */ | |
| --secondary-light: #f472b6; /* Light Pink */ | |
| --accent: #06b6d4; /* Bright Cyan */ | |
| --accent-light: #22d3ee; /* Light Cyan */ | |
| --bg-gradient-1: #6366f1; /* Indigo */ | |
| --bg-gradient-2: #a855f7; /* Purple */ | |
| --text-dark: #1f2937; /* Dark Gray */ | |
| --text-light: #6b7280; /* Light Gray */ | |
| --text-white: #ffffff; /* White */ | |
| --bg-light: #f9fafb; /* Light Background */ | |
| --bg-chat: #f3f4f6; /* Chat Area Background */ | |
| --bg-white: #ffffff; /* Pure White */ | |
| --border-color: #e5e7eb; /* Border Gray */ | |
| --shadow: 0 10px 30px rgba(99, 102, 241, 0.15); | |
| /* ===== SPACING & SIZING ===== */ | |
| --radius-sm: 12px; | |
| --radius-md: 16px; | |
| --radius-lg: 24px; | |
| --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| html, body { | |
| height: 100%; | |
| width: 100%; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%); | |
| min-height: 100vh; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| padding: 20px; | |
| overflow: hidden; | |
| } | |
| /* ========== CONTAINER ========== */ | |
| .container { | |
| width: 100%; | |
| max-width: 750px; | |
| height: 90vh; | |
| max-height: 750px; | |
| background: var(--bg-white); | |
| border-radius: var(--radius-lg); | |
| box-shadow: var(--shadow); | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| /* ========== HEADER ========== */ | |
| .header { | |
| background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%); | |
| color: var(--text-white); | |
| padding: 20px 25px; | |
| } | |
| .header-top { | |
| margin-bottom: 15px; | |
| } | |
| .title { | |
| font-size: 26px; | |
| font-weight: 700; | |
| margin-bottom: 6px; | |
| letter-spacing: -0.5px; | |
| } | |
| .subtitle { | |
| font-size: 13px; | |
| opacity: 0.9; | |
| font-weight: 400; | |
| } | |
| .status-bar { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding-top: 12px; | |
| border-top: 1px solid rgba(255, 255, 255, 0.2); | |
| } | |
| .status-dot { | |
| width: 8px; | |
| height: 8px; | |
| background: var(--accent); | |
| border-radius: 50%; | |
| animation: pulse 2s infinite; | |
| } | |
| .status-dot.active { | |
| background: #10b981; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { | |
| opacity: 1; | |
| transform: scale(1); | |
| } | |
| 50% { | |
| opacity: 0.6; | |
| transform: scale(1.2); | |
| } | |
| } | |
| #status { | |
| font-size: 12px; | |
| font-weight: 500; | |
| letter-spacing: 0.5px; | |
| } | |
| /* ========== CHAT AREA ========== */ | |
| .chat-area { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 20px; | |
| background: var(--bg-chat); | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| } | |
| /* Scrollbar Styling */ | |
| .chat-area::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| .chat-area::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| .chat-area::-webkit-scrollbar-thumb { | |
| background: var(--primary-light); | |
| border-radius: 3px; | |
| } | |
| .chat-area::-webkit-scrollbar-thumb:hover { | |
| background: var(--primary); | |
| } | |
| /* Empty State */ | |
| .empty-state { | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100%; | |
| color: var(--text-light); | |
| text-align: center; | |
| } | |
| .empty-icon { | |
| font-size: 48px; | |
| margin-bottom: 15px; | |
| opacity: 0.7; | |
| } | |
| .empty-state p { | |
| font-size: 16px; | |
| font-weight: 600; | |
| color: var(--text-dark); | |
| margin-bottom: 8px; | |
| } | |
| .empty-state small { | |
| font-size: 12px; | |
| color: var(--text-light); | |
| } | |
| /* Messages */ | |
| .message { | |
| display: flex; | |
| animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); | |
| } | |
| @keyframes slideIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| /* User Message */ | |
| .user-message { | |
| justify-content: flex-end; | |
| } | |
| .user-message .text { | |
| background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); | |
| color: var(--text-white); | |
| padding: 12px 16px; | |
| border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md); | |
| max-width: 70%; | |
| word-wrap: break-word; | |
| font-size: 14px; | |
| line-height: 1.4; | |
| box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25); | |
| } | |
| /* Bot Message */ | |
| .bot-message { | |
| justify-content: flex-start; | |
| } | |
| .bot-message .text { | |
| background: var(--bg-white); | |
| color: var(--text-dark); | |
| padding: 12px 16px; | |
| border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px; | |
| max-width: 70%; | |
| word-wrap: break-word; | |
| font-size: 14px; | |
| line-height: 1.4; | |
| border: 1.5px solid var(--accent-light); | |
| box-shadow: 0 2px 8px rgba(6, 182, 212, 0.1); | |
| } | |
| /* Status Message */ | |
| .status-message { | |
| justify-content: center; | |
| } | |
| .status-message .text { | |
| background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); | |
| color: var(--primary); | |
| padding: 10px 14px; | |
| border-radius: var(--radius-sm); | |
| font-size: 12px; | |
| border: 1px solid var(--accent-light); | |
| text-align: center; | |
| font-weight: 500; | |
| } | |
| .message .text { | |
| word-break: break-word; | |
| overflow-wrap: break-word; | |
| } | |
| /* ========== INPUT AREA ========== */ | |
| .input-container { | |
| padding: 15px 20px; | |
| background: var(--bg-white); | |
| border-top: 1px solid var(--border-color); | |
| } | |
| .input-area { | |
| display: flex; | |
| gap: 10px; | |
| margin-bottom: 8px; | |
| } | |
| input { | |
| flex: 1; | |
| border: 1.5px solid var(--border-color); | |
| border-radius: 25px; | |
| padding: 12px 18px; | |
| font-size: 14px; | |
| outline: none; | |
| background: var(--bg-light); | |
| color: var(--text-dark); | |
| transition: var(--transition); | |
| } | |
| input::placeholder { | |
| color: var(--text-light); | |
| } | |
| input:focus { | |
| border-color: var(--accent); | |
| background: var(--bg-white); | |
| box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1); | |
| } | |
| input:disabled { | |
| background: var(--bg-light); | |
| cursor: not-allowed; | |
| opacity: 0.6; | |
| } | |
| .send-button { | |
| width: 45px; | |
| height: 45px; | |
| border: none; | |
| border-radius: 50%; | |
| background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); | |
| color: var(--text-white); | |
| cursor: pointer; | |
| font-size: 20px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| transition: var(--transition); | |
| box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3); | |
| } | |
| .send-button:hover:not(:disabled) { | |
| transform: translateY(-3px) scale(1.05); | |
| box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4); | |
| } | |
| .send-button:active:not(:disabled) { | |
| transform: translateY(-1px) scale(0.98); | |
| } | |
| .send-button:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| .send-icon { | |
| display: inline-block; | |
| transition: var(--transition); | |
| } | |
| .send-button:hover:not(:disabled) .send-icon { | |
| animation: sparkle 0.6s ease-in-out; | |
| } | |
| @keyframes sparkle { | |
| 0%, 100% { transform: rotate(0deg) scale(1); } | |
| 50% { transform: rotate(180deg) scale(1.1); } | |
| } | |
| .hint { | |
| font-size: 11px; | |
| color: var(--text-light); | |
| text-align: center; | |
| margin: 0; | |
| } | |
| /* ========== RESPONSIVE ========== */ | |
| @media (max-width: 600px) { | |
| .container { | |
| max-width: 100%; | |
| height: 100vh; | |
| max-height: 100vh; | |
| border-radius: 16px; | |
| } | |
| .title { | |
| font-size: 22px; | |
| } | |
| .subtitle { | |
| font-size: 12px; | |
| } | |
| .user-message .text, | |
| .bot-message .text { | |
| max-width: 85%; | |
| font-size: 13px; | |
| } | |
| input { | |
| font-size: 16px; | |
| padding: 10px 14px; | |
| } | |
| .send-button { | |
| width: 40px; | |
| height: 40px; | |
| font-size: 18px; | |
| } | |
| } |