File size: 11,948 Bytes
ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 abc6641 0148163 abc6641 0148163 abc6641 0148163 abc6641 ed71793 0148163 ed71793 0148163 ed71793 0148163 abc6641 0148163 abc6641 0148163 ed71793 0148163 abc6641 0148163 abc6641 0148163 abc6641 0148163 abc6641 0148163 abc6641 ed71793 02efbd4 ed71793 02efbd4 ed71793 abc6641 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 ed71793 abc6641 ed71793 02efbd4 ed71793 02efbd4 ed71793 02efbd4 |
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 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
/* Global styles */
:root {
--primary-color: #4285F4;
--primary-dark: #3367D6;
--secondary-color: #34A853;
--accent-color: #FBBC05;
--danger-color: #EA4335;
--text-dark: #202124;
--text-light: #5f6368;
--gray-light: #f5f5f5;
--gray-medium: #e8eaed;
--gray-border: #dadce0;
--white: #ffffff;
--rtl-dir: rtl;
--ltr-dir: ltr;
--box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
--border-radius: 8px;
--transition-speed: 0.3s;
--panel-background: #f8f9fa;
}
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* Header styles */
header {
background-color: #fff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
flex-direction: column;
}
.logo h1 {
font-size: 2rem;
font-weight: 700;
}
.primary-color {
color: #4285f4;
}
.tagline {
font-size: 0.9rem;
color: #666;
margin-top: -5px;
}
nav ul {
display: flex;
list-style: none;
}
nav ul li {
margin-left: 1.5rem;
position: relative;
}
nav ul li::after {
content: '';
display: block;
width: 0;
height: 3px;
background-color: #4285f4;
position: absolute;
bottom: -10px;
left: 0;
transition: width 0.3s;
}
nav ul li.active::after,
nav ul li:hover::after {
width: 100%;
}
nav a {
color: #333;
text-decoration: none;
font-weight: 500;
font-size: 1rem;
padding: 0.5rem 0;
transition: color 0.3s;
}
nav a:hover,
nav ul li.active a {
color: #4285f4;
}
/* Main content styles */
main {
flex: 1;
padding: 2rem;
max-width: 1200px;
margin: 0 auto;
width: 100%;
}
.translation-section {
width: 100%;
}
.hidden {
display: none;
}
.translation-container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.translation-box {
padding: 1.5rem;
}
/* Language controls */
.language-controls {
display: flex;
align-items: center;
border-bottom: 1px solid #eee;
padding-bottom: 1.5rem;
margin-bottom: 1.5rem;
}
.language-selector {
flex: 1;
}
.lang-select {
width: 100%;
padding: 0.8rem;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
background-color: #f9f9f9;
cursor: pointer;
transition: border-color 0.3s, box-shadow 0.3s;
appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 0.7rem center;
background-size: 1em;
padding-right: 2.5rem;
}
.lang-select:focus {
outline: none;
border-color: #4285f4;
box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.25);
}
.lang-select option {
font-size: 0.95rem;
padding: 0.5rem;
}
.lang-select option[value="auto"] {
font-weight: bold;
}
.swap-languages {
margin: 0 1.5rem;
}
.swap-languages button {
background-color: #f1f1f1;
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
cursor: pointer;
transition: background-color 0.3s, transform 0.3s;
display: flex;
justify-content: center;
align-items: center;
}
.swap-languages button:hover {
background-color: #e0e0e0;
transform: rotate(180deg);
}
.swap-languages i {
font-size: 1.2rem;
color: #555;
}
/* Translation panels */
.translation-panels {
display: flex;
gap: 2rem;
margin-bottom: 1.5rem;
}
.panel {
flex: 1;
border: 1px solid #eee;
border-radius: 8px;
overflow: hidden;
display: flex;
flex-direction: column;
}
.panel-header {
background-color: #f9f9f9;
padding: 0.8rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
}
.panel-title {
font-weight: 600;
color: #555;
}
.panel-actions {
display: flex;
}
.icon-button {
background: none;
border: none;
font-size: 1rem;
padding: 0.3rem;
cursor: pointer;
border-radius: 3px;
transition: background-color 0.2s;
color: #777;
}
.icon-button:hover {
background-color: #e0e0e0;
color: #4285f4;
}
textarea#text-input {
resize: none;
border: none;
padding: 1rem;
width: 100%;
height: 200px;
font-family: inherit;
font-size: 1rem;
}
textarea#text-input:focus {
outline: none;
}
#text-result,
.document-content {
padding: 1rem;
height: 200px;
overflow-y: auto;
background-color: #fcfcfc;
flex: 1;
}
.panel-footer {
padding: 0.8rem;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #f9f9f9;
border-top: 1px solid #eee;
}
.char-count {
font-size: 0.85rem;
color: #777;
}
.translate-button {
background-color: #4285f4;
color: white;
border: none;
border-radius: 5px;
padding: 0.6rem 1.2rem;
font-size: 1rem;
cursor: pointer;
transition: background-color 0.3s;
display: flex;
align-items: center;
gap: 0.5rem;
}
.translate-button:hover {
background-color: #3367d6;
}
.translate-button:disabled {
background-color: #b3b3b3;
cursor: not-allowed;
}
/* Active translate button */
.translate-button.active-button {
background-color: #4285f4;
opacity: 1;
}
/* Translate button for documents - default transparent until file is selected */
#doc-translation-form .translate-button {
opacity: 0.6;
background-color: rgba(66, 133, 244, 0.8);
transition: all 0.3s ease;
cursor: not-allowed;
}
#doc-translation-form .translate-button.active-button {
background-color: #4285f4;
opacity: 1;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* Document upload area */
.file-upload-area {
border: 2px dashed #ddd;
border-radius: 10px;
padding: 2.5rem;
text-align: center;
margin: 2rem 0;
transition: border-color 0.3s, background-color 0.3s;
position: relative;
}
.file-upload-area:hover {
background-color: #f9f9f9;
border-color: #4285f4;
}
.file-upload-label {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
}
.file-upload-label i {
font-size: 2.5rem;
color: #4285f4;
margin-bottom: 1rem;
}
.file-types {
font-size: 0.85rem;
color: #777;
margin-top: 0.5rem;
}
input.file-input {
display: none;
}
/* File name display - improved styling */
#file-name-display {
margin-top: 1rem;
padding: 0.7rem 1rem;
background-color: #e8f0fe;
border-radius: 4px;
color: #1a73e8;
font-weight: 500;
display: none;
margin-bottom: 1rem;
border-left: 3px solid #4285f4;
}
.document-result-area {
margin-top: 2rem;
}
.document-panels {
display: none;
}
.document-actions {
display: flex;
justify-content: center;
margin-top: 1rem;
}
.file-info {
font-size: 0.85rem;
color: #777;
}
/* Download button - enhanced styling */
.download-button {
background-color: #34A853;
color: white;
border: none;
border-radius: 5px;
padding: 0.8rem 1.5rem;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
margin: 1.5rem auto;
width: fit-content;
min-width: 200px;
box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.download-button:hover {
background-color: #2a8a46;
box-shadow: 0 3px 8px rgba(0,0,0,0.2);
transform: translateY(-1px);
}
.download-button i {
font-size: 1.1rem;
}
/* Loading indicator */
.loading-indicator {
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
text-align: center;
color: #555;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid rgba(66, 133, 244, 0.2);
border-left-color: #4285f4;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Notification and error messages */
.notification,
.error-message {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
padding: 0.8rem 1.5rem;
border-radius: 5px;
font-weight: 500;
z-index: 100;
display: none;
opacity: 0;
transition: opacity 0.3s;
max-width: 90%;
}
.notification {
background-color: #4caf50;
color: white;
}
.error-message {
background-color: #f44336;
color: white;
padding: 1rem;
border-radius: 4px;
margin-bottom: 1rem;
text-align: center;
display: none;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* Show animation for notification */
.notification.show,
.error-message.show {
display: block;
opacity: 1;
animation: fadeIn 0.3s;
}
/* Footer */
footer {
background-color: #333;
color: #fff;
padding: 1.5rem;
text-align: center;
}
.footer-content p {
font-size: 0.9rem;
opacity: 0.8;
}
/* Debug info */
.debug-info {
background-color: #ffe082;
color: #333;
padding: 1rem;
margin: 1rem 0;
border-radius: 5px;
font-family: monospace;
display: none;
}
/* Quick phrases styles */
.quick-phrases-container {
margin-top: 1.5rem;
border-top: 1px solid #eee;
padding-top: 1.5rem;
}
.quick-phrases {
margin-bottom: 1.5rem;
background-color: var(--panel-background);
border-radius: var(--border-radius);
padding: 1rem;
border: 1px solid var(--gray-border);
}
.quick-phrases h3 {
margin-bottom: 0.8rem;
color: var(--text-dark);
font-size: 0.95rem;
font-weight: 600;
}
.phrases-container {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.phrase-btn {
background-color: var(--white);
border: 1px solid var(--gray-border);
border-radius: 20px;
padding: 0.4rem 0.8rem;
font-size: 0.85rem;
cursor: pointer;
transition: all var(--transition-speed);
}
.phrase-btn:hover {
background-color: var(--primary-color);
color: var(--white);
border-color: var(--primary-color);
}
.phrase-btn.ar {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* Auto-detect language badge */
.detected-language {
display: inline-block;
background-color: #e8f0fe;
color: #1a73e8;
padding: 0.2rem 0.5rem;
border-radius: 3px;
font-size: 0.8rem;
margin-left: 0.5rem;
font-weight: normal;
}
/* RTL support for text areas and panels */
[dir="rtl"] {
text-align: right;
}
/* Responsive design */
@media (max-width: 768px) {
.translation-panels {
flex-direction: column;
}
header {
flex-direction: column;
padding: 1rem;
}
nav ul li {
margin-left: 1rem;
margin-top: 0.5rem;
}
.language-controls {
flex-direction: column;
gap: 1rem;
flex-wrap: wrap;
}
.language-selector {
flex-basis: 100%;
}
.swap-languages {
margin: 0 auto;
}
.translation-box {
padding: 1rem;
}
.file-upload-area {
padding: 1.5rem;
}
}
/* Animation for loading and transitions */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.translated-text {
animation: fadeIn 0.4s ease-in-out;
}
|