Spaces:
Running
Running
Refactor CSS variables and styles for improved theme consistency; enhance user message and assistant message styling for better visual clarity and aesthetics.
Browse files
style.css
CHANGED
|
@@ -1,66 +1,73 @@
|
|
| 1 |
/* ============================================
|
| 2 |
COLOR PALETTE FOR LIGHT AND DARK THEMES
|
| 3 |
============================================ */
|
| 4 |
-
:root {
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
/* Border & Shadow Colors */
|
| 53 |
--border-light: #E5E7EB;
|
| 54 |
--border-dark: #374151;
|
| 55 |
--shadow-light: rgba(0, 0, 0, 0.1);
|
| 56 |
--shadow-purple: rgba(124, 58, 237, 0.3);
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
--
|
| 60 |
-
--
|
| 61 |
-
--
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
/* Modern title styling - Purple with subtle shadow */
|
| 65 |
.prose h1 {
|
| 66 |
font-size: 2.5rem !important;
|
|
@@ -74,15 +81,15 @@
|
|
| 74 |
|
| 75 |
/* Deep purple with subtle shadow for depth */
|
| 76 |
color: var(--primary-purple-dark) !important;
|
| 77 |
-
text-shadow: 0 2px 8px
|
| 78 |
}
|
| 79 |
|
| 80 |
/* Dark theme title - Lighter purple with glow */
|
| 81 |
.dark .prose h1 {
|
| 82 |
color: var(--primary-purple-lighter) !important;
|
| 83 |
-
text-shadow: 0 2px 12px
|
| 84 |
}
|
| 85 |
-
|
| 86 |
/* Description styling - Target markdown div (not paragraphs which are used in chat) */
|
| 87 |
/* The description is rendered as: .prose > .md > div */
|
| 88 |
.prose .md > div,
|
|
@@ -94,76 +101,76 @@
|
|
| 94 |
margin: 0.75rem auto 1.5rem auto !important;
|
| 95 |
padding: 1.25rem 1.5rem !important;
|
| 96 |
max-width: 700px !important;
|
| 97 |
-
color:
|
| 98 |
-
background-color:
|
| 99 |
border-radius: 16px !important;
|
| 100 |
-
box-shadow:
|
| 101 |
display: block !important;
|
| 102 |
position: relative !important;
|
| 103 |
|
| 104 |
/* Multi-color gradient border */
|
| 105 |
border: 2px solid transparent !important;
|
| 106 |
background-image:
|
| 107 |
-
linear-gradient(
|
| 108 |
linear-gradient(
|
| 109 |
90deg,
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
) !important;
|
| 119 |
background-origin: border-box !important;
|
| 120 |
background-clip: padding-box, border-box !important;
|
| 121 |
}
|
| 122 |
-
|
| 123 |
-
/* Bold text styling within description */
|
| 124 |
-
.prose .md > div strong,
|
| 125 |
-
.app-description strong {
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
}
|
| 129 |
-
|
| 130 |
/* Dark theme description */
|
| 131 |
@media (prefers-color-scheme: dark) {
|
| 132 |
.prose .md > div,
|
| 133 |
.app-description {
|
| 134 |
-
color:
|
| 135 |
-
background-color:
|
| 136 |
-
box-shadow:
|
| 137 |
|
| 138 |
/* Multi-color gradient border for dark theme */
|
| 139 |
background-image:
|
| 140 |
-
linear-gradient(
|
| 141 |
linear-gradient(
|
| 142 |
90deg,
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
) !important;
|
| 152 |
}
|
| 153 |
|
| 154 |
/* Dark theme bold text in description */
|
| 155 |
.prose .md > div strong,
|
| 156 |
.app-description strong {
|
| 157 |
-
color:
|
| 158 |
}
|
| 159 |
}
|
| 160 |
-
|
| 161 |
/* Also support .dark class for manual theme switching */
|
| 162 |
.dark .prose .md > div,
|
| 163 |
.dark .app-description {
|
| 164 |
-
color:
|
| 165 |
-
background-color:
|
| 166 |
-
box-shadow:
|
| 167 |
|
| 168 |
/* Multi-color gradient border for dark theme */
|
| 169 |
background-image:
|
|
@@ -184,244 +191,244 @@
|
|
| 184 |
/* Dark theme bold text in description */
|
| 185 |
.dark .prose .md > div strong,
|
| 186 |
.dark .app-description strong {
|
| 187 |
-
color: var(--primary-purple-
|
| 188 |
-
}
|
| 189 |
-
|
| 190 |
-
/* ============================================
|
| 191 |
-
CHATBOT STYLING - Modern and Clean
|
| 192 |
-
============================================ */
|
| 193 |
-
|
| 194 |
-
/* Chat container */
|
| 195 |
-
.chatbot, [data-testid="chatbot"] {
|
| 196 |
-
border-radius: var(--card-radius) !important;
|
| 197 |
-
box-shadow: var(--card-shadow-light) !important;
|
| 198 |
-
}
|
| 199 |
-
|
| 200 |
-
/* User messages - Purple accent */
|
| 201 |
-
.message.user,
|
| 202 |
-
.user-message,
|
| 203 |
-
[data-testid="user-message"] {
|
| 204 |
-
background: linear-gradient(135deg, var(--primary-purple-light) 0%, var(--primary-purple) 100%) !important;
|
| 205 |
-
color: white !important;
|
| 206 |
-
border-radius: 18px 18px 4px 18px !important;
|
| 207 |
-
padding: 0.875rem 1.125rem !important;
|
| 208 |
-
margin: 0.5rem 0 !important;
|
| 209 |
-
box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25) !important;
|
| 210 |
-
margin-left: auto !important;
|
| 211 |
-
}
|
| 212 |
-
|
| 213 |
-
/* Force white text for all content inside user messages */
|
| 214 |
-
.message.user *,
|
| 215 |
-
.user-message *,
|
| 216 |
-
[data-testid="user-message"] *,
|
| 217 |
-
.user-row *,
|
| 218 |
-
.message.user p,
|
| 219 |
-
.message.user span,
|
| 220 |
-
.message.user div {
|
| 221 |
-
color: white !important;
|
| 222 |
-
}
|
| 223 |
-
|
| 224 |
-
/* Assistant messages - Light background */
|
| 225 |
-
.message.bot,
|
| 226 |
-
.bot-message,
|
| 227 |
-
[data-testid="bot-message"] {
|
| 228 |
-
background: var(--bg-light-card) !important;
|
| 229 |
-
color: var(--text-light-primary) !important;
|
| 230 |
-
border-radius: 18px 18px 18px 4px !important;
|
| 231 |
-
padding: 0.875rem 1.125rem !important;
|
| 232 |
-
margin: 0.5rem 0 !important;
|
| 233 |
-
border: 1px solid var(--border-light) !important;
|
| 234 |
-
box-shadow: var(--card-shadow-light) !important;
|
| 235 |
-
max-width: 80% !important;
|
| 236 |
-
margin-right: auto !important;
|
| 237 |
-
}
|
| 238 |
-
|
| 239 |
-
/* Input textarea */
|
| 240 |
-
textarea,
|
| 241 |
-
.gr-textbox textarea,
|
| 242 |
-
[data-testid="textbox"] {
|
| 243 |
-
background: var(--bg-light-card) !important;
|
| 244 |
-
color: var(--text-light-primary) !important;
|
| 245 |
-
border: 2px solid var(--border-light) !important;
|
| 246 |
-
border-radius: 12px !important;
|
| 247 |
-
padding: 0.75rem 1rem !important;
|
| 248 |
-
font-size: 1rem !important;
|
| 249 |
-
transition: all 0.2s ease !important;
|
| 250 |
-
}
|
| 251 |
-
|
| 252 |
-
textarea:focus,
|
| 253 |
-
.gr-textbox textarea:focus {
|
| 254 |
-
border-color: var(--primary-purple) !important;
|
| 255 |
-
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
|
| 256 |
-
outline: none !important;
|
| 257 |
-
}
|
| 258 |
-
|
| 259 |
-
/* Submit button and action buttons */
|
| 260 |
-
button[type="submit"],
|
| 261 |
-
.submit-button,
|
| 262 |
-
button.primary {
|
| 263 |
-
background: var(--gradient-purple) !important;
|
| 264 |
-
color: white !important;
|
| 265 |
-
border: none !important;
|
| 266 |
-
border-radius: 12px !important;
|
| 267 |
-
padding: 0.625rem 1.5rem !important;
|
| 268 |
-
font-weight: 600 !important;
|
| 269 |
-
transition: all 0.2s ease !important;
|
| 270 |
-
box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25) !important;
|
| 271 |
-
}
|
| 272 |
-
|
| 273 |
-
button[type="submit"]:hover,
|
| 274 |
-
.submit-button:hover,
|
| 275 |
-
button.primary:hover {
|
| 276 |
-
background: var(--primary-purple-dark) !important;
|
| 277 |
-
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35) !important;
|
| 278 |
-
transform: translateY(-1px) !important;
|
| 279 |
-
}
|
| 280 |
-
|
| 281 |
-
/* Example buttons */
|
| 282 |
-
.example,
|
| 283 |
-
button.example {
|
| 284 |
-
background: var(--bg-light-secondary) !important;
|
| 285 |
-
color: var(--text-light-primary) !important;
|
| 286 |
-
border: 1px solid var(--border-light) !important;
|
| 287 |
-
border-radius: 12px !important;
|
| 288 |
-
padding: 0.75rem 1rem !important;
|
| 289 |
-
transition: all 0.2s ease !important;
|
| 290 |
-
}
|
| 291 |
-
|
| 292 |
-
.example:hover,
|
| 293 |
-
button.example:hover {
|
| 294 |
-
background: var(--bg-light-tertiary) !important;
|
| 295 |
-
border-color: var(--primary-purple-light) !important;
|
| 296 |
-
transform: translateY(-2px) !important;
|
| 297 |
-
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15) !important;
|
| 298 |
-
}
|
| 299 |
-
|
| 300 |
-
/* Scrollbar styling */
|
| 301 |
-
.chatbot::-webkit-scrollbar,
|
| 302 |
-
[data-testid="chatbot"]::-webkit-scrollbar {
|
| 303 |
-
width: 8px;
|
| 304 |
-
}
|
| 305 |
-
|
| 306 |
-
.chatbot::-webkit-scrollbar-track,
|
| 307 |
-
[data-testid="chatbot"]::-webkit-scrollbar-track {
|
| 308 |
-
background: var(--bg-light-secondary);
|
| 309 |
-
border-radius: 10px;
|
| 310 |
-
}
|
| 311 |
-
|
| 312 |
-
.chatbot::-webkit-scrollbar-thumb,
|
| 313 |
-
[data-testid="chatbot"]::-webkit-scrollbar-thumb {
|
| 314 |
-
background: var(--primary-purple-light);
|
| 315 |
-
border-radius: 10px;
|
| 316 |
-
}
|
| 317 |
-
|
| 318 |
-
.chatbot::-webkit-scrollbar-thumb:hover,
|
| 319 |
-
[data-testid="chatbot"]::-webkit-scrollbar-thumb:hover {
|
| 320 |
-
background: var(--primary-purple);
|
| 321 |
-
}
|
| 322 |
-
|
| 323 |
-
/* ============================================
|
| 324 |
-
DARK THEME STYLES
|
| 325 |
-
============================================ */
|
| 326 |
-
|
| 327 |
-
.dark :root, .dark .gradio-container { color-scheme: dark; }
|
| 328 |
-
.dark body, .dark .gradio-container { background: var(--bg-dark-primary); }
|
| 329 |
-
.dark .prose, .dark .gr-text, .dark .gr-form { color: var(--text-dark-secondary); }
|
| 330 |
-
|
| 331 |
-
/* Dark theme - Chat container */
|
| 332 |
-
.dark .chatbot,
|
| 333 |
-
.dark [data-testid="chatbot"] {
|
| 334 |
-
border-color: var(--border-dark) !important;
|
| 335 |
-
box-shadow: var(--card-shadow-dark) !important;
|
| 336 |
-
}
|
| 337 |
-
|
| 338 |
-
/* Dark theme - User messages */
|
| 339 |
-
.dark .message.user,
|
| 340 |
-
.dark .user-message,
|
| 341 |
-
.dark [data-testid="user-message"] {
|
| 342 |
-
background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%) !important;
|
| 343 |
-
color: white !important;
|
| 344 |
-
box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4) !important;
|
| 345 |
-
}
|
| 346 |
-
|
| 347 |
-
/* Dark theme - Force white text in user messages */
|
| 348 |
-
.dark .message.user *,
|
| 349 |
-
.dark .user-message *,
|
| 350 |
-
.dark [data-testid="user-message"] *,
|
| 351 |
-
.dark .user-row *,
|
| 352 |
-
.dark .message.user p,
|
| 353 |
-
.dark .message.user span,
|
| 354 |
-
.dark .message.user div {
|
| 355 |
-
color: white !important;
|
| 356 |
-
}
|
| 357 |
-
|
| 358 |
-
/* Dark theme - Assistant messages */
|
| 359 |
-
.dark .message.bot,
|
| 360 |
-
.dark .bot-message,
|
| 361 |
-
.dark [data-testid="bot-message"] {
|
| 362 |
-
background: var(--bg-dark-card) !important;
|
| 363 |
-
color: var(--text-dark-primary) !important;
|
| 364 |
-
border-color: var(--border-dark) !important;
|
| 365 |
-
box-shadow: var(--card-shadow-dark) !important;
|
| 366 |
-
}
|
| 367 |
-
|
| 368 |
-
/* Dark theme - Input */
|
| 369 |
-
.dark textarea,
|
| 370 |
-
.dark .gr-textbox textarea,
|
| 371 |
-
.dark [data-testid="textbox"] {
|
| 372 |
-
background: var(--bg-dark-secondary) !important;
|
| 373 |
-
color: var(--text-dark-primary) !important;
|
| 374 |
-
border-color: var(--border-dark) !important;
|
| 375 |
-
}
|
| 376 |
-
|
| 377 |
-
.dark textarea:focus,
|
| 378 |
-
.dark .gr-textbox textarea:focus {
|
| 379 |
-
border-color: var(--primary-purple-light) !important;
|
| 380 |
-
box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2) !important;
|
| 381 |
-
}
|
| 382 |
-
|
| 383 |
-
/* Dark theme - Buttons */
|
| 384 |
-
.dark button[type="submit"],
|
| 385 |
-
.dark .submit-button,
|
| 386 |
-
.dark button.primary {
|
| 387 |
-
background: var(--gradient-purple) !important;
|
| 388 |
-
box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4) !important;
|
| 389 |
-
}
|
| 390 |
-
|
| 391 |
-
.dark button[type="submit"]:hover,
|
| 392 |
-
.dark .submit-button:hover,
|
| 393 |
-
.dark button.primary:hover {
|
| 394 |
-
background: var(--primary-purple-light) !important;
|
| 395 |
-
box-shadow: 0 4px 12px rgba(167, 139, 250, 0.5) !important;
|
| 396 |
-
}
|
| 397 |
-
|
| 398 |
-
/* Dark theme - Example buttons */
|
| 399 |
-
.dark .example,
|
| 400 |
-
.dark button.example {
|
| 401 |
-
background: var(--bg-dark-card) !important;
|
| 402 |
-
color: var(--text-dark-primary) !important;
|
| 403 |
-
border-color: var(--border-dark) !important;
|
| 404 |
-
}
|
| 405 |
-
|
| 406 |
-
.dark .example:hover,
|
| 407 |
-
.dark button.example:hover {
|
| 408 |
-
background: var(--bg-dark-secondary) !important;
|
| 409 |
-
border-color: var(--primary-purple-light) !important;
|
| 410 |
-
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25) !important;
|
| 411 |
-
}
|
| 412 |
-
|
| 413 |
-
/* Dark theme - Scrollbar */
|
| 414 |
-
.dark .chatbot::-webkit-scrollbar-track,
|
| 415 |
-
.dark [data-testid="chatbot"]::-webkit-scrollbar-track {
|
| 416 |
-
background: var(--bg-dark-secondary);
|
| 417 |
-
}
|
| 418 |
-
|
| 419 |
-
.dark .chatbot::-webkit-scrollbar-thumb,
|
| 420 |
-
.dark [data-testid="chatbot"]::-webkit-scrollbar-thumb {
|
| 421 |
-
background: var(--primary-purple);
|
| 422 |
}
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
/* ============================================
|
| 2 |
COLOR PALETTE FOR LIGHT AND DARK THEMES
|
| 3 |
============================================ */
|
| 4 |
+
:root {
|
| 5 |
+
/* Primary Purple Colors */
|
| 6 |
+
--primary-purple: #7C3AED;
|
| 7 |
+
--primary-purple-light: #8B5CF6;
|
| 8 |
+
--primary-purple-lighter: #A78BFA;
|
| 9 |
+
--primary-purple-dark: #6D28D9;
|
| 10 |
+
|
| 11 |
+
/* Secondary Purple/Pink Colors */
|
| 12 |
+
--secondary-purple: #9333EA;
|
| 13 |
+
--secondary-pink: #EC4899;
|
| 14 |
+
--secondary-pink-light: #F472B6;
|
| 15 |
+
|
| 16 |
+
/* Accent Colors */
|
| 17 |
+
--accent-coral: #FF7B7B;
|
| 18 |
+
--accent-salmon: #FF8F8F;
|
| 19 |
+
--accent-green: #10B981;
|
| 20 |
+
--accent-teal: #14B8A6;
|
| 21 |
+
--accent-yellow: #FBBF24;
|
| 22 |
+
--accent-orange: #FB923C;
|
| 23 |
+
|
| 24 |
+
/* Background Colors - Light Theme */
|
| 25 |
+
--bg-light-primary: #FFFFFF;
|
| 26 |
+
--bg-light-secondary: #F9FAFB;
|
| 27 |
+
--bg-light-tertiary: #F3F4F6;
|
| 28 |
+
--bg-light-card: #FFFFFF;
|
| 29 |
+
|
| 30 |
+
/* Background Colors - Dark Theme */
|
| 31 |
+
--bg-dark-primary: #0F172A;
|
| 32 |
+
--bg-dark-secondary: #1E293B;
|
| 33 |
+
--bg-dark-tertiary: #334155;
|
| 34 |
+
--bg-dark-card: #1E293B;
|
| 35 |
+
|
| 36 |
+
/* Text Colors - Light Theme */
|
| 37 |
+
--text-light-primary: #111827;
|
| 38 |
+
--text-light-secondary: #4B5563;
|
| 39 |
+
--text-light-tertiary: #9CA3AF;
|
| 40 |
+
|
| 41 |
+
/* Text Colors - Dark Theme */
|
| 42 |
+
--text-dark-primary: #F9FAFB;
|
| 43 |
+
--text-dark-secondary: #E5E7EB;
|
| 44 |
+
--text-dark-tertiary: #9CA3AF;
|
| 45 |
+
|
| 46 |
+
/* Gradient Backgrounds */
|
| 47 |
+
--gradient-purple: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
|
| 48 |
+
--gradient-purple-pink: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
|
| 49 |
+
--gradient-blue-purple: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
|
| 50 |
+
--gradient-coral: linear-gradient(135deg, #FF8F8F 0%, #FF7B7B 100%);
|
| 51 |
+
|
| 52 |
/* Border & Shadow Colors */
|
| 53 |
--border-light: #E5E7EB;
|
| 54 |
--border-dark: #374151;
|
| 55 |
--shadow-light: rgba(0, 0, 0, 0.1);
|
| 56 |
--shadow-purple: rgba(124, 58, 237, 0.3);
|
| 57 |
+
--shadow-purple-sm: rgba(124, 58, 237, 0.1);
|
| 58 |
+
--shadow-purple-md: rgba(124, 58, 237, 0.15);
|
| 59 |
+
--shadow-purple-lg: rgba(124, 58, 237, 0.25);
|
| 60 |
+
--shadow-purple-xl: rgba(124, 58, 237, 0.35);
|
| 61 |
+
--shadow-purple-2xl: rgba(124, 58, 237, 0.4);
|
| 62 |
+
--shadow-purple-light: rgba(167, 139, 250, 0.2);
|
| 63 |
+
--shadow-purple-light-lg: rgba(167, 139, 250, 0.5);
|
| 64 |
+
|
| 65 |
+
/* Card & Surface */
|
| 66 |
+
--card-radius: 20px;
|
| 67 |
+
--card-shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 68 |
+
--card-shadow-dark: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
/* Modern title styling - Purple with subtle shadow */
|
| 72 |
.prose h1 {
|
| 73 |
font-size: 2.5rem !important;
|
|
|
|
| 81 |
|
| 82 |
/* Deep purple with subtle shadow for depth */
|
| 83 |
color: var(--primary-purple-dark) !important;
|
| 84 |
+
text-shadow: 0 2px 8px var(--shadow-purple) !important;
|
| 85 |
}
|
| 86 |
|
| 87 |
/* Dark theme title - Lighter purple with glow */
|
| 88 |
.dark .prose h1 {
|
| 89 |
color: var(--primary-purple-lighter) !important;
|
| 90 |
+
text-shadow: 0 2px 12px var(--shadow-purple) !important;
|
| 91 |
}
|
| 92 |
+
|
| 93 |
/* Description styling - Target markdown div (not paragraphs which are used in chat) */
|
| 94 |
/* The description is rendered as: .prose > .md > div */
|
| 95 |
.prose .md > div,
|
|
|
|
| 101 |
margin: 0.75rem auto 1.5rem auto !important;
|
| 102 |
padding: 1.25rem 1.5rem !important;
|
| 103 |
max-width: 700px !important;
|
| 104 |
+
color: var(--text-light-secondary) !important;
|
| 105 |
+
background-color: var(--bg-light-secondary) !important;
|
| 106 |
border-radius: 16px !important;
|
| 107 |
+
box-shadow: var(--card-shadow-light) !important;
|
| 108 |
display: block !important;
|
| 109 |
position: relative !important;
|
| 110 |
|
| 111 |
/* Multi-color gradient border */
|
| 112 |
border: 2px solid transparent !important;
|
| 113 |
background-image:
|
| 114 |
+
linear-gradient(var(--bg-light-secondary), var(--bg-light-secondary)),
|
| 115 |
linear-gradient(
|
| 116 |
90deg,
|
| 117 |
+
var(--primary-purple) 0%,
|
| 118 |
+
var(--secondary-pink) 14%,
|
| 119 |
+
var(--accent-salmon) 28%,
|
| 120 |
+
var(--accent-orange) 42%,
|
| 121 |
+
var(--accent-yellow) 57%,
|
| 122 |
+
var(--accent-green) 71%,
|
| 123 |
+
var(--accent-teal) 85%,
|
| 124 |
+
var(--primary-purple-light) 100%
|
| 125 |
) !important;
|
| 126 |
background-origin: border-box !important;
|
| 127 |
background-clip: padding-box, border-box !important;
|
| 128 |
}
|
| 129 |
+
|
| 130 |
+
/* Bold text styling within description */
|
| 131 |
+
.prose .md > div strong,
|
| 132 |
+
.app-description strong {
|
| 133 |
+
color: var(--primary-purple) !important;
|
| 134 |
+
font-weight: 600 !important;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
/* Dark theme description */
|
| 138 |
@media (prefers-color-scheme: dark) {
|
| 139 |
.prose .md > div,
|
| 140 |
.app-description {
|
| 141 |
+
color: var(--text-dark-secondary) !important;
|
| 142 |
+
background-color: var(--bg-dark-card) !important;
|
| 143 |
+
box-shadow: var(--card-shadow-dark) !important;
|
| 144 |
|
| 145 |
/* Multi-color gradient border for dark theme */
|
| 146 |
background-image:
|
| 147 |
+
linear-gradient(var(--bg-dark-card), var(--bg-dark-card)),
|
| 148 |
linear-gradient(
|
| 149 |
90deg,
|
| 150 |
+
var(--primary-purple) 0%,
|
| 151 |
+
var(--secondary-pink) 14%,
|
| 152 |
+
var(--accent-salmon) 28%,
|
| 153 |
+
var(--accent-orange) 42%,
|
| 154 |
+
var(--accent-yellow) 57%,
|
| 155 |
+
var(--accent-green) 71%,
|
| 156 |
+
var(--accent-teal) 85%,
|
| 157 |
+
var(--primary-purple-light) 100%
|
| 158 |
) !important;
|
| 159 |
}
|
| 160 |
|
| 161 |
/* Dark theme bold text in description */
|
| 162 |
.prose .md > div strong,
|
| 163 |
.app-description strong {
|
| 164 |
+
color: var(--primary-purple-lighter) !important;
|
| 165 |
}
|
| 166 |
}
|
| 167 |
+
|
| 168 |
/* Also support .dark class for manual theme switching */
|
| 169 |
.dark .prose .md > div,
|
| 170 |
.dark .app-description {
|
| 171 |
+
color: var(--text-dark-secondary) !important;
|
| 172 |
+
background-color: var(--bg-dark-card) !important;
|
| 173 |
+
box-shadow: var(--card-shadow-dark) !important;
|
| 174 |
|
| 175 |
/* Multi-color gradient border for dark theme */
|
| 176 |
background-image:
|
|
|
|
| 191 |
/* Dark theme bold text in description */
|
| 192 |
.dark .prose .md > div strong,
|
| 193 |
.dark .app-description strong {
|
| 194 |
+
color: var(--primary-purple-lighter) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
}
|
| 196 |
+
|
| 197 |
+
/* ============================================
|
| 198 |
+
CHATBOT STYLING - Modern and Clean
|
| 199 |
+
============================================ */
|
| 200 |
+
|
| 201 |
+
/* Chat container */
|
| 202 |
+
.chatbot, [data-testid="chatbot"] {
|
| 203 |
+
border-radius: var(--card-radius) !important;
|
| 204 |
+
box-shadow: var(--card-shadow-light) !important;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
/* User messages - Purple accent */
|
| 208 |
+
.message.user,
|
| 209 |
+
.user-message,
|
| 210 |
+
[data-testid="user-message"] {
|
| 211 |
+
background: linear-gradient(135deg, var(--primary-purple-light) 0%, var(--primary-purple) 100%) !important;
|
| 212 |
+
color: white !important;
|
| 213 |
+
border-radius: 18px 18px 4px 18px !important;
|
| 214 |
+
padding: 0.875rem 1.125rem !important;
|
| 215 |
+
margin: 0.5rem 0 !important;
|
| 216 |
+
box-shadow: 0 2px 8px var(--shadow-purple-lg) !important;
|
| 217 |
+
margin-left: auto !important;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
/* Force white text for all content inside user messages */
|
| 221 |
+
.message.user *,
|
| 222 |
+
.user-message *,
|
| 223 |
+
[data-testid="user-message"] *,
|
| 224 |
+
.user-row *,
|
| 225 |
+
.message.user p,
|
| 226 |
+
.message.user span,
|
| 227 |
+
.message.user div {
|
| 228 |
+
color: white !important;
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
/* Assistant messages - Light background */
|
| 232 |
+
.message.bot,
|
| 233 |
+
.bot-message,
|
| 234 |
+
[data-testid="bot-message"] {
|
| 235 |
+
background: var(--bg-light-card) !important;
|
| 236 |
+
color: var(--text-light-primary) !important;
|
| 237 |
+
border-radius: 18px 18px 18px 4px !important;
|
| 238 |
+
padding: 0.875rem 1.125rem !important;
|
| 239 |
+
margin: 0.5rem 0 !important;
|
| 240 |
+
border: 1px solid var(--border-light) !important;
|
| 241 |
+
box-shadow: var(--card-shadow-light) !important;
|
| 242 |
+
max-width: 80% !important;
|
| 243 |
+
margin-right: auto !important;
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
/* Input textarea */
|
| 247 |
+
textarea,
|
| 248 |
+
.gr-textbox textarea,
|
| 249 |
+
[data-testid="textbox"] {
|
| 250 |
+
background: var(--bg-light-card) !important;
|
| 251 |
+
color: var(--text-light-primary) !important;
|
| 252 |
+
border: 2px solid var(--border-light) !important;
|
| 253 |
+
border-radius: 12px !important;
|
| 254 |
+
padding: 0.75rem 1rem !important;
|
| 255 |
+
font-size: 1rem !important;
|
| 256 |
+
transition: all 0.2s ease !important;
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
textarea:focus,
|
| 260 |
+
.gr-textbox textarea:focus {
|
| 261 |
+
border-color: var(--primary-purple) !important;
|
| 262 |
+
box-shadow: 0 0 0 3px var(--shadow-purple-sm) !important;
|
| 263 |
+
outline: none !important;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
/* Submit button and action buttons */
|
| 267 |
+
button[type="submit"],
|
| 268 |
+
.submit-button,
|
| 269 |
+
button.primary {
|
| 270 |
+
background: var(--gradient-purple) !important;
|
| 271 |
+
color: white !important;
|
| 272 |
+
border: none !important;
|
| 273 |
+
border-radius: 12px !important;
|
| 274 |
+
padding: 0.625rem 1.5rem !important;
|
| 275 |
+
font-weight: 600 !important;
|
| 276 |
+
transition: all 0.2s ease !important;
|
| 277 |
+
box-shadow: 0 2px 8px var(--shadow-purple-lg) !important;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
button[type="submit"]:hover,
|
| 281 |
+
.submit-button:hover,
|
| 282 |
+
button.primary:hover {
|
| 283 |
+
background: var(--primary-purple-dark) !important;
|
| 284 |
+
box-shadow: 0 4px 12px var(--shadow-purple-xl) !important;
|
| 285 |
+
transform: translateY(-1px) !important;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
/* Example buttons */
|
| 289 |
+
.example,
|
| 290 |
+
button.example {
|
| 291 |
+
background: var(--bg-light-secondary) !important;
|
| 292 |
+
color: var(--text-light-primary) !important;
|
| 293 |
+
border: 1px solid var(--border-light) !important;
|
| 294 |
+
border-radius: 12px !important;
|
| 295 |
+
padding: 0.75rem 1rem !important;
|
| 296 |
+
transition: all 0.2s ease !important;
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
.example:hover,
|
| 300 |
+
button.example:hover {
|
| 301 |
+
background: var(--bg-light-tertiary) !important;
|
| 302 |
+
border-color: var(--primary-purple-light) !important;
|
| 303 |
+
transform: translateY(-2px) !important;
|
| 304 |
+
box-shadow: 0 4px 12px var(--shadow-purple-md) !important;
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
/* Scrollbar styling */
|
| 308 |
+
.chatbot::-webkit-scrollbar,
|
| 309 |
+
[data-testid="chatbot"]::-webkit-scrollbar {
|
| 310 |
+
width: 8px;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
.chatbot::-webkit-scrollbar-track,
|
| 314 |
+
[data-testid="chatbot"]::-webkit-scrollbar-track {
|
| 315 |
+
background: var(--bg-light-secondary);
|
| 316 |
+
border-radius: 10px;
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
.chatbot::-webkit-scrollbar-thumb,
|
| 320 |
+
[data-testid="chatbot"]::-webkit-scrollbar-thumb {
|
| 321 |
+
background: var(--primary-purple-light);
|
| 322 |
+
border-radius: 10px;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
.chatbot::-webkit-scrollbar-thumb:hover,
|
| 326 |
+
[data-testid="chatbot"]::-webkit-scrollbar-thumb:hover {
|
| 327 |
+
background: var(--primary-purple);
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
/* ============================================
|
| 331 |
+
DARK THEME STYLES
|
| 332 |
+
============================================ */
|
| 333 |
+
|
| 334 |
+
.dark :root, .dark .gradio-container { color-scheme: dark; }
|
| 335 |
+
.dark body, .dark .gradio-container { background: var(--bg-dark-primary); }
|
| 336 |
+
.dark .prose, .dark .gr-text, .dark .gr-form { color: var(--text-dark-secondary); }
|
| 337 |
+
|
| 338 |
+
/* Dark theme - Chat container */
|
| 339 |
+
.dark .chatbot,
|
| 340 |
+
.dark [data-testid="chatbot"] {
|
| 341 |
+
border-color: var(--border-dark) !important;
|
| 342 |
+
box-shadow: var(--card-shadow-dark) !important;
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
/* Dark theme - User messages */
|
| 346 |
+
.dark .message.user,
|
| 347 |
+
.dark .user-message,
|
| 348 |
+
.dark [data-testid="user-message"] {
|
| 349 |
+
background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%) !important;
|
| 350 |
+
color: white !important;
|
| 351 |
+
box-shadow: 0 2px 8px var(--shadow-purple-2xl) !important;
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
/* Dark theme - Force white text in user messages */
|
| 355 |
+
.dark .message.user *,
|
| 356 |
+
.dark .user-message *,
|
| 357 |
+
.dark [data-testid="user-message"] *,
|
| 358 |
+
.dark .user-row *,
|
| 359 |
+
.dark .message.user p,
|
| 360 |
+
.dark .message.user span,
|
| 361 |
+
.dark .message.user div {
|
| 362 |
+
color: white !important;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
/* Dark theme - Assistant messages */
|
| 366 |
+
.dark .message.bot,
|
| 367 |
+
.dark .bot-message,
|
| 368 |
+
.dark [data-testid="bot-message"] {
|
| 369 |
+
background: var(--bg-dark-card) !important;
|
| 370 |
+
color: var(--text-dark-primary) !important;
|
| 371 |
+
border-color: var(--border-dark) !important;
|
| 372 |
+
box-shadow: var(--card-shadow-dark) !important;
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
/* Dark theme - Input */
|
| 376 |
+
.dark textarea,
|
| 377 |
+
.dark .gr-textbox textarea,
|
| 378 |
+
.dark [data-testid="textbox"] {
|
| 379 |
+
background: var(--bg-dark-secondary) !important;
|
| 380 |
+
color: var(--text-dark-primary) !important;
|
| 381 |
+
border-color: var(--border-dark) !important;
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
.dark textarea:focus,
|
| 385 |
+
.dark .gr-textbox textarea:focus {
|
| 386 |
+
border-color: var(--primary-purple-light) !important;
|
| 387 |
+
box-shadow: 0 0 0 3px var(--shadow-purple-light) !important;
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
/* Dark theme - Buttons */
|
| 391 |
+
.dark button[type="submit"],
|
| 392 |
+
.dark .submit-button,
|
| 393 |
+
.dark button.primary {
|
| 394 |
+
background: var(--gradient-purple) !important;
|
| 395 |
+
box-shadow: 0 2px 8px var(--shadow-purple-2xl) !important;
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
.dark button[type="submit"]:hover,
|
| 399 |
+
.dark .submit-button:hover,
|
| 400 |
+
.dark button.primary:hover {
|
| 401 |
+
background: var(--primary-purple-light) !important;
|
| 402 |
+
box-shadow: 0 4px 12px var(--shadow-purple-light-lg) !important;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
/* Dark theme - Example buttons */
|
| 406 |
+
.dark .example,
|
| 407 |
+
.dark button.example {
|
| 408 |
+
background: var(--bg-dark-card) !important;
|
| 409 |
+
color: var(--text-dark-primary) !important;
|
| 410 |
+
border-color: var(--border-dark) !important;
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
.dark .example:hover,
|
| 414 |
+
.dark button.example:hover {
|
| 415 |
+
background: var(--bg-dark-secondary) !important;
|
| 416 |
+
border-color: var(--primary-purple-light) !important;
|
| 417 |
+
box-shadow: 0 4px 12px var(--shadow-purple-lg) !important;
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
/* Dark theme - Scrollbar */
|
| 421 |
+
.dark .chatbot::-webkit-scrollbar-track,
|
| 422 |
+
.dark [data-testid="chatbot"]::-webkit-scrollbar-track {
|
| 423 |
+
background: var(--bg-dark-secondary);
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.dark .chatbot::-webkit-scrollbar-thumb,
|
| 427 |
+
.dark [data-testid="chatbot"]::-webkit-scrollbar-thumb {
|
| 428 |
+
background: var(--primary-purple);
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
.dark .chatbot::-webkit-scrollbar-thumb:hover,
|
| 432 |
+
.dark [data-testid="chatbot"]::-webkit-scrollbar-thumb:hover {
|
| 433 |
+
background: var(--primary-purple-light);
|
| 434 |
+
}
|