Spaces:
Sleeping
Sleeping
| /* Add these styles to ensure dark mode works properly */ | |
| :root { | |
| color-scheme: light; | |
| } | |
| html.dark { | |
| color-scheme: dark; | |
| } | |
| /* Make sure transitions are smooth */ | |
| html { | |
| transition: background-color 0.3s ease, color 0.3s ease; | |
| } | |
| @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"); | |
| body { | |
| font-family: "Poppins", Arial, sans-serif; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| /* Ensure dark mode styles are applied */ | |
| html.dark body { | |
| background-color: #1a202c; | |
| color: #f7fafc; | |
| } | |
| .tab-button.active { | |
| color: #7c3aed; | |
| border-bottom: 2px solid #7c3aed; | |
| } | |
| html.dark .tab-button.active { | |
| color: #a78bfa; | |
| border-bottom: 2px solid #a78bfa; | |
| } | |
| .tab-button:not(.active) { | |
| border-bottom: 2px solid transparent; | |
| } | |
| #output { | |
| font-family: "Poppins", Arial, sans-serif; | |
| } | |
| /* Custom scrollbar */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: #f1f1f1; | |
| } | |
| html.dark ::-webkit-scrollbar-track { | |
| background: #374151; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: #c4b5fd; | |
| border-radius: 10px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: #a78bfa; | |
| } | |
| /* Animation for notifications */ | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(-10px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| .notification { | |
| animation: fadeIn 0.3s ease-out forwards; | |
| } | |
| /* Language selection styles */ | |
| #translationOptions { | |
| transition: all 0.3s ease; | |
| } | |
| #translationOptions.hidden { | |
| display: none; | |
| } | |
| select { | |
| 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='currentColor' 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; | |
| } | |
| /* Formatted output styles */ | |
| .formatted-output { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 16px; | |
| width: 100%; | |
| } | |
| .result-header { | |
| margin-bottom: 8px; | |
| } | |
| .result-header h3 { | |
| font-size: 18px; | |
| font-weight: 600; | |
| color: #4b5563; | |
| margin: 0; | |
| padding-bottom: 8px; | |
| border-bottom: 1px solid #e5e7eb; | |
| } | |
| html.dark .result-header h3 { | |
| color: #e5e7eb; | |
| border-bottom: 1px solid #4b5563; | |
| } | |
| .text-box { | |
| background-color: white; | |
| border-radius: 8px; | |
| border: 1px solid #e5e7eb; | |
| overflow: hidden; | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); | |
| } | |
| html.dark .text-box { | |
| background-color: #1f2937; | |
| border: 1px solid #374151; | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); | |
| } | |
| .text-box-header { | |
| background-color: #f9fafb; | |
| padding: 8px 12px; | |
| font-weight: 500; | |
| color: #4b5563; | |
| border-bottom: 1px solid #e5e7eb; | |
| font-size: 14px; | |
| } | |
| html.dark .text-box-header { | |
| background-color: #374151; | |
| color: #e5e7eb; | |
| border-bottom: 1px solid #4b5563; | |
| } | |
| .text-content { | |
| padding: 12px 16px; | |
| line-height: 1.6; | |
| color: #1f2937; | |
| } | |
| html.dark .text-content { | |
| color: #f3f4f6; | |
| } | |
| .original .text-box-header { | |
| background-color: #eff6ff; | |
| color: #1e40af; | |
| } | |
| html.dark .original .text-box-header { | |
| background-color: #1e3a8a; | |
| color: #93c5fd; | |
| } | |
| .translated .text-box-header { | |
| background-color: #f0fdf4; | |
| color: #166534; | |
| } | |
| html.dark .translated .text-box-header { | |
| background-color: #14532d; | |
| color: #86efac; | |
| } | |
| .question .text-box-header { | |
| background-color: #fff7ed; | |
| color: #9a3412; | |
| } | |
| html.dark .question .text-box-header { | |
| background-color: #7c2d12; | |
| color: #fdba74; | |
| } | |
| .answer .text-box-header { | |
| background-color: #ecfdf5; | |
| color: #065f46; | |
| } | |
| html.dark .answer .text-box-header { | |
| background-color: #064e3b; | |
| color: #6ee7b7; | |
| } | |
| .code-content { | |
| padding: 12px 16px; | |
| font-family: monospace; | |
| white-space: pre-wrap; | |
| background-color: #f8fafc; | |
| color: #334155; | |
| line-height: 1.5; | |
| font-size: 14px; | |
| overflow-x: auto; | |
| } | |
| html.dark .code-content { | |
| background-color: #0f172a; | |
| color: #e2e8f0; | |
| } | |
| .error-message { | |
| color: #b91c1c; | |
| padding: 12px; | |
| background-color: #fee2e2; | |
| border-radius: 6px; | |
| font-weight: 500; | |
| } | |
| html.dark .error-message { | |
| color: #fca5a5; | |
| background-color: #7f1d1d; | |
| } | |
| /* Responsive adjustments */ | |
| @media (max-width: 640px) { | |
| .text-box-header { | |
| padding: 6px 10px; | |
| font-size: 13px; | |
| } | |
| .text-content { | |
| padding: 10px 12px; | |
| font-size: 14px; | |
| } | |
| } | |
| /* Theme toggle button animation */ | |
| #theme-toggle { | |
| cursor: pointer; | |
| transition: transform 0.2s ease, background-color 0.2s ease; | |
| } | |
| #theme-toggle:hover { | |
| background-color: rgba(255, 255, 255, 0.3); | |
| } | |
| #theme-toggle:active { | |
| transform: scale(0.9); | |
| } | |
| /* History panel styles */ | |
| #historyPanel { | |
| box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); | |
| } | |
| html.dark #historyPanel { | |
| box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3); | |
| } | |
| /* Text-to-speech button styles */ | |
| .text-to-speech-btn { | |
| transition: all 0.2s ease; | |
| } | |
| .text-to-speech-btn:hover svg { | |
| color: #7c3aed; | |
| } | |
| html.dark .text-to-speech-btn:hover svg { | |
| color: #a78bfa; | |
| } | |