Spaces:
Running
Running
File size: 15,926 Bytes
948fa66 e851e91 948fa66 e851e91 948fa66 e851e91 948fa66 e851e91 948fa66 e851e91 948fa66 9f65115 948fa66 e851e91 948fa66 e851e91 948fa66 9f65115 e851e91 948fa66 e851e91 948fa66 e851e91 948fa66 9f65115 e851e91 9f65115 e851e91 9f65115 e851e91 9f65115 e851e91 9f65115 e851e91 9f65115 e851e91 948fa66 9f65115 e851e91 948fa66 e851e91 b6ec4a5 e851e91 b6ec4a5 e851e91 b6ec4a5 e851e91 b6ec4a5 e851e91 b6ec4a5 e851e91 b6ec4a5 e851e91 |
1 2 3 4 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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
/* ============================================
COLOR PALETTE FOR LIGHT AND DARK THEMES
============================================ */
:root {
/* Primary Purple Colors */
--primary-purple: #7C3AED;
--primary-purple-light: #8B5CF6;
--primary-purple-lighter: #A78BFA;
--primary-purple-dark: #6D28D9;
/* Secondary Purple/Pink Colors */
--secondary-purple: #9333EA;
--secondary-pink: #EC4899;
--secondary-pink-light: #F472B6;
/* Accent Colors */
--accent-coral: #FF7B7B;
--accent-salmon: #FF8F8F;
--accent-green: #10B981;
--accent-teal: #14B8A6;
--accent-yellow: #FBBF24;
--accent-orange: #FB923C;
/* Background Colors - Light Theme */
--bg-light-primary: #FFFFFF;
--bg-light-secondary: #F9FAFB;
--bg-light-tertiary: #F3F4F6;
--bg-light-card: #FFFFFF;
/* Background Colors - Dark Theme */
--bg-dark-primary: #0F172A;
--bg-dark-secondary: #1E293B;
--bg-dark-tertiary: #334155;
--bg-dark-card: #1E293B;
/* Text Colors - Light Theme */
--text-light-primary: #111827;
--text-light-secondary: #4B5563;
--text-light-tertiary: #9CA3AF;
/* Text Colors - Dark Theme */
--text-dark-primary: #F9FAFB;
--text-dark-secondary: #E5E7EB;
--text-dark-tertiary: #9CA3AF;
/* Gradient Backgrounds */
--gradient-purple: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
--gradient-purple-pink: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
--gradient-blue-purple: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
--gradient-coral: linear-gradient(135deg, #FF8F8F 0%, #FF7B7B 100%);
/* Border & Shadow Colors */
--border-light: #E5E7EB;
--border-dark: #374151;
--shadow-light: rgba(0, 0, 0, 0.1);
--shadow-purple: rgba(124, 58, 237, 0.3);
--shadow-purple-sm: rgba(124, 58, 237, 0.1);
--shadow-purple-md: rgba(124, 58, 237, 0.15);
--shadow-purple-lg: rgba(124, 58, 237, 0.25);
--shadow-purple-xl: rgba(124, 58, 237, 0.35);
--shadow-purple-2xl: rgba(124, 58, 237, 0.4);
--shadow-purple-light: rgba(167, 139, 250, 0.2);
--shadow-purple-light-lg: rgba(167, 139, 250, 0.5);
/* Card & Surface */
--card-radius: 20px;
--card-shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--card-shadow-dark: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}
/* Modern title styling - Purple with subtle shadow */
.prose h1 {
font-size: 2.5rem !important;
font-weight: 800 !important;
text-align: center !important;
margin: 1.5rem 0 0.5rem 0 !important;
padding: 0 !important;
letter-spacing: -0.04em !important;
text-transform: none !important;
line-height: 1.2 !important;
/* Deep purple with subtle shadow for depth */
color: var(--primary-purple-dark) !important;
text-shadow: 0 2px 8px var(--shadow-purple) !important;
}
/* Dark theme title - Lighter purple with glow */
.dark .prose h1 {
color: var(--primary-purple-lighter) !important;
text-shadow: 0 2px 12px var(--shadow-purple) !important;
}
/* Description styling - Target markdown div (not paragraphs which are used in chat) */
/* The description is rendered as: .prose > .md > div */
.prose .md > div,
.app-description {
font-size: 1rem !important;
font-weight: 400 !important;
line-height: 1.6 !important;
text-align: center !important;
margin: 0.75rem auto 1.5rem auto !important;
padding: 1.25rem 1.5rem !important;
max-width: 700px !important;
color: var(--text-light-secondary) !important;
background-color: var(--bg-light-secondary) !important;
border-radius: 16px !important;
box-shadow: var(--card-shadow-light) !important;
display: block !important;
position: relative !important;
/* Multi-color gradient border */
border: 2px solid transparent !important;
background-image:
linear-gradient(var(--bg-light-secondary), var(--bg-light-secondary)),
linear-gradient(
90deg,
var(--primary-purple) 0%,
var(--secondary-pink) 14%,
var(--accent-salmon) 28%,
var(--accent-orange) 42%,
var(--accent-yellow) 57%,
var(--accent-green) 71%,
var(--accent-teal) 85%,
var(--primary-purple-light) 100%
) !important;
background-origin: border-box !important;
background-clip: padding-box, border-box !important;
}
/* Bold text styling within description */
.prose .md > div strong,
.app-description strong {
color: var(--primary-purple) !important;
font-weight: 600 !important;
}
/* Dark theme description */
@media (prefers-color-scheme: dark) {
.prose .md > div,
.app-description {
color: var(--text-dark-secondary) !important;
background-color: var(--bg-dark-card) !important;
box-shadow: var(--card-shadow-dark) !important;
/* Multi-color gradient border for dark theme */
background-image:
linear-gradient(var(--bg-dark-card), var(--bg-dark-card)),
linear-gradient(
90deg,
var(--primary-purple) 0%,
var(--secondary-pink) 14%,
var(--accent-salmon) 28%,
var(--accent-orange) 42%,
var(--accent-yellow) 57%,
var(--accent-green) 71%,
var(--accent-teal) 85%,
var(--primary-purple-light) 100%
) !important;
}
/* Dark theme bold text in description */
.prose .md > div strong,
.app-description strong {
color: var(--primary-purple-lighter) !important;
}
}
/* Also support .dark class for manual theme switching */
.dark .prose .md > div,
.dark .app-description {
color: var(--text-dark-secondary) !important;
background-color: var(--bg-dark-card) !important;
box-shadow: var(--card-shadow-dark) !important;
/* Multi-color gradient border for dark theme */
background-image:
linear-gradient(var(--bg-dark-card), var(--bg-dark-card)),
linear-gradient(
90deg,
var(--primary-purple) 0%,
var(--secondary-pink) 14%,
var(--accent-salmon) 28%,
var(--accent-orange) 42%,
var(--accent-yellow) 57%,
var(--accent-green) 71%,
var(--accent-teal) 85%,
var(--primary-purple-light) 100%
) !important;
}
/* Dark theme bold text in description */
.dark .prose .md > div strong,
.dark .app-description strong {
color: var(--primary-purple-lighter) !important;
}
/* ============================================
CHATBOT STYLING - Modern and Clean
============================================ */
/* Chat container */
.chatbot, [data-testid="chatbot"] {
border-radius: var(--card-radius) !important;
box-shadow: var(--card-shadow-light) !important;
}
/* User messages - Purple accent */
.message.user,
.user-message,
[data-testid="user-message"] {
background: linear-gradient(135deg, var(--primary-purple-light) 0%, var(--primary-purple) 100%) !important;
color: white !important;
border-radius: 18px 18px 4px 18px !important;
padding: 0.875rem 1.125rem !important;
margin: 0.5rem 0 !important;
box-shadow: 0 2px 8px var(--shadow-purple-lg) !important;
margin-left: auto !important;
}
/* Force white text for all content inside user messages */
.message.user *,
.user-message *,
[data-testid="user-message"] *,
.user-row *,
.message.user p,
.message.user span,
.message.user div {
color: white !important;
}
/* Assistant messages - Light background */
.message.bot,
.bot-message,
[data-testid="bot-message"] {
background: var(--bg-light-card) !important;
color: var(--text-light-primary) !important;
border-radius: 18px 18px 18px 4px !important;
padding: 0.875rem 1.125rem !important;
margin: 0.5rem 0 !important;
border: 1px solid var(--border-light) !important;
box-shadow: var(--card-shadow-light) !important;
max-width: 80% !important;
margin-right: auto !important;
}
/* Input textarea */
textarea,
.gr-textbox textarea,
[data-testid="textbox"] {
background: var(--bg-light-card) !important;
color: var(--text-light-primary) !important;
border: 2px solid var(--border-light) !important;
border-radius: 12px !important;
padding: 0.75rem 1rem !important;
font-size: 1rem !important;
transition: all 0.2s ease !important;
}
textarea:focus,
.gr-textbox textarea:focus {
border-color: var(--primary-purple) !important;
box-shadow: 0 0 0 3px var(--shadow-purple-sm) !important;
outline: none !important;
}
/* Submit button and action buttons */
button[type="submit"],
.submit-button,
button.primary {
background: var(--gradient-purple) !important;
color: white !important;
border: none !important;
border-radius: 12px !important;
padding: 0.625rem 1.5rem !important;
font-weight: 600 !important;
transition: all 0.2s ease !important;
box-shadow: 0 2px 8px var(--shadow-purple-lg) !important;
}
button[type="submit"]:hover,
.submit-button:hover,
button.primary:hover {
background: var(--primary-purple-dark) !important;
box-shadow: 0 4px 12px var(--shadow-purple-xl) !important;
transform: translateY(-1px) !important;
}
/* Example buttons - Modern pill style */
.examples .example,
button.example,
[data-testid="examples"] button {
background: linear-gradient(135deg, var(--bg-light-card) 0%, var(--bg-light-secondary) 100%) !important;
color: var(--primary-purple) !important;
border: 2px solid var(--primary-purple-lighter) !important;
border-radius: 24px !important;
padding: 0.875rem 1.5rem !important;
font-size: 0.95rem !important;
font-weight: 500 !important;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
box-shadow: 0 2px 8px var(--shadow-purple-sm) !important;
cursor: pointer !important;
display: inline-flex !important;
align-items: center !important;
gap: 0.5rem !important;
white-space: normal !important;
text-align: left !important;
line-height: 1.4 !important;
}
.examples .example:hover,
button.example:hover,
[data-testid="examples"] button:hover {
background: var(--gradient-purple) !important;
color: white !important;
border-color: var(--primary-purple) !important;
transform: translateY(-2px) scale(1.02) !important;
box-shadow: 0 6px 20px var(--shadow-purple-lg) !important;
}
/* Hide the "Aa" icon in examples */
.examples .example::before,
button.example::before,
[data-testid="examples"] button::before,
.examples .example .icon,
button.example .icon,
[data-testid="examples"] button .icon {
display: none !important;
}
/* Style the text content of examples */
.examples .example span,
button.example span,
[data-testid="examples"] button span {
color: inherit !important;
}
/* Container for examples */
.examples,
[data-testid="examples"] {
display: flex !important;
flex-wrap: wrap !important;
gap: 1rem !important;
padding: 1rem 0 !important;
justify-content: center !important;
}
/* Scrollbar styling */
.chatbot::-webkit-scrollbar,
[data-testid="chatbot"]::-webkit-scrollbar {
width: 8px;
}
.chatbot::-webkit-scrollbar-track,
[data-testid="chatbot"]::-webkit-scrollbar-track {
background: var(--bg-light-secondary);
border-radius: 10px;
}
.chatbot::-webkit-scrollbar-thumb,
[data-testid="chatbot"]::-webkit-scrollbar-thumb {
background: var(--primary-purple-light);
border-radius: 10px;
}
.chatbot::-webkit-scrollbar-thumb:hover,
[data-testid="chatbot"]::-webkit-scrollbar-thumb:hover {
background: var(--primary-purple);
}
/* ============================================
DARK THEME STYLES
============================================ */
.dark :root, .dark .gradio-container { color-scheme: dark; }
.dark body, .dark .gradio-container { background: var(--bg-dark-primary); }
.dark .prose, .dark .gr-text, .dark .gr-form { color: var(--text-dark-secondary); }
/* Dark theme - Chat container */
.dark .chatbot,
.dark [data-testid="chatbot"] {
border-color: var(--border-dark) !important;
box-shadow: var(--card-shadow-dark) !important;
}
/* Dark theme - User messages */
.dark .message.user,
.dark .user-message,
.dark [data-testid="user-message"] {
background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%) !important;
color: white !important;
box-shadow: 0 2px 8px var(--shadow-purple-2xl) !important;
}
/* Dark theme - Force white text in user messages */
.dark .message.user *,
.dark .user-message *,
.dark [data-testid="user-message"] *,
.dark .user-row *,
.dark .message.user p,
.dark .message.user span,
.dark .message.user div {
color: white !important;
}
/* Dark theme - Assistant messages */
.dark .message.bot,
.dark .bot-message,
.dark [data-testid="bot-message"] {
background: var(--bg-dark-card) !important;
color: var(--text-dark-primary) !important;
border-color: var(--border-dark) !important;
box-shadow: var(--card-shadow-dark) !important;
}
/* Dark theme - Input */
.dark textarea,
.dark .gr-textbox textarea,
.dark [data-testid="textbox"] {
background: var(--bg-dark-secondary) !important;
color: var(--text-dark-primary) !important;
border-color: var(--border-dark) !important;
}
.dark textarea:focus,
.dark .gr-textbox textarea:focus {
border-color: var(--primary-purple-light) !important;
box-shadow: 0 0 0 3px var(--shadow-purple-light) !important;
}
/* Dark theme - Buttons */
.dark button[type="submit"],
.dark .submit-button,
.dark button.primary {
background: var(--gradient-purple) !important;
box-shadow: 0 2px 8px var(--shadow-purple-2xl) !important;
}
.dark button[type="submit"]:hover,
.dark .submit-button:hover,
.dark button.primary:hover {
background: var(--primary-purple-light) !important;
box-shadow: 0 4px 12px var(--shadow-purple-light-lg) !important;
}
/* Dark theme - Example buttons */
.dark .examples .example,
.dark button.example,
.dark [data-testid="examples"] button {
background: linear-gradient(135deg, var(--bg-dark-card) 0%, var(--bg-dark-secondary) 100%) !important;
color: var(--primary-purple-lighter) !important;
border-color: var(--primary-purple) !important;
box-shadow: 0 2px 8px var(--shadow-purple-xl) !important;
}
.dark .examples .example:hover,
.dark button.example:hover,
.dark [data-testid="examples"] button:hover {
background: var(--gradient-purple-pink) !important;
color: white !important;
border-color: var(--primary-purple-light) !important;
box-shadow: 0 6px 24px var(--shadow-purple-light-lg) !important;
}
/* Dark theme - Example text */
.dark .examples .example span,
.dark button.example span,
.dark [data-testid="examples"] button span {
color: inherit !important;
}
/* Dark theme - Scrollbar */
.dark .chatbot::-webkit-scrollbar-track,
.dark [data-testid="chatbot"]::-webkit-scrollbar-track {
background: var(--bg-dark-secondary);
}
.dark .chatbot::-webkit-scrollbar-thumb,
.dark [data-testid="chatbot"]::-webkit-scrollbar-thumb {
background: var(--primary-purple);
}
.dark .chatbot::-webkit-scrollbar-thumb:hover,
.dark [data-testid="chatbot"]::-webkit-scrollbar-thumb:hover {
background: var(--primary-purple-light);
}
/* ============================================
HIDE FOOTER
============================================ */
/* Hide the Gradio footer with API and settings links */
footer,
.footer,
[data-testid="footer"],
.gradio-container footer,
.built-with,
.api-link,
.settings-link {
display: none !important;
visibility: hidden !important;
height: 0 !important;
padding: 0 !important;
margin: 0 !important;
} |