Spaces:
Running
Running
Vedika commited on
Update index.html
Browse files- index.html +109 -504
index.html
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
|
@@ -28,9 +29,11 @@
|
|
| 28 |
/* Professional Tiranga Brand Colors */
|
| 29 |
--brand-saffron: #FF9933;
|
| 30 |
--brand-saffron-light: rgba(255, 153, 51, 0.1);
|
|
|
|
| 31 |
--brand-white: #FFFFFF;
|
| 32 |
--brand-green: #138808;
|
| 33 |
--brand-green-light: rgba(19, 136, 8, 0.1);
|
|
|
|
| 34 |
|
| 35 |
/* UI Colors */
|
| 36 |
--bg-main: #ffffff;
|
|
@@ -158,249 +161,61 @@
|
|
| 158 |
border: 2px solid var(--bg-main);
|
| 159 |
transition: transform var(--trans-spring);
|
| 160 |
}
|
| 161 |
-
.brand-logo:hover img {
|
| 162 |
-
transform: scale(1.05) rotate(-2deg);
|
| 163 |
-
}
|
| 164 |
.brand-text { display: flex; flex-direction: column; }
|
| 165 |
-
.brand-title {
|
| 166 |
-
|
| 167 |
-
font-weight: 800;
|
| 168 |
-
font-size: 18px;
|
| 169 |
-
color: var(--text-primary);
|
| 170 |
-
letter-spacing: -0.5px;
|
| 171 |
-
line-height: 1.1;
|
| 172 |
-
}
|
| 173 |
-
.brand-subtitle {
|
| 174 |
-
font-size: 11px;
|
| 175 |
-
font-weight: 700;
|
| 176 |
-
letter-spacing: 1.5px;
|
| 177 |
-
text-transform: uppercase;
|
| 178 |
-
background: linear-gradient(90deg, var(--brand-saffron), var(--brand-green));
|
| 179 |
-
-webkit-background-clip: text;
|
| 180 |
-
-webkit-text-fill-color: transparent;
|
| 181 |
-
margin-top: 2px;
|
| 182 |
-
}
|
| 183 |
|
| 184 |
-
.sidebar-content {
|
| 185 |
-
flex: 1;
|
| 186 |
-
overflow-y: auto;
|
| 187 |
-
padding: 20px;
|
| 188 |
-
display: flex;
|
| 189 |
-
flex-direction: column;
|
| 190 |
-
gap: 24px;
|
| 191 |
-
}
|
| 192 |
.sidebar-content::-webkit-scrollbar { width: 4px; }
|
| 193 |
.sidebar-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }
|
| 194 |
|
| 195 |
/* Auth UI */
|
| 196 |
-
.auth-section {
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
box-shadow: var(--shadow-sm);
|
| 202 |
-
}
|
| 203 |
-
.btn-secure-login {
|
| 204 |
-
width: 100%;
|
| 205 |
-
padding: 12px;
|
| 206 |
-
background: var(--text-primary);
|
| 207 |
-
color: var(--brand-white);
|
| 208 |
-
border: none;
|
| 209 |
-
border-radius: var(--radius-md);
|
| 210 |
-
font-size: 14px;
|
| 211 |
-
font-weight: 600;
|
| 212 |
-
cursor: pointer;
|
| 213 |
-
display: flex;
|
| 214 |
-
align-items: center;
|
| 215 |
-
justify-content: center;
|
| 216 |
-
gap: 8px;
|
| 217 |
-
transition: var(--trans-fast);
|
| 218 |
-
}
|
| 219 |
-
.btn-secure-login:hover {
|
| 220 |
-
background: #000;
|
| 221 |
-
transform: translateY(-2px);
|
| 222 |
-
box-shadow: var(--shadow-md);
|
| 223 |
-
}
|
| 224 |
-
.user-profile-card {
|
| 225 |
-
display: none;
|
| 226 |
-
align-items: center;
|
| 227 |
-
gap: 12px;
|
| 228 |
-
}
|
| 229 |
-
.user-avatar-circle {
|
| 230 |
-
width: 40px;
|
| 231 |
-
height: 40px;
|
| 232 |
-
border-radius: var(--radius-full);
|
| 233 |
-
background: linear-gradient(135deg, var(--brand-saffron), var(--brand-green));
|
| 234 |
-
color: var(--brand-white);
|
| 235 |
-
display: flex;
|
| 236 |
-
align-items: center;
|
| 237 |
-
justify-content: center;
|
| 238 |
-
font-weight: 700;
|
| 239 |
-
font-size: 16px;
|
| 240 |
-
box-shadow: var(--shadow-sm);
|
| 241 |
-
}
|
| 242 |
.user-info-text { flex: 1; overflow: hidden; }
|
| 243 |
-
.user-email-text {
|
| 244 |
-
font-size: 13px;
|
| 245 |
-
font-weight: 600;
|
| 246 |
-
color: var(--text-primary);
|
| 247 |
-
white-space: nowrap;
|
| 248 |
-
overflow: hidden;
|
| 249 |
-
text-overflow: ellipsis;
|
| 250 |
-
}
|
| 251 |
.user-status-text { font-size: 11px; color: var(--brand-green); font-weight: 500; }
|
| 252 |
-
.btn-logout {
|
| 253 |
-
background: rgba(239, 68, 68, 0.1);
|
| 254 |
-
color: #ef4444;
|
| 255 |
-
border: none;
|
| 256 |
-
width: 32px;
|
| 257 |
-
height: 32px;
|
| 258 |
-
border-radius: var(--radius-md);
|
| 259 |
-
display: flex;
|
| 260 |
-
align-items: center;
|
| 261 |
-
justify-content: center;
|
| 262 |
-
cursor: pointer;
|
| 263 |
-
transition: var(--trans-fast);
|
| 264 |
-
}
|
| 265 |
.btn-logout:hover { background: #ef4444; color: #fff; }
|
| 266 |
|
| 267 |
/* Settings & Info */
|
| 268 |
-
.brand-info-box {
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
border-radius: var(--radius-lg);
|
| 272 |
-
padding: 24px 16px;
|
| 273 |
-
text-align: center;
|
| 274 |
-
box-shadow: var(--shadow-sm);
|
| 275 |
-
margin-top: auto;
|
| 276 |
-
position: relative;
|
| 277 |
-
overflow: hidden;
|
| 278 |
-
}
|
| 279 |
-
.brand-info-box::before {
|
| 280 |
-
content: '';
|
| 281 |
-
position: absolute;
|
| 282 |
-
top: 0; left: 0; right: 0; height: 3px;
|
| 283 |
-
background: linear-gradient(90deg, var(--brand-saffron), var(--brand-white), var(--brand-green));
|
| 284 |
-
}
|
| 285 |
-
.brand-info-box img {
|
| 286 |
-
width: 64px; height: 64px;
|
| 287 |
-
border-radius: var(--radius-lg);
|
| 288 |
-
object-fit: cover;
|
| 289 |
-
margin-bottom: 12px;
|
| 290 |
-
box-shadow: var(--shadow-md);
|
| 291 |
-
border: 1px solid var(--border-light);
|
| 292 |
-
}
|
| 293 |
.brand-info-box h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
|
| 294 |
.brand-info-box p { font-size: 10px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.5px; }
|
| 295 |
|
| 296 |
-
.btn-clear-chat {
|
| 297 |
-
width: 100%;
|
| 298 |
-
padding: 14px;
|
| 299 |
-
border-radius: var(--radius-md);
|
| 300 |
-
background: var(--bg-main);
|
| 301 |
-
border: 1px solid var(--border-light);
|
| 302 |
-
color: var(--text-secondary);
|
| 303 |
-
font-size: 13px;
|
| 304 |
-
font-weight: 600;
|
| 305 |
-
cursor: pointer;
|
| 306 |
-
transition: var(--trans-fast);
|
| 307 |
-
display: flex;
|
| 308 |
-
align-items: center;
|
| 309 |
-
justify-content: center;
|
| 310 |
-
gap: 8px;
|
| 311 |
-
}
|
| 312 |
.btn-clear-chat:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
|
| 313 |
|
| 314 |
/* --- 5. MAIN CHAT INTERFACE --- */
|
| 315 |
-
.chat-container {
|
| 316 |
-
flex: 1;
|
| 317 |
-
display: flex;
|
| 318 |
-
flex-direction: column;
|
| 319 |
-
position: relative;
|
| 320 |
-
min-width: 300px;
|
| 321 |
-
transition: width var(--trans-smooth);
|
| 322 |
-
}
|
| 323 |
|
| 324 |
-
.chat-header {
|
| 325 |
-
padding: 16px 24px;
|
| 326 |
-
border-bottom: 1px solid var(--border-light);
|
| 327 |
-
background: rgba(255, 255, 255, 0.8);
|
| 328 |
-
backdrop-filter: blur(12px);
|
| 329 |
-
-webkit-backdrop-filter: blur(12px);
|
| 330 |
-
display: flex;
|
| 331 |
-
align-items: center;
|
| 332 |
-
justify-content: space-between;
|
| 333 |
-
z-index: 10;
|
| 334 |
-
}
|
| 335 |
.header-left { display: flex; align-items: center; gap: 12px; }
|
| 336 |
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); padding: 4px; }
|
| 337 |
|
| 338 |
-
.ai-status-badge {
|
| 339 |
-
|
| 340 |
-
align-items: center;
|
| 341 |
-
gap: 8px;
|
| 342 |
-
font-size: 14px;
|
| 343 |
-
font-weight: 600;
|
| 344 |
-
color: var(--text-primary);
|
| 345 |
-
padding: 6px 14px;
|
| 346 |
-
background: var(--bg-secondary);
|
| 347 |
-
border-radius: var(--radius-full);
|
| 348 |
-
border: 1px solid var(--border-light);
|
| 349 |
-
}
|
| 350 |
-
.status-indicator {
|
| 351 |
-
width: 8px; height: 8px;
|
| 352 |
-
border-radius: 50%;
|
| 353 |
-
background: var(--brand-green);
|
| 354 |
-
box-shadow: 0 0 0 3px rgba(19, 136, 8, 0.2);
|
| 355 |
-
animation: pulseStatus 2s infinite;
|
| 356 |
-
}
|
| 357 |
@keyframes pulseStatus { 0% { box-shadow: 0 0 0 0 rgba(19,136,8,0.4); } 70% { box-shadow: 0 0 0 6px rgba(19,136,8,0); } 100% { box-shadow: 0 0 0 0 rgba(19,136,8,0); } }
|
| 358 |
|
| 359 |
/* LIVE BUTTON */
|
| 360 |
-
.btn-live-mode {
|
| 361 |
-
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
|
| 362 |
-
color: white;
|
| 363 |
-
border: none;
|
| 364 |
-
padding: 8px 16px;
|
| 365 |
-
border-radius: var(--radius-full);
|
| 366 |
-
font-size: 13px;
|
| 367 |
-
font-weight: 700;
|
| 368 |
-
display: flex;
|
| 369 |
-
align-items: center;
|
| 370 |
-
gap: 8px;
|
| 371 |
-
cursor: pointer;
|
| 372 |
-
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
|
| 373 |
-
transition: var(--trans-spring);
|
| 374 |
-
}
|
| 375 |
.btn-live-mode:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4); }
|
| 376 |
.btn-live-mode svg { width: 16px; height: 16px; animation: blinkSVG 1.5s infinite; }
|
| 377 |
@keyframes blinkSVG { 50% { opacity: 0.5; } }
|
| 378 |
|
| 379 |
/* Messages Area */
|
| 380 |
-
.messages-area {
|
| 381 |
-
flex: 1;
|
| 382 |
-
overflow-y: auto;
|
| 383 |
-
padding: 40px 10%;
|
| 384 |
-
display: flex;
|
| 385 |
-
flex-direction: column;
|
| 386 |
-
gap: 32px;
|
| 387 |
-
scroll-behavior: smooth;
|
| 388 |
-
}
|
| 389 |
.messages-area::-webkit-scrollbar { width: 6px; }
|
| 390 |
.messages-area::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
|
| 391 |
|
| 392 |
/* Welcome Screen */
|
| 393 |
-
.welcome-hero {
|
| 394 |
-
display: flex;
|
| 395 |
-
flex-direction: column;
|
| 396 |
-
align-items: center;
|
| 397 |
-
justify-content: center;
|
| 398 |
-
text-align: center;
|
| 399 |
-
padding: 60px 20px;
|
| 400 |
-
margin: auto;
|
| 401 |
-
animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
|
| 402 |
-
max-width: 700px;
|
| 403 |
-
}
|
| 404 |
@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
|
| 405 |
|
| 406 |
.hero-icon-wrap { position: relative; margin-bottom: 32px; }
|
|
@@ -411,23 +226,8 @@
|
|
| 411 |
.hero-subtitle { font-size: 16px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 32px; }
|
| 412 |
|
| 413 |
.suggestion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: 100%; }
|
| 414 |
-
.suggestion-card {
|
| 415 |
-
|
| 416 |
-
backdrop-filter: blur(10px);
|
| 417 |
-
border: 1px solid var(--border-light);
|
| 418 |
-
border-radius: var(--radius-lg);
|
| 419 |
-
padding: 20px;
|
| 420 |
-
cursor: pointer;
|
| 421 |
-
text-align: left;
|
| 422 |
-
transition: var(--trans-smooth);
|
| 423 |
-
box-shadow: var(--shadow-sm);
|
| 424 |
-
}
|
| 425 |
-
.suggestion-card:hover {
|
| 426 |
-
transform: translateY(-4px);
|
| 427 |
-
box-shadow: var(--shadow-md);
|
| 428 |
-
border-color: var(--brand-saffron);
|
| 429 |
-
background: rgba(255, 255, 255, 0.9);
|
| 430 |
-
}
|
| 431 |
.sugg-icon { font-size: 24px; margin-bottom: 12px; display: inline-block; }
|
| 432 |
.sugg-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
|
| 433 |
.sugg-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
|
|
@@ -439,14 +239,7 @@
|
|
| 439 |
.message-row.user-msg { flex-direction: row-reverse; align-self: flex-end; }
|
| 440 |
.message-row.bot-msg { align-self: flex-start; }
|
| 441 |
|
| 442 |
-
.avatar-box {
|
| 443 |
-
width: 38px; height: 38px;
|
| 444 |
-
border-radius: var(--radius-sm);
|
| 445 |
-
flex-shrink: 0;
|
| 446 |
-
display: flex; align-items: center; justify-content: center;
|
| 447 |
-
font-size: 14px; font-weight: 700;
|
| 448 |
-
box-shadow: var(--shadow-sm);
|
| 449 |
-
}
|
| 450 |
.user-msg .avatar-box { background: var(--text-primary); color: var(--brand-white); }
|
| 451 |
.bot-msg .avatar-box { background: var(--bg-main); border: 1px solid var(--border-light); padding: 2px; }
|
| 452 |
.bot-msg .avatar-box img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; }
|
|
@@ -454,56 +247,17 @@
|
|
| 454 |
.msg-content-wrapper { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
|
| 455 |
.user-msg .msg-content-wrapper { align-items: flex-end; }
|
| 456 |
|
| 457 |
-
.file-badge {
|
| 458 |
-
font-size: 11px; font-weight: 600;
|
| 459 |
-
color: var(--brand-saffron);
|
| 460 |
-
background: var(--brand-saffron-light);
|
| 461 |
-
padding: 4px 10px;
|
| 462 |
-
border-radius: var(--radius-full);
|
| 463 |
-
margin-bottom: 4px;
|
| 464 |
-
display: inline-flex; align-items: center; gap: 4px;
|
| 465 |
-
}
|
| 466 |
|
| 467 |
-
.bubble {
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
line-height: 1.6;
|
| 471 |
-
position: relative;
|
| 472 |
-
word-wrap: break-word;
|
| 473 |
-
}
|
| 474 |
-
.user-msg .bubble {
|
| 475 |
-
background: var(--bg-tertiary);
|
| 476 |
-
color: var(--text-primary);
|
| 477 |
-
border-radius: 20px 20px 4px 20px;
|
| 478 |
-
border: 1px solid var(--border-light);
|
| 479 |
-
}
|
| 480 |
-
.bot-msg .bubble {
|
| 481 |
-
background: var(--bg-main);
|
| 482 |
-
border: 1px solid var(--border-light);
|
| 483 |
-
border-radius: 4px 20px 20px 20px;
|
| 484 |
-
box-shadow: var(--shadow-sm);
|
| 485 |
-
width: 100%;
|
| 486 |
-
}
|
| 487 |
|
| 488 |
/* Bot Actions (TTS & Copy) */
|
| 489 |
-
.msg-actions-bar {
|
| 490 |
-
display: flex; gap: 8px; margin-top: 6px; padding-left: 12px;
|
| 491 |
-
opacity: 0; transition: opacity var(--trans-smooth);
|
| 492 |
-
flex-wrap: wrap;
|
| 493 |
-
}
|
| 494 |
.bot-msg:hover .msg-actions-bar { opacity: 1; }
|
| 495 |
|
| 496 |
-
.action-chip {
|
| 497 |
-
background: var(--bg-secondary);
|
| 498 |
-
border: 1px solid var(--border-light);
|
| 499 |
-
color: var(--text-secondary);
|
| 500 |
-
font-size: 12px; font-weight: 600;
|
| 501 |
-
cursor: pointer;
|
| 502 |
-
display: flex; align-items: center; gap: 6px;
|
| 503 |
-
padding: 6px 14px;
|
| 504 |
-
border-radius: var(--radius-full);
|
| 505 |
-
transition: var(--trans-fast);
|
| 506 |
-
}
|
| 507 |
.action-chip:hover { background: var(--bg-tertiary); color: var(--text-primary); transform: translateY(-1px); }
|
| 508 |
.action-chip.btn-tts { color: var(--brand-green); border-color: rgba(19, 136, 8, 0.2); background: var(--brand-green-light); }
|
| 509 |
.action-chip.btn-tts:hover { background: rgba(19, 136, 8, 0.15); }
|
|
@@ -512,215 +266,74 @@
|
|
| 512 |
.bubble p { margin-bottom: 14px; }
|
| 513 |
.bubble p:last-child { margin-bottom: 0; }
|
| 514 |
.bubble strong { font-weight: 700; color: var(--text-primary); }
|
| 515 |
-
.bubble code {
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
padding: 3px 6px;
|
| 519 |
-
border-radius: 6px;
|
| 520 |
-
font-size: 0.85em;
|
| 521 |
-
color: #d946ef;
|
| 522 |
-
}
|
| 523 |
-
.bubble img {
|
| 524 |
-
max-width: 100%;
|
| 525 |
-
border-radius: 12px;
|
| 526 |
-
margin: 12px 0;
|
| 527 |
-
box-shadow: var(--shadow-md);
|
| 528 |
-
border: 1px solid var(--border-light);
|
| 529 |
-
display: block;
|
| 530 |
-
}
|
| 531 |
-
.bubble pre {
|
| 532 |
-
background: #282c34;
|
| 533 |
-
color: #abb2bf;
|
| 534 |
-
padding: 16px;
|
| 535 |
-
border-radius: 12px;
|
| 536 |
-
overflow-x: auto;
|
| 537 |
-
margin: 16px 0;
|
| 538 |
-
font-family: var(--font-mono);
|
| 539 |
-
font-size: 13.5px;
|
| 540 |
-
line-height: 1.5;
|
| 541 |
-
}
|
| 542 |
.bubble pre code { background: transparent; color: inherit; padding: 0; }
|
| 543 |
|
| 544 |
/* Generating Code UI */
|
| 545 |
-
.gen-code-box {
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
border: 1px solid #313244;
|
| 549 |
-
overflow: hidden;
|
| 550 |
-
margin: 16px 0;
|
| 551 |
-
box-shadow: var(--shadow-md);
|
| 552 |
-
}
|
| 553 |
-
.gen-code-hdr {
|
| 554 |
-
background: #11111b;
|
| 555 |
-
padding: 10px 16px;
|
| 556 |
-
font-size: 12px; font-weight: 600; color: #a6adc8;
|
| 557 |
-
display: flex; align-items: center; gap: 10px;
|
| 558 |
-
border-bottom: 1px solid #313244;
|
| 559 |
-
font-family: var(--font-mono);
|
| 560 |
-
text-transform: uppercase; letter-spacing: 1px;
|
| 561 |
-
}
|
| 562 |
-
.spinner-mini {
|
| 563 |
-
width: 14px; height: 14px;
|
| 564 |
-
border: 2px solid rgba(255,255,255,0.1);
|
| 565 |
-
border-top-color: var(--brand-saffron);
|
| 566 |
-
border-radius: 50%;
|
| 567 |
-
animation: spin 1s linear infinite;
|
| 568 |
-
}
|
| 569 |
@keyframes spin { to { transform: rotate(360deg); } }
|
| 570 |
.gen-code-box pre { margin: 0; background: transparent; }
|
| 571 |
|
| 572 |
/* Workspace Trigger Card */
|
| 573 |
-
.workspace-card {
|
| 574 |
-
background: var(--bg-secondary);
|
| 575 |
-
border: 1px solid var(--border-light);
|
| 576 |
-
border-radius: 12px;
|
| 577 |
-
padding: 16px;
|
| 578 |
-
margin: 16px 0;
|
| 579 |
-
display: flex; align-items: center; justify-content: space-between;
|
| 580 |
-
box-shadow: var(--shadow-sm);
|
| 581 |
-
}
|
| 582 |
.ws-card-info { display: flex; align-items: center; gap: 14px; }
|
| 583 |
-
.ws-card-icon {
|
| 584 |
-
width: 48px; height: 48px;
|
| 585 |
-
border-radius: 10px;
|
| 586 |
-
background: var(--bg-main);
|
| 587 |
-
display: flex; align-items: center; justify-content: center;
|
| 588 |
-
font-size: 24px;
|
| 589 |
-
box-shadow: var(--shadow-sm);
|
| 590 |
-
border: 1px solid var(--border-light);
|
| 591 |
-
color: var(--text-primary);
|
| 592 |
-
}
|
| 593 |
.ws-card-text h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
|
| 594 |
.ws-card-text p { font-size: 12px; color: var(--text-tertiary); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.5px; }
|
| 595 |
-
.btn-view-ws {
|
| 596 |
-
padding: 10px 20px;
|
| 597 |
-
background: var(--text-primary);
|
| 598 |
-
color: var(--brand-white);
|
| 599 |
-
border: none;
|
| 600 |
-
border-radius: var(--radius-sm);
|
| 601 |
-
font-size: 13px; font-weight: 600;
|
| 602 |
-
cursor: pointer;
|
| 603 |
-
transition: var(--trans-spring);
|
| 604 |
-
}
|
| 605 |
.btn-view-ws:hover { transform: scale(1.05); background: var(--brand-saffron); box-shadow: 0 4px 12px rgba(255,153,51,0.3); }
|
| 606 |
|
| 607 |
/* Scroll Bottom Button */
|
| 608 |
-
.btn-scroll-down {
|
| 609 |
-
position: absolute; bottom: 130px; left: 50%; transform: translateX(-50%) translateY(20px);
|
| 610 |
-
width: 44px; height: 44px; border-radius: 50%;
|
| 611 |
-
background: var(--glass-bg); backdrop-filter: blur(10px);
|
| 612 |
-
border: 1px solid var(--border-light); box-shadow: var(--shadow-md);
|
| 613 |
-
display: flex; align-items: center; justify-content: center;
|
| 614 |
-
cursor: pointer; color: var(--text-secondary);
|
| 615 |
-
opacity: 0; pointer-events: none; transition: var(--trans-smooth); z-index: 20;
|
| 616 |
-
}
|
| 617 |
.btn-scroll-down.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
|
| 618 |
.btn-scroll-down:hover { background: var(--bg-main); color: var(--text-primary); transform: translateX(-50%) translateY(-5px); box-shadow: var(--shadow-lg); }
|
| 619 |
|
| 620 |
/* --- 6. INPUT AREA & ATTACHMENTS --- */
|
| 621 |
-
.input-region {
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
background: transparent;
|
| 625 |
-
position: relative;
|
| 626 |
-
z-index: 20;
|
| 627 |
-
}
|
| 628 |
-
.input-box-wrapper {
|
| 629 |
-
display: flex; flex-direction: column;
|
| 630 |
-
background: var(--glass-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
|
| 631 |
-
border: 1px solid var(--border-light);
|
| 632 |
-
border-radius: var(--radius-xl);
|
| 633 |
-
box-shadow: var(--shadow-float);
|
| 634 |
-
transition: var(--trans-smooth);
|
| 635 |
-
}
|
| 636 |
-
.input-box-wrapper:focus-within {
|
| 637 |
-
border-color: var(--brand-saffron);
|
| 638 |
-
box-shadow: 0 15px 35px -5px rgba(255,153,51,0.15), 0 0 0 3px var(--brand-saffron-light);
|
| 639 |
-
}
|
| 640 |
|
| 641 |
/* Attachment Preview */
|
| 642 |
-
.file-preview-strip {
|
| 643 |
-
display: none; padding: 16px 24px 0; align-items: center; gap: 12px;
|
| 644 |
-
}
|
| 645 |
.file-preview-strip.active { display: flex; animation: fadeIn 0.3s ease; }
|
| 646 |
-
.preview-thumb {
|
| 647 |
-
width: 44px; height: 44px; object-fit: cover;
|
| 648 |
-
border-radius: var(--radius-sm); border: 1px solid var(--border-light);
|
| 649 |
-
display: flex; justify-content: center; align-items: center;
|
| 650 |
-
background: var(--bg-secondary); font-size: 20px;
|
| 651 |
-
}
|
| 652 |
.preview-details { flex: 1; }
|
| 653 |
.preview-name { font-size: 13px; font-weight: 600; color: var(--text-primary); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
| 654 |
-
.btn-remove-file {
|
| 655 |
-
background: rgba(239, 68, 68, 0.1); border: none;
|
| 656 |
-
width: 28px; height: 28px; border-radius: 50%;
|
| 657 |
-
cursor: pointer; display: flex; align-items: center; justify-content: center;
|
| 658 |
-
color: #ef4444; transition: var(--trans-fast);
|
| 659 |
-
}
|
| 660 |
.btn-remove-file:hover { background: #ef4444; color: #fff; }
|
| 661 |
|
| 662 |
-
.input-controls-row {
|
| 663 |
-
display: flex; align-items: flex-end; gap: 12px;
|
| 664 |
-
padding: 12px 16px 12px 20px;
|
| 665 |
-
}
|
| 666 |
|
| 667 |
-
.chat-textarea {
|
| 668 |
-
flex: 1; border: none; outline: none; background: transparent;
|
| 669 |
-
font-family: var(--font-sans); font-size: 15px; color: var(--text-primary);
|
| 670 |
-
line-height: 1.5; resize: none; max-height: 180px; min-height: 24px;
|
| 671 |
-
padding: 10px 0;
|
| 672 |
-
}
|
| 673 |
.chat-textarea::placeholder { color: var(--text-tertiary); }
|
| 674 |
|
| 675 |
/* Attachment Menu (Gemini Style) */
|
| 676 |
.attach-menu-container { position: relative; }
|
| 677 |
-
.btn-icon {
|
| 678 |
-
width: 40px; height: 40px; border-radius: var(--radius-md);
|
| 679 |
-
background: transparent; border: none;
|
| 680 |
-
display: flex; align-items: center; justify-content: center;
|
| 681 |
-
cursor: pointer; color: var(--text-secondary);
|
| 682 |
-
transition: var(--trans-fast); position: relative;
|
| 683 |
-
}
|
| 684 |
.btn-icon:hover { background: var(--bg-secondary); color: var(--text-primary); }
|
| 685 |
.btn-icon svg { width: 22px; height: 22px; }
|
| 686 |
|
| 687 |
-
.attach-popup {
|
| 688 |
-
position: absolute; bottom: 55px; left: 0;
|
| 689 |
-
background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
|
| 690 |
-
border: 1px solid var(--border-light); border-radius: var(--radius-lg);
|
| 691 |
-
padding: 8px; box-shadow: var(--shadow-float);
|
| 692 |
-
display: none; flex-direction: column; gap: 4px;
|
| 693 |
-
z-index: 100; min-width: 180px;
|
| 694 |
-
transform: translateY(10px) scale(0.95); opacity: 0;
|
| 695 |
-
transition: all var(--trans-fast);
|
| 696 |
-
transform-origin: bottom left;
|
| 697 |
-
}
|
| 698 |
.attach-popup.show { display: flex; transform: translateY(0) scale(1); opacity: 1; }
|
| 699 |
-
.attach-option {
|
| 700 |
-
display: flex; align-items: center; gap: 12px;
|
| 701 |
-
padding: 12px 16px; border-radius: var(--radius-sm);
|
| 702 |
-
cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-primary);
|
| 703 |
-
transition: var(--trans-fast);
|
| 704 |
-
}
|
| 705 |
.attach-option:hover { background: var(--bg-secondary); color: var(--brand-saffron); }
|
| 706 |
.attach-option span.ico { font-size: 18px; }
|
| 707 |
.hidden-file-input { display: none; }
|
| 708 |
|
| 709 |
-
/* Voice Mic */
|
| 710 |
-
.btn-
|
| 711 |
-
|
| 712 |
-
|
| 713 |
-
|
|
|
|
| 714 |
@keyframes pulseMic { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
|
| 715 |
|
| 716 |
/* Send Button */
|
| 717 |
-
.btn-send {
|
| 718 |
-
width: 44px; height: 44px; border-radius: 14px; border: none;
|
| 719 |
-
background: linear-gradient(135deg, var(--brand-saffron) 0%, var(--brand-green) 100%);
|
| 720 |
-
display: flex; align-items: center; justify-content: center;
|
| 721 |
-
cursor: pointer; transition: var(--trans-spring);
|
| 722 |
-
box-shadow: 0 4px 15px rgba(19, 136, 8, 0.2);
|
| 723 |
-
}
|
| 724 |
.btn-send svg { width: 18px; height: 18px; fill: white; transition: transform 0.2s; }
|
| 725 |
.btn-send:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 153, 51, 0.3); }
|
| 726 |
.btn-send:hover svg { transform: translate(2px, -2px); }
|
|
@@ -729,63 +342,31 @@
|
|
| 729 |
.footer-branding { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-top: 14px; font-weight: 500; letter-spacing: 0.5px; }
|
| 730 |
|
| 731 |
/* --- 7. WORKSPACE (CODE EDITOR PANEL) --- */
|
| 732 |
-
.workspace-panel {
|
| 733 |
-
width: 0; background: var(--bg-main);
|
| 734 |
-
border-left: 1px solid var(--border-light);
|
| 735 |
-
display: flex; flex-direction: column;
|
| 736 |
-
transition: width var(--trans-smooth); overflow: hidden;
|
| 737 |
-
box-shadow: -10px 0 30px rgba(0,0,0,0.03); z-index: 25;
|
| 738 |
-
}
|
| 739 |
.workspace-panel.active { width: 50%; }
|
| 740 |
-
|
| 741 |
-
.ws-header {
|
| 742 |
-
padding: 16px 24px; border-bottom: 1px solid var(--border-light);
|
| 743 |
-
background: var(--bg-main); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
|
| 744 |
-
}
|
| 745 |
.ws-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
|
| 746 |
.ws-actions-group { display: flex; gap: 10px; }
|
| 747 |
-
.btn-ws-action {
|
| 748 |
-
padding: 8px 16px; border-radius: var(--radius-sm);
|
| 749 |
-
background: var(--bg-secondary); border: 1px solid var(--border-light);
|
| 750 |
-
cursor: pointer; display: flex; align-items: center; gap: 8px;
|
| 751 |
-
color: var(--text-primary); transition: var(--trans-fast);
|
| 752 |
-
font-size: 13px; font-weight: 600;
|
| 753 |
-
}
|
| 754 |
.btn-ws-action:hover { background: var(--bg-tertiary); }
|
| 755 |
.btn-ws-close { padding: 8px; }
|
| 756 |
.btn-ws-close:hover { color: #ef4444; background: #fee2e2; border-color: #fca5a5; }
|
| 757 |
-
|
| 758 |
.ws-editor-area { flex: 1; overflow-y: auto; background: var(--bg-secondary); padding: 24px; }
|
| 759 |
-
.ws-editor-area pre {
|
| 760 |
-
margin: 0; padding: 24px; background: #282c34;
|
| 761 |
-
border: 1px solid var(--border-light); border-radius: var(--radius-lg);
|
| 762 |
-
font-family: var(--font-mono); font-size: 14px; line-height: 1.6;
|
| 763 |
-
overflow-x: auto; box-shadow: var(--shadow-md); color: #abb2bf;
|
| 764 |
-
}
|
| 765 |
|
| 766 |
/* --- 8. LIVE MODE OVERLAY (नया फीचर) --- */
|
| 767 |
-
.live-overlay {
|
| 768 |
-
position: fixed; inset: 0;
|
| 769 |
-
background: rgba(255, 255, 255, 0.98);
|
| 770 |
-
z-index: 9000;
|
| 771 |
-
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
| 772 |
-
opacity: 0; pointer-events: none;
|
| 773 |
-
transition: opacity var(--trans-smooth);
|
| 774 |
-
}
|
| 775 |
.live-overlay.active { opacity: 1; pointer-events: auto; }
|
| 776 |
.live-close-btn { position: absolute; top: 30px; right: 30px; background: rgba(0,0,0,0.05); border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer; transition: 0.2s; }
|
| 777 |
.live-close-btn:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; transform: rotate(90deg); }
|
| 778 |
-
|
| 779 |
.live-orb-container { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; margin-bottom: 40px; }
|
| 780 |
.live-orb-core { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-saffron), var(--brand-green)); box-shadow: 0 0 40px rgba(19, 136, 8, 0.4); position: relative; z-index: 2; transition: transform 0.1s; }
|
| 781 |
.live-orb-ring { position: absolute; inset: 0; border: 2px solid var(--brand-saffron); border-radius: 50%; opacity: 0; animation: ripple 2s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
|
| 782 |
.live-orb-ring:nth-child(2) { animation-delay: 0.6s; border-color: var(--brand-green); }
|
| 783 |
.live-orb-ring:nth-child(3) { animation-delay: 1.2s; border-color: var(--text-primary); }
|
| 784 |
@keyframes ripple { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
|
| 785 |
-
|
| 786 |
.live-status-text { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 12px; font-family: var(--font-sans); }
|
| 787 |
.live-transcript { font-size: 16px; color: var(--text-secondary); max-width: 600px; text-align: center; line-height: 1.5; min-height: 48px; }
|
| 788 |
-
|
| 789 |
.live-controls { display: flex; gap: 20px; margin-top: 40px; }
|
| 790 |
.btn-live-action { width: 64px; height: 64px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-md); transition: var(--trans-spring); }
|
| 791 |
.btn-live-action.mic { background: var(--bg-main); border: 2px solid var(--border-light); color: var(--text-primary); }
|
|
@@ -1008,6 +589,11 @@
|
|
| 1008 |
<input type="file" id="inp-document" class="hidden-file-input" accept=".pdf,.doc,.docx,.txt,.md,.csv,.json,.py,.js,.html,.css,.cpp,.c,.java" onchange="handleSpecificFile(this, 'document')">
|
| 1009 |
</div>
|
| 1010 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1011 |
<!-- Voice Mic -->
|
| 1012 |
<button class="btn-icon btn-mic" id="voiceBtn" onclick="toggleVoice()" title="Dictate Message">
|
| 1013 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" x2="12" y1="19" y2="22"></line></svg>
|
|
@@ -1134,7 +720,6 @@ function showToast(msg) {
|
|
| 1134 |
function executeFallbackCopy(text, btnElement) {
|
| 1135 |
var textArea = document.createElement("textarea");
|
| 1136 |
textArea.value = text;
|
| 1137 |
-
// Prevent scrolling to bottom of page in MS Edge.
|
| 1138 |
textArea.style.top = "0";
|
| 1139 |
textArea.style.left = "0";
|
| 1140 |
textArea.style.position = "fixed";
|
|
@@ -1172,7 +757,6 @@ function copyText(btnElement, rawTextToCopy) {
|
|
| 1172 |
});
|
| 1173 |
}
|
| 1174 |
|
| 1175 |
-
// Called explicitly from Workspace Panel
|
| 1176 |
function copyWorkspaceCode(btnElement) {
|
| 1177 |
if(S.currentWorkspaceId !== null) {
|
| 1178 |
const actualCodeString = S.codeBlocks[S.currentWorkspaceId].code;
|
|
@@ -1186,7 +770,7 @@ function copyWorkspaceCode(btnElement) {
|
|
| 1186 |
// ==========================================
|
| 1187 |
async function speakText(text) {
|
| 1188 |
let cleanText = text.replace(/[*_~`#]/g, '').replace(/<[^>]*>?/gm, '');
|
| 1189 |
-
showToast("🔊
|
| 1190 |
try {
|
| 1191 |
const res = await fetch('/api/tts', {
|
| 1192 |
method: 'POST',
|
|
@@ -1205,17 +789,47 @@ async function speakText(text) {
|
|
| 1205 |
}
|
| 1206 |
|
| 1207 |
// ==========================================
|
| 1208 |
-
// 🎤 SMART VOICE TYPING (HINDI/ENGLISH)
|
| 1209 |
// ==========================================
|
| 1210 |
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
| 1211 |
let recognition = null;
|
| 1212 |
let isRecording = false;
|
| 1213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1214 |
if (SpeechRecognition) {
|
| 1215 |
recognition = new SpeechRecognition();
|
| 1216 |
recognition.continuous = false;
|
| 1217 |
recognition.interimResults = false;
|
| 1218 |
-
recognition.lang =
|
| 1219 |
|
| 1220 |
recognition.onstart = () => {
|
| 1221 |
isRecording = true;
|
|
@@ -1235,7 +849,6 @@ if (SpeechRecognition) {
|
|
| 1235 |
if(isLiveModeActive) {
|
| 1236 |
document.getElementById('liveTranscriptText').innerText = `"${transcript}"`;
|
| 1237 |
document.getElementById('liveStatusText').innerText = "Processing...";
|
| 1238 |
-
// Automatically send message in live mode
|
| 1239 |
document.getElementById('chatInput').value = transcript;
|
| 1240 |
sendMsg();
|
| 1241 |
} else {
|
|
@@ -1266,21 +879,18 @@ function toggleVoice() {
|
|
| 1266 |
|
| 1267 |
|
| 1268 |
// ==========================================
|
| 1269 |
-
// 🟢 LIVE MODE CONTROLLER
|
| 1270 |
// ==========================================
|
| 1271 |
function startLiveMode() {
|
| 1272 |
isLiveModeActive = true;
|
| 1273 |
document.getElementById('liveOverlay').classList.add('active');
|
| 1274 |
-
// Auto start mic
|
| 1275 |
if(recognition && !isRecording) { setTimeout(() => { recognition.start(); }, 500); }
|
| 1276 |
}
|
| 1277 |
-
|
| 1278 |
function stopLiveMode() {
|
| 1279 |
isLiveModeActive = false;
|
| 1280 |
document.getElementById('liveOverlay').classList.remove('active');
|
| 1281 |
if(recognition && isRecording) { recognition.stop(); }
|
| 1282 |
}
|
| 1283 |
-
|
| 1284 |
function toggleLiveMic() {
|
| 1285 |
if(!recognition) return showToast("Not supported.");
|
| 1286 |
if(isRecording) recognition.stop(); else recognition.start();
|
|
@@ -1290,7 +900,7 @@ function toggleLiveMic() {
|
|
| 1290 |
// ==========================================
|
| 1291 |
// 🔐 AUTHENTICATION & SYNC
|
| 1292 |
// ==========================================
|
| 1293 |
-
function updateAuthUI() {
|
| 1294 |
function openAuthModal() { document.getElementById('authModal').style.display = 'flex'; }
|
| 1295 |
function closeAuthModal() { document.getElementById('authModal').style.display = 'none'; }
|
| 1296 |
function switchAuthTab(tab) { document.querySelectorAll('.tab-btn').forEach(e => e.classList.remove('active')); document.getElementById(`tab-${tab}`).classList.add('active'); document.getElementById('flow-login').style.display = tab === 'login' ? 'block' : 'none'; document.getElementById('flow-register').style.display = tab === 'register' ? 'block' : 'none'; }
|
|
@@ -1419,7 +1029,6 @@ renderer.code = function(token) {
|
|
| 1419 |
const codeText = typeof token === 'string' ? token : (token.text || '');
|
| 1420 |
const language = typeof token === 'string' ? arguments[1] : (token.lang || '');
|
| 1421 |
|
| 1422 |
-
// Dynamic "Generating Code" UI during stream
|
| 1423 |
if (window.isStreamingGlobalFlag) {
|
| 1424 |
return `
|
| 1425 |
<div class="gen-code-box">
|
|
@@ -1428,7 +1037,6 @@ renderer.code = function(token) {
|
|
| 1428 |
</div>`;
|
| 1429 |
}
|
| 1430 |
|
| 1431 |
-
// Final Workspace Button
|
| 1432 |
const id = S.codeBlocks.length;
|
| 1433 |
S.codeBlocks.push({ code: codeText, lang: language });
|
| 1434 |
return `
|
|
@@ -1494,7 +1102,7 @@ async function sendMsg(){
|
|
| 1494 |
// 🎲 POLLINATIONS RANDOM SEED GENERATOR
|
| 1495 |
const randomSeed = Math.floor(Math.random() * 999999999);
|
| 1496 |
|
| 1497 |
-
// 🧠 DYNAMIC SYSTEM PROMPT
|
| 1498 |
let sysPrompt = `You are Arjun 2.O, a highly advanced AI system developed by Abhay Kumar.
|
| 1499 |
LANGUAGE: You are fully bilingual. Write and respond fluently in BOTH English and Hindi dynamically based on user input. Do not force Hindi if user speaks English.
|
| 1500 |
|
|
@@ -1515,7 +1123,7 @@ async function sendMsg(){
|
|
| 1515 |
attachments: attachments,
|
| 1516 |
system_prompt: sysPrompt,
|
| 1517 |
history: cleanHistory,
|
| 1518 |
-
max_tokens: isLiveModeActive ? 150 : 4096,
|
| 1519 |
temperature: 0.7
|
| 1520 |
};
|
| 1521 |
|
|
@@ -1552,7 +1160,6 @@ async function sendMsg(){
|
|
| 1552 |
S.history.push({role: 'bot', content: accumulatedText});
|
| 1553 |
syncHistory();
|
| 1554 |
|
| 1555 |
-
// Auto-Play Voice if in Live Mode
|
| 1556 |
if(isLiveModeActive) {
|
| 1557 |
document.getElementById('liveStatusText').innerText = "Arjun is speaking...";
|
| 1558 |
await speakText(accumulatedText);
|
|
@@ -1587,7 +1194,6 @@ function appendBotDOM(content, isHistoryLoading=false) {
|
|
| 1587 |
function renderBotText(el, raw, isStreaming) {
|
| 1588 |
const b = el.querySelector('.bubble');
|
| 1589 |
|
| 1590 |
-
// Parse thinking tags (hidden in UI)
|
| 1591 |
const thinkRegex = /<think>([\s\S]*?)(<\/think>|$)/gi;
|
| 1592 |
let mainText = raw.replace(thinkRegex, '');
|
| 1593 |
|
|
@@ -1597,7 +1203,6 @@ function renderBotText(el, raw, isStreaming) {
|
|
| 1597 |
|
| 1598 |
let actionsDiv = el.querySelector('.msg-actions-bar');
|
| 1599 |
|
| 1600 |
-
// Generate Actions when stream completes
|
| 1601 |
if(!isStreaming && !actionsDiv && mainText.trim().length > 0) {
|
| 1602 |
const cleanRaw = mainText.replace(/"/g, '"').replace(/'/g, "\\'").replace(/\n/g, '\\n').replace(/\r/g, '');
|
| 1603 |
const rawForTTS = mainText.replace(/"/g, '"').replace(/'/g, "\\'").replace(/\n/g, ' ');
|
|
|
|
| 1 |
+
|
| 2 |
<!DOCTYPE html>
|
| 3 |
<html lang="en">
|
| 4 |
<head>
|
|
|
|
| 29 |
/* Professional Tiranga Brand Colors */
|
| 30 |
--brand-saffron: #FF9933;
|
| 31 |
--brand-saffron-light: rgba(255, 153, 51, 0.1);
|
| 32 |
+
--brand-saffron-dark: #e68a2e;
|
| 33 |
--brand-white: #FFFFFF;
|
| 34 |
--brand-green: #138808;
|
| 35 |
--brand-green-light: rgba(19, 136, 8, 0.1);
|
| 36 |
+
--brand-green-dark: #0f6e06;
|
| 37 |
|
| 38 |
/* UI Colors */
|
| 39 |
--bg-main: #ffffff;
|
|
|
|
| 161 |
border: 2px solid var(--bg-main);
|
| 162 |
transition: transform var(--trans-spring);
|
| 163 |
}
|
| 164 |
+
.brand-logo:hover img { transform: scale(1.05) rotate(-2deg); }
|
|
|
|
|
|
|
| 165 |
.brand-text { display: flex; flex-direction: column; }
|
| 166 |
+
.brand-title { font-family: var(--font-sans); font-weight: 800; font-size: 18px; color: var(--text-primary); letter-spacing: -0.5px; line-height: 1.1; }
|
| 167 |
+
.brand-subtitle { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; background: linear-gradient(90deg, var(--brand-saffron), var(--brand-green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-top: 2px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
|
| 169 |
+
.sidebar-content { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 24px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
.sidebar-content::-webkit-scrollbar { width: 4px; }
|
| 171 |
.sidebar-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }
|
| 172 |
|
| 173 |
/* Auth UI */
|
| 174 |
+
.auth-section { background: var(--bg-main); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
|
| 175 |
+
.btn-secure-login { width: 100%; padding: 12px; background: var(--text-primary); color: var(--brand-white); border: none; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--trans-fast); }
|
| 176 |
+
.btn-secure-login:hover { background: #000; transform: translateY(-2px); box-shadow: var(--shadow-md); }
|
| 177 |
+
.user-profile-card { display: none; align-items: center; gap: 12px; }
|
| 178 |
+
.user-avatar-circle { width: 40px; height: 40px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--brand-saffron), var(--brand-green)); color: var(--brand-white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; box-shadow: var(--shadow-sm); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
.user-info-text { flex: 1; overflow: hidden; }
|
| 180 |
+
.user-email-text { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
.user-status-text { font-size: 11px; color: var(--brand-green); font-weight: 500; }
|
| 182 |
+
.btn-logout { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: none; width: 32px; height: 32px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--trans-fast); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
.btn-logout:hover { background: #ef4444; color: #fff; }
|
| 184 |
|
| 185 |
/* Settings & Info */
|
| 186 |
+
.brand-info-box { background: var(--bg-main); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 24px 16px; text-align: center; box-shadow: var(--shadow-sm); margin-top: auto; position: relative; overflow: hidden; }
|
| 187 |
+
.brand-info-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand-saffron), var(--brand-white), var(--brand-green)); }
|
| 188 |
+
.brand-info-box img { width: 64px; height: 64px; border-radius: var(--radius-lg); object-fit: cover; margin-bottom: 12px; box-shadow: var(--shadow-md); border: 1px solid var(--border-light); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
.brand-info-box h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
|
| 190 |
.brand-info-box p { font-size: 10px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.5px; }
|
| 191 |
|
| 192 |
+
.btn-clear-chat { width: 100%; padding: 14px; border-radius: var(--radius-md); background: var(--bg-main); border: 1px solid var(--border-light); color: var(--text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--trans-fast); display: flex; align-items: center; justify-content: center; gap: 8px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
.btn-clear-chat:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
|
| 194 |
|
| 195 |
/* --- 5. MAIN CHAT INTERFACE --- */
|
| 196 |
+
.chat-container { flex: 1; display: flex; flex-direction: column; position: relative; min-width: 300px; transition: width var(--trans-smooth); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
|
| 198 |
+
.chat-header { padding: 16px 24px; border-bottom: 1px solid var(--border-light); background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; z-index: 10; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
.header-left { display: flex; align-items: center; gap: 12px; }
|
| 200 |
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); padding: 4px; }
|
| 201 |
|
| 202 |
+
.ai-status-badge { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-primary); padding: 6px 14px; background: var(--bg-secondary); border-radius: var(--radius-full); border: 1px solid var(--border-light); }
|
| 203 |
+
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-green); box-shadow: 0 0 0 3px rgba(19, 136, 8, 0.2); animation: pulseStatus 2s infinite; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
@keyframes pulseStatus { 0% { box-shadow: 0 0 0 0 rgba(19,136,8,0.4); } 70% { box-shadow: 0 0 0 6px rgba(19,136,8,0); } 100% { box-shadow: 0 0 0 0 rgba(19,136,8,0); } }
|
| 205 |
|
| 206 |
/* LIVE BUTTON */
|
| 207 |
+
.btn-live-mode { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; border: none; padding: 8px 16px; border-radius: var(--radius-full); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); transition: var(--trans-spring); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
.btn-live-mode:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4); }
|
| 209 |
.btn-live-mode svg { width: 16px; height: 16px; animation: blinkSVG 1.5s infinite; }
|
| 210 |
@keyframes blinkSVG { 50% { opacity: 0.5; } }
|
| 211 |
|
| 212 |
/* Messages Area */
|
| 213 |
+
.messages-area { flex: 1; overflow-y: auto; padding: 40px 10%; display: flex; flex-direction: column; gap: 32px; scroll-behavior: smooth; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
.messages-area::-webkit-scrollbar { width: 6px; }
|
| 215 |
.messages-area::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
|
| 216 |
|
| 217 |
/* Welcome Screen */
|
| 218 |
+
.welcome-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; margin: auto; animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; max-width: 700px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
|
| 220 |
|
| 221 |
.hero-icon-wrap { position: relative; margin-bottom: 32px; }
|
|
|
|
| 226 |
.hero-subtitle { font-size: 16px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 32px; }
|
| 227 |
|
| 228 |
.suggestion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: 100%; }
|
| 229 |
+
.suggestion-card { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(10px); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 20px; cursor: pointer; text-align: left; transition: var(--trans-smooth); box-shadow: var(--shadow-sm); }
|
| 230 |
+
.suggestion-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-saffron); background: rgba(255, 255, 255, 0.9); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
.sugg-icon { font-size: 24px; margin-bottom: 12px; display: inline-block; }
|
| 232 |
.sugg-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
|
| 233 |
.sugg-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
|
|
|
|
| 239 |
.message-row.user-msg { flex-direction: row-reverse; align-self: flex-end; }
|
| 240 |
.message-row.bot-msg { align-self: flex-start; }
|
| 241 |
|
| 242 |
+
.avatar-box { width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; box-shadow: var(--shadow-sm); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 243 |
.user-msg .avatar-box { background: var(--text-primary); color: var(--brand-white); }
|
| 244 |
.bot-msg .avatar-box { background: var(--bg-main); border: 1px solid var(--border-light); padding: 2px; }
|
| 245 |
.bot-msg .avatar-box img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; }
|
|
|
|
| 247 |
.msg-content-wrapper { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
|
| 248 |
.user-msg .msg-content-wrapper { align-items: flex-end; }
|
| 249 |
|
| 250 |
+
.file-badge { font-size: 11px; font-weight: 600; color: var(--brand-saffron); background: var(--brand-saffron-light); padding: 4px 10px; border-radius: var(--radius-full); margin-bottom: 4px; display: inline-flex; align-items: center; gap: 4px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
|
| 252 |
+
.bubble { padding: 16px 22px; font-size: 15px; line-height: 1.6; position: relative; word-wrap: break-word; }
|
| 253 |
+
.user-msg .bubble { background: var(--bg-tertiary); color: var(--text-primary); border-radius: 20px 20px 4px 20px; border: 1px solid var(--border-light); }
|
| 254 |
+
.bot-msg .bubble { background: var(--bg-main); border: 1px solid var(--border-light); border-radius: 4px 20px 20px 20px; box-shadow: var(--shadow-sm); width: 100%; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
|
| 256 |
/* Bot Actions (TTS & Copy) */
|
| 257 |
+
.msg-actions-bar { display: flex; gap: 8px; margin-top: 6px; padding-left: 12px; opacity: 0; transition: opacity var(--trans-smooth); flex-wrap: wrap; }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
.bot-msg:hover .msg-actions-bar { opacity: 1; }
|
| 259 |
|
| 260 |
+
.action-chip { background: var(--bg-secondary); border: 1px solid var(--border-light); color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-full); transition: var(--trans-fast); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
.action-chip:hover { background: var(--bg-tertiary); color: var(--text-primary); transform: translateY(-1px); }
|
| 262 |
.action-chip.btn-tts { color: var(--brand-green); border-color: rgba(19, 136, 8, 0.2); background: var(--brand-green-light); }
|
| 263 |
.action-chip.btn-tts:hover { background: rgba(19, 136, 8, 0.15); }
|
|
|
|
| 266 |
.bubble p { margin-bottom: 14px; }
|
| 267 |
.bubble p:last-child { margin-bottom: 0; }
|
| 268 |
.bubble strong { font-weight: 700; color: var(--text-primary); }
|
| 269 |
+
.bubble code { font-family: var(--font-mono); background: var(--bg-tertiary); padding: 3px 6px; border-radius: 6px; font-size: 0.85em; color: #d946ef; }
|
| 270 |
+
.bubble img { max-width: 100%; border-radius: 12px; margin: 12px 0; box-shadow: var(--shadow-md); border: 1px solid var(--border-light); display: block; }
|
| 271 |
+
.bubble pre { background: #282c34; color: #abb2bf; padding: 16px; border-radius: 12px; overflow-x: auto; margin: 16px 0; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.5; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
.bubble pre code { background: transparent; color: inherit; padding: 0; }
|
| 273 |
|
| 274 |
/* Generating Code UI */
|
| 275 |
+
.gen-code-box { background: #1e1e2e; border-radius: 12px; border: 1px solid #313244; overflow: hidden; margin: 16px 0; box-shadow: var(--shadow-md); }
|
| 276 |
+
.gen-code-hdr { background: #11111b; padding: 10px 16px; font-size: 12px; font-weight: 600; color: #a6adc8; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #313244; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; }
|
| 277 |
+
.spinner-mini { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--brand-saffron); border-radius: 50%; animation: spin 1s linear infinite; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
@keyframes spin { to { transform: rotate(360deg); } }
|
| 279 |
.gen-code-box pre { margin: 0; background: transparent; }
|
| 280 |
|
| 281 |
/* Workspace Trigger Card */
|
| 282 |
+
.workspace-card { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: 12px; padding: 16px; margin: 16px 0; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
.ws-card-info { display: flex; align-items: center; gap: 14px; }
|
| 284 |
+
.ws-card-icon { width: 48px; height: 48px; border-radius: 10px; background: var(--bg-main); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); color: var(--text-primary); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 285 |
.ws-card-text h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
|
| 286 |
.ws-card-text p { font-size: 12px; color: var(--text-tertiary); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.5px; }
|
| 287 |
+
.btn-view-ws { padding: 10px 20px; background: var(--text-primary); color: var(--brand-white); border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--trans-spring); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
.btn-view-ws:hover { transform: scale(1.05); background: var(--brand-saffron); box-shadow: 0 4px 12px rgba(255,153,51,0.3); }
|
| 289 |
|
| 290 |
/* Scroll Bottom Button */
|
| 291 |
+
.btn-scroll-down { position: absolute; bottom: 130px; left: 50%; transform: translateX(-50%) translateY(20px); width: 44px; height: 44px; border-radius: 50%; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-light); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); opacity: 0; pointer-events: none; transition: var(--trans-smooth); z-index: 20; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
.btn-scroll-down.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
|
| 293 |
.btn-scroll-down:hover { background: var(--bg-main); color: var(--text-primary); transform: translateX(-50%) translateY(-5px); box-shadow: var(--shadow-lg); }
|
| 294 |
|
| 295 |
/* --- 6. INPUT AREA & ATTACHMENTS --- */
|
| 296 |
+
.input-region { flex-shrink: 0; padding: 0 40px 30px; background: transparent; position: relative; z-index: 20; }
|
| 297 |
+
.input-box-wrapper { display: flex; flex-direction: column; background: var(--glass-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--border-light); border-radius: var(--radius-xl); box-shadow: var(--shadow-float); transition: var(--trans-smooth); }
|
| 298 |
+
.input-box-wrapper:focus-within { border-color: var(--brand-saffron); box-shadow: 0 15px 35px -5px rgba(255,153,51,0.15), 0 0 0 3px var(--brand-saffron-light); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
|
| 300 |
/* Attachment Preview */
|
| 301 |
+
.file-preview-strip { display: none; padding: 16px 24px 0; align-items: center; gap: 12px; }
|
|
|
|
|
|
|
| 302 |
.file-preview-strip.active { display: flex; animation: fadeIn 0.3s ease; }
|
| 303 |
+
.preview-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-light); display: flex; justify-content: center; align-items: center; background: var(--bg-secondary); font-size: 20px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
.preview-details { flex: 1; }
|
| 305 |
.preview-name { font-size: 13px; font-weight: 600; color: var(--text-primary); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
| 306 |
+
.btn-remove-file { background: rgba(239, 68, 68, 0.1); border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #ef4444; transition: var(--trans-fast); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
.btn-remove-file:hover { background: #ef4444; color: #fff; }
|
| 308 |
|
| 309 |
+
.input-controls-row { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px 12px 20px; }
|
|
|
|
|
|
|
|
|
|
| 310 |
|
| 311 |
+
.chat-textarea { flex: 1; border: none; outline: none; background: transparent; font-family: var(--font-sans); font-size: 15px; color: var(--text-primary); line-height: 1.5; resize: none; max-height: 180px; min-height: 24px; padding: 10px 0; margin-left: 8px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
.chat-textarea::placeholder { color: var(--text-tertiary); }
|
| 313 |
|
| 314 |
/* Attachment Menu (Gemini Style) */
|
| 315 |
.attach-menu-container { position: relative; }
|
| 316 |
+
.btn-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: transparent; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: var(--trans-fast); position: relative; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
.btn-icon:hover { background: var(--bg-secondary); color: var(--text-primary); }
|
| 318 |
.btn-icon svg { width: 22px; height: 22px; }
|
| 319 |
|
| 320 |
+
.attach-popup { position: absolute; bottom: 55px; left: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 8px; box-shadow: var(--shadow-float); display: none; flex-direction: column; gap: 4px; z-index: 100; min-width: 180px; transform: translateY(10px) scale(0.95); opacity: 0; transition: all var(--trans-fast); transform-origin: bottom left; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
.attach-popup.show { display: flex; transform: translateY(0) scale(1); opacity: 1; }
|
| 322 |
+
.attach-option { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-primary); transition: var(--trans-fast); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
.attach-option:hover { background: var(--bg-secondary); color: var(--brand-saffron); }
|
| 324 |
.attach-option span.ico { font-size: 18px; }
|
| 325 |
.hidden-file-input { display: none; }
|
| 326 |
|
| 327 |
+
/* Voice Mic & SMART LANGUAGE TOGGLE */
|
| 328 |
+
.btn-lang-toggle { font-size: 12px; font-weight: 700; color: var(--text-secondary); border: 1px solid var(--border-light); background: var(--bg-main); border-radius: 8px; padding: 4px 8px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 4px;}
|
| 329 |
+
.btn-lang-toggle:hover { background: var(--brand-saffron-light); color: var(--brand-saffron-dark); border-color: var(--brand-saffron); }
|
| 330 |
+
.btn-lang-toggle.active-hi { background: var(--brand-green-light); color: var(--brand-green-dark); border-color: var(--brand-green); }
|
| 331 |
+
|
| 332 |
+
.btn-mic.is-listening { color: #ef4444; background: rgba(239, 68, 68, 0.1); animation: pulseMic 1.5s infinite; }
|
| 333 |
@keyframes pulseMic { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
|
| 334 |
|
| 335 |
/* Send Button */
|
| 336 |
+
.btn-send { width: 44px; height: 44px; border-radius: 14px; border: none; background: linear-gradient(135deg, var(--brand-saffron) 0%, var(--brand-green) 100%); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--trans-spring); box-shadow: 0 4px 15px rgba(19, 136, 8, 0.2); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 337 |
.btn-send svg { width: 18px; height: 18px; fill: white; transition: transform 0.2s; }
|
| 338 |
.btn-send:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 153, 51, 0.3); }
|
| 339 |
.btn-send:hover svg { transform: translate(2px, -2px); }
|
|
|
|
| 342 |
.footer-branding { text-align: center; font-size: 11px; color: var(--text-tertiary); margin-top: 14px; font-weight: 500; letter-spacing: 0.5px; }
|
| 343 |
|
| 344 |
/* --- 7. WORKSPACE (CODE EDITOR PANEL) --- */
|
| 345 |
+
.workspace-panel { width: 0; background: var(--bg-main); border-left: 1px solid var(--border-light); display: flex; flex-direction: column; transition: width var(--trans-smooth); overflow: hidden; box-shadow: -10px 0 30px rgba(0,0,0,0.03); z-index: 25; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 346 |
.workspace-panel.active { width: 50%; }
|
| 347 |
+
.ws-header { padding: 16px 24px; border-bottom: 1px solid var(--border-light); background: var(--bg-main); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
.ws-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
|
| 349 |
.ws-actions-group { display: flex; gap: 10px; }
|
| 350 |
+
.btn-ws-action { padding: 8px 16px; border-radius: var(--radius-sm); background: var(--bg-secondary); border: 1px solid var(--border-light); cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--text-primary); transition: var(--trans-fast); font-size: 13px; font-weight: 600; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
.btn-ws-action:hover { background: var(--bg-tertiary); }
|
| 352 |
.btn-ws-close { padding: 8px; }
|
| 353 |
.btn-ws-close:hover { color: #ef4444; background: #fee2e2; border-color: #fca5a5; }
|
|
|
|
| 354 |
.ws-editor-area { flex: 1; overflow-y: auto; background: var(--bg-secondary); padding: 24px; }
|
| 355 |
+
.ws-editor-area pre { margin: 0; padding: 24px; background: #282c34; border: 1px solid var(--border-light); border-radius: var(--radius-lg); font-family: var(--font-mono); font-size: 14px; line-height: 1.6; overflow-x: auto; box-shadow: var(--shadow-md); color: #abb2bf; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
|
| 357 |
/* --- 8. LIVE MODE OVERLAY (नया फीचर) --- */
|
| 358 |
+
.live-overlay { position: fixed; inset: 0; background: rgba(255, 255, 255, 0.98); z-index: 9000; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity var(--trans-smooth); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
.live-overlay.active { opacity: 1; pointer-events: auto; }
|
| 360 |
.live-close-btn { position: absolute; top: 30px; right: 30px; background: rgba(0,0,0,0.05); border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer; transition: 0.2s; }
|
| 361 |
.live-close-btn:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; transform: rotate(90deg); }
|
|
|
|
| 362 |
.live-orb-container { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; margin-bottom: 40px; }
|
| 363 |
.live-orb-core { width: 100px; height: 100px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-saffron), var(--brand-green)); box-shadow: 0 0 40px rgba(19, 136, 8, 0.4); position: relative; z-index: 2; transition: transform 0.1s; }
|
| 364 |
.live-orb-ring { position: absolute; inset: 0; border: 2px solid var(--brand-saffron); border-radius: 50%; opacity: 0; animation: ripple 2s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
|
| 365 |
.live-orb-ring:nth-child(2) { animation-delay: 0.6s; border-color: var(--brand-green); }
|
| 366 |
.live-orb-ring:nth-child(3) { animation-delay: 1.2s; border-color: var(--text-primary); }
|
| 367 |
@keyframes ripple { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
|
|
|
|
| 368 |
.live-status-text { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 12px; font-family: var(--font-sans); }
|
| 369 |
.live-transcript { font-size: 16px; color: var(--text-secondary); max-width: 600px; text-align: center; line-height: 1.5; min-height: 48px; }
|
|
|
|
| 370 |
.live-controls { display: flex; gap: 20px; margin-top: 40px; }
|
| 371 |
.btn-live-action { width: 64px; height: 64px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-md); transition: var(--trans-spring); }
|
| 372 |
.btn-live-action.mic { background: var(--bg-main); border: 2px solid var(--border-light); color: var(--text-primary); }
|
|
|
|
| 589 |
<input type="file" id="inp-document" class="hidden-file-input" accept=".pdf,.doc,.docx,.txt,.md,.csv,.json,.py,.js,.html,.css,.cpp,.c,.java" onchange="handleSpecificFile(this, 'document')">
|
| 590 |
</div>
|
| 591 |
|
| 592 |
+
<!-- NEW: SMART LANGUAGE TOGGLE FOR STT -->
|
| 593 |
+
<button class="btn-lang-toggle" id="langToggleBtn" onclick="toggleSpeechLang()" title="Toggle Voice Language (EN/HI)">
|
| 594 |
+
🌐 <span id="langIndicator">EN</span>
|
| 595 |
+
</button>
|
| 596 |
+
|
| 597 |
<!-- Voice Mic -->
|
| 598 |
<button class="btn-icon btn-mic" id="voiceBtn" onclick="toggleVoice()" title="Dictate Message">
|
| 599 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" x2="12" y1="19" y2="22"></line></svg>
|
|
|
|
| 720 |
function executeFallbackCopy(text, btnElement) {
|
| 721 |
var textArea = document.createElement("textarea");
|
| 722 |
textArea.value = text;
|
|
|
|
| 723 |
textArea.style.top = "0";
|
| 724 |
textArea.style.left = "0";
|
| 725 |
textArea.style.position = "fixed";
|
|
|
|
| 757 |
});
|
| 758 |
}
|
| 759 |
|
|
|
|
| 760 |
function copyWorkspaceCode(btnElement) {
|
| 761 |
if(S.currentWorkspaceId !== null) {
|
| 762 |
const actualCodeString = S.codeBlocks[S.currentWorkspaceId].code;
|
|
|
|
| 770 |
// ==========================================
|
| 771 |
async function speakText(text) {
|
| 772 |
let cleanText = text.replace(/[*_~`#]/g, '').replace(/<[^>]*>?/gm, '');
|
| 773 |
+
showToast("🔊 Preparing High-Quality Audio...");
|
| 774 |
try {
|
| 775 |
const res = await fetch('/api/tts', {
|
| 776 |
method: 'POST',
|
|
|
|
| 789 |
}
|
| 790 |
|
| 791 |
// ==========================================
|
| 792 |
+
// 🎤 SMART VOICE TYPING (HINDI/ENGLISH TOGGLE)
|
| 793 |
// ==========================================
|
| 794 |
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
| 795 |
let recognition = null;
|
| 796 |
let isRecording = false;
|
| 797 |
|
| 798 |
+
// Default STT language
|
| 799 |
+
let currentSpeechLang = 'en-IN'; // Default to English/Hinglish
|
| 800 |
+
|
| 801 |
+
function toggleSpeechLang() {
|
| 802 |
+
const btn = document.getElementById('langToggleBtn');
|
| 803 |
+
const indicator = document.getElementById('langIndicator');
|
| 804 |
+
|
| 805 |
+
if(currentSpeechLang === 'en-IN') {
|
| 806 |
+
currentSpeechLang = 'hi-IN';
|
| 807 |
+
indicator.innerText = 'हि';
|
| 808 |
+
btn.classList.add('active-hi');
|
| 809 |
+
showToast("Voice Mode: Pure Hindi (देवनागरी)");
|
| 810 |
+
} else {
|
| 811 |
+
currentSpeechLang = 'en-IN';
|
| 812 |
+
indicator.innerText = 'EN';
|
| 813 |
+
btn.classList.remove('active-hi');
|
| 814 |
+
showToast("Voice Mode: English / Hinglish");
|
| 815 |
+
}
|
| 816 |
+
|
| 817 |
+
// Update recognition engine language if it exists
|
| 818 |
+
if(recognition) {
|
| 819 |
+
recognition.lang = currentSpeechLang;
|
| 820 |
+
// If it was recording, restart it to apply new language
|
| 821 |
+
if(isRecording) {
|
| 822 |
+
recognition.stop();
|
| 823 |
+
setTimeout(() => recognition.start(), 300);
|
| 824 |
+
}
|
| 825 |
+
}
|
| 826 |
+
}
|
| 827 |
+
|
| 828 |
if (SpeechRecognition) {
|
| 829 |
recognition = new SpeechRecognition();
|
| 830 |
recognition.continuous = false;
|
| 831 |
recognition.interimResults = false;
|
| 832 |
+
recognition.lang = currentSpeechLang;
|
| 833 |
|
| 834 |
recognition.onstart = () => {
|
| 835 |
isRecording = true;
|
|
|
|
| 849 |
if(isLiveModeActive) {
|
| 850 |
document.getElementById('liveTranscriptText').innerText = `"${transcript}"`;
|
| 851 |
document.getElementById('liveStatusText').innerText = "Processing...";
|
|
|
|
| 852 |
document.getElementById('chatInput').value = transcript;
|
| 853 |
sendMsg();
|
| 854 |
} else {
|
|
|
|
| 879 |
|
| 880 |
|
| 881 |
// ==========================================
|
| 882 |
+
// 🟢 LIVE MODE CONTROLLER
|
| 883 |
// ==========================================
|
| 884 |
function startLiveMode() {
|
| 885 |
isLiveModeActive = true;
|
| 886 |
document.getElementById('liveOverlay').classList.add('active');
|
|
|
|
| 887 |
if(recognition && !isRecording) { setTimeout(() => { recognition.start(); }, 500); }
|
| 888 |
}
|
|
|
|
| 889 |
function stopLiveMode() {
|
| 890 |
isLiveModeActive = false;
|
| 891 |
document.getElementById('liveOverlay').classList.remove('active');
|
| 892 |
if(recognition && isRecording) { recognition.stop(); }
|
| 893 |
}
|
|
|
|
| 894 |
function toggleLiveMic() {
|
| 895 |
if(!recognition) return showToast("Not supported.");
|
| 896 |
if(isRecording) recognition.stop(); else recognition.start();
|
|
|
|
| 900 |
// ==========================================
|
| 901 |
// 🔐 AUTHENTICATION & SYNC
|
| 902 |
// ==========================================
|
| 903 |
+
function updateAuthUI() { if (currentUser) { document.getElementById('loginPromptBtn').style.display = 'none'; document.getElementById('userProfile').style.display = 'flex'; document.getElementById('uEmail').innerText = currentUser; document.getElementById('uAvatar').innerText = currentUser.charAt(0).toUpperCase(); document.getElementById('guestBadge').style.display = 'none'; } else { document.getElementById('loginPromptBtn').style.display = 'flex'; document.getElementById('userProfile').style.display = 'none'; } }
|
| 904 |
function openAuthModal() { document.getElementById('authModal').style.display = 'flex'; }
|
| 905 |
function closeAuthModal() { document.getElementById('authModal').style.display = 'none'; }
|
| 906 |
function switchAuthTab(tab) { document.querySelectorAll('.tab-btn').forEach(e => e.classList.remove('active')); document.getElementById(`tab-${tab}`).classList.add('active'); document.getElementById('flow-login').style.display = tab === 'login' ? 'block' : 'none'; document.getElementById('flow-register').style.display = tab === 'register' ? 'block' : 'none'; }
|
|
|
|
| 1029 |
const codeText = typeof token === 'string' ? token : (token.text || '');
|
| 1030 |
const language = typeof token === 'string' ? arguments[1] : (token.lang || '');
|
| 1031 |
|
|
|
|
| 1032 |
if (window.isStreamingGlobalFlag) {
|
| 1033 |
return `
|
| 1034 |
<div class="gen-code-box">
|
|
|
|
| 1037 |
</div>`;
|
| 1038 |
}
|
| 1039 |
|
|
|
|
| 1040 |
const id = S.codeBlocks.length;
|
| 1041 |
S.codeBlocks.push({ code: codeText, lang: language });
|
| 1042 |
return `
|
|
|
|
| 1102 |
// 🎲 POLLINATIONS RANDOM SEED GENERATOR
|
| 1103 |
const randomSeed = Math.floor(Math.random() * 999999999);
|
| 1104 |
|
| 1105 |
+
// 🧠 DYNAMIC SYSTEM PROMPT
|
| 1106 |
let sysPrompt = `You are Arjun 2.O, a highly advanced AI system developed by Abhay Kumar.
|
| 1107 |
LANGUAGE: You are fully bilingual. Write and respond fluently in BOTH English and Hindi dynamically based on user input. Do not force Hindi if user speaks English.
|
| 1108 |
|
|
|
|
| 1123 |
attachments: attachments,
|
| 1124 |
system_prompt: sysPrompt,
|
| 1125 |
history: cleanHistory,
|
| 1126 |
+
max_tokens: isLiveModeActive ? 150 : 4096,
|
| 1127 |
temperature: 0.7
|
| 1128 |
};
|
| 1129 |
|
|
|
|
| 1160 |
S.history.push({role: 'bot', content: accumulatedText});
|
| 1161 |
syncHistory();
|
| 1162 |
|
|
|
|
| 1163 |
if(isLiveModeActive) {
|
| 1164 |
document.getElementById('liveStatusText').innerText = "Arjun is speaking...";
|
| 1165 |
await speakText(accumulatedText);
|
|
|
|
| 1194 |
function renderBotText(el, raw, isStreaming) {
|
| 1195 |
const b = el.querySelector('.bubble');
|
| 1196 |
|
|
|
|
| 1197 |
const thinkRegex = /<think>([\s\S]*?)(<\/think>|$)/gi;
|
| 1198 |
let mainText = raw.replace(thinkRegex, '');
|
| 1199 |
|
|
|
|
| 1203 |
|
| 1204 |
let actionsDiv = el.querySelector('.msg-actions-bar');
|
| 1205 |
|
|
|
|
| 1206 |
if(!isStreaming && !actionsDiv && mainText.trim().length > 0) {
|
| 1207 |
const cleanRaw = mainText.replace(/"/g, '"').replace(/'/g, "\\'").replace(/\n/g, '\\n').replace(/\r/g, '');
|
| 1208 |
const rawForTTS = mainText.replace(/"/g, '"').replace(/'/g, "\\'").replace(/\n/g, ' ');
|