Soltane777 commited on
Commit
9532a56
·
verified ·
1 Parent(s): 68694e8

Update frontend/style.css

Browse files
Files changed (1) hide show
  1. frontend/style.css +286 -74
frontend/style.css CHANGED
@@ -1,74 +1,286 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
2
-
3
- body {
4
- font-family: "Poppins", Arial, sans-serif;
5
- margin: 0;
6
- padding: 0;
7
- }
8
-
9
- .tab-button.active {
10
- color: #7c3aed;
11
- border-bottom: 2px solid #7c3aed;
12
- }
13
-
14
- .tab-button:not(.active) {
15
- border-bottom: 2px solid transparent;
16
- }
17
-
18
- #output {
19
- font-family: monospace;
20
- }
21
-
22
- /* Custom scrollbar */
23
- ::-webkit-scrollbar {
24
- width: 8px;
25
- height: 8px;
26
- }
27
-
28
- ::-webkit-scrollbar-track {
29
- background: #f1f1f1;
30
- border-radius: 10px;
31
- }
32
-
33
- ::-webkit-scrollbar-thumb {
34
- background: #c4b5fd;
35
- border-radius: 10px;
36
- }
37
-
38
- ::-webkit-scrollbar-thumb:hover {
39
- background: #a78bfa;
40
- }
41
-
42
- /* Animation for notifications */
43
- @keyframes fadeIn {
44
- from {
45
- opacity: 0;
46
- transform: translateY(-10px);
47
- }
48
- to {
49
- opacity: 1;
50
- transform: translateY(0);
51
- }
52
- }
53
-
54
- .notification {
55
- animation: fadeIn 0.3s ease-out forwards;
56
- }
57
-
58
- /* Language selection styles */
59
- #translationOptions {
60
- transition: all 0.3s ease;
61
- }
62
-
63
- #translationOptions.hidden {
64
- display: none;
65
- }
66
-
67
- select {
68
- appearance: none;
69
- 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");
70
- background-repeat: no-repeat;
71
- background-position: right 0.7rem center;
72
- background-size: 1em;
73
- padding-right: 2.5rem;
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Add these styles to ensure dark mode works properly */
2
+ :root {
3
+ color-scheme: light;
4
+ }
5
+
6
+ html.dark {
7
+ color-scheme: dark;
8
+ }
9
+
10
+ /* Make sure transitions are smooth */
11
+ html {
12
+ transition: background-color 0.3s ease, color 0.3s ease;
13
+ }
14
+
15
+ @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
16
+
17
+ body {
18
+ font-family: "Poppins", Arial, sans-serif;
19
+ margin: 0;
20
+ padding: 0;
21
+ }
22
+
23
+ /* Ensure dark mode styles are applied */
24
+ html.dark body {
25
+ background-color: #1a202c;
26
+ color: #f7fafc;
27
+ }
28
+
29
+ .tab-button.active {
30
+ color: #7c3aed;
31
+ border-bottom: 2px solid #7c3aed;
32
+ }
33
+
34
+ html.dark .tab-button.active {
35
+ color: #a78bfa;
36
+ border-bottom: 2px solid #a78bfa;
37
+ }
38
+
39
+ .tab-button:not(.active) {
40
+ border-bottom: 2px solid transparent;
41
+ }
42
+
43
+ #output {
44
+ font-family: "Poppins", Arial, sans-serif;
45
+ }
46
+
47
+ /* Custom scrollbar */
48
+ ::-webkit-scrollbar {
49
+ width: 8px;
50
+ height: 8px;
51
+ }
52
+
53
+ ::-webkit-scrollbar-track {
54
+ background: #f1f1f1;
55
+ }
56
+
57
+ html.dark ::-webkit-scrollbar-track {
58
+ background: #374151;
59
+ }
60
+
61
+ ::-webkit-scrollbar-thumb {
62
+ background: #c4b5fd;
63
+ border-radius: 10px;
64
+ }
65
+
66
+ ::-webkit-scrollbar-thumb:hover {
67
+ background: #a78bfa;
68
+ }
69
+
70
+ /* Animation for notifications */
71
+ @keyframes fadeIn {
72
+ from {
73
+ opacity: 0;
74
+ transform: translateY(-10px);
75
+ }
76
+ to {
77
+ opacity: 1;
78
+ transform: translateY(0);
79
+ }
80
+ }
81
+
82
+ .notification {
83
+ animation: fadeIn 0.3s ease-out forwards;
84
+ }
85
+
86
+ /* Language selection styles */
87
+ #translationOptions {
88
+ transition: all 0.3s ease;
89
+ }
90
+
91
+ #translationOptions.hidden {
92
+ display: none;
93
+ }
94
+
95
+ select {
96
+ appearance: none;
97
+ 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");
98
+ background-repeat: no-repeat;
99
+ background-position: right 0.7rem center;
100
+ background-size: 1em;
101
+ padding-right: 2.5rem;
102
+ }
103
+
104
+ /* Formatted output styles */
105
+ .formatted-output {
106
+ display: flex;
107
+ flex-direction: column;
108
+ gap: 16px;
109
+ width: 100%;
110
+ }
111
+
112
+ .result-header {
113
+ margin-bottom: 8px;
114
+ }
115
+
116
+ .result-header h3 {
117
+ font-size: 18px;
118
+ font-weight: 600;
119
+ color: #4b5563;
120
+ margin: 0;
121
+ padding-bottom: 8px;
122
+ border-bottom: 1px solid #e5e7eb;
123
+ }
124
+
125
+ html.dark .result-header h3 {
126
+ color: #e5e7eb;
127
+ border-bottom: 1px solid #4b5563;
128
+ }
129
+
130
+ .text-box {
131
+ background-color: white;
132
+ border-radius: 8px;
133
+ border: 1px solid #e5e7eb;
134
+ overflow: hidden;
135
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
136
+ }
137
+
138
+ html.dark .text-box {
139
+ background-color: #1f2937;
140
+ border: 1px solid #374151;
141
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
142
+ }
143
+
144
+ .text-box-header {
145
+ background-color: #f9fafb;
146
+ padding: 8px 12px;
147
+ font-weight: 500;
148
+ color: #4b5563;
149
+ border-bottom: 1px solid #e5e7eb;
150
+ font-size: 14px;
151
+ }
152
+
153
+ html.dark .text-box-header {
154
+ background-color: #374151;
155
+ color: #e5e7eb;
156
+ border-bottom: 1px solid #4b5563;
157
+ }
158
+
159
+ .text-content {
160
+ padding: 12px 16px;
161
+ line-height: 1.6;
162
+ color: #1f2937;
163
+ }
164
+
165
+ html.dark .text-content {
166
+ color: #f3f4f6;
167
+ }
168
+
169
+ .original .text-box-header {
170
+ background-color: #eff6ff;
171
+ color: #1e40af;
172
+ }
173
+
174
+ html.dark .original .text-box-header {
175
+ background-color: #1e3a8a;
176
+ color: #93c5fd;
177
+ }
178
+
179
+ .translated .text-box-header {
180
+ background-color: #f0fdf4;
181
+ color: #166534;
182
+ }
183
+
184
+ html.dark .translated .text-box-header {
185
+ background-color: #14532d;
186
+ color: #86efac;
187
+ }
188
+
189
+ .question .text-box-header {
190
+ background-color: #fff7ed;
191
+ color: #9a3412;
192
+ }
193
+
194
+ html.dark .question .text-box-header {
195
+ background-color: #7c2d12;
196
+ color: #fdba74;
197
+ }
198
+
199
+ .answer .text-box-header {
200
+ background-color: #ecfdf5;
201
+ color: #065f46;
202
+ }
203
+
204
+ html.dark .answer .text-box-header {
205
+ background-color: #064e3b;
206
+ color: #6ee7b7;
207
+ }
208
+
209
+ .code-content {
210
+ padding: 12px 16px;
211
+ font-family: monospace;
212
+ white-space: pre-wrap;
213
+ background-color: #f8fafc;
214
+ color: #334155;
215
+ line-height: 1.5;
216
+ font-size: 14px;
217
+ overflow-x: auto;
218
+ }
219
+
220
+ html.dark .code-content {
221
+ background-color: #0f172a;
222
+ color: #e2e8f0;
223
+ }
224
+
225
+ .error-message {
226
+ color: #b91c1c;
227
+ padding: 12px;
228
+ background-color: #fee2e2;
229
+ border-radius: 6px;
230
+ font-weight: 500;
231
+ }
232
+
233
+ html.dark .error-message {
234
+ color: #fca5a5;
235
+ background-color: #7f1d1d;
236
+ }
237
+
238
+ /* Responsive adjustments */
239
+ @media (max-width: 640px) {
240
+ .text-box-header {
241
+ padding: 6px 10px;
242
+ font-size: 13px;
243
+ }
244
+
245
+ .text-content {
246
+ padding: 10px 12px;
247
+ font-size: 14px;
248
+ }
249
+ }
250
+
251
+ /* Theme toggle button animation */
252
+ #theme-toggle {
253
+ cursor: pointer;
254
+ transition: transform 0.2s ease, background-color 0.2s ease;
255
+ }
256
+
257
+ #theme-toggle:hover {
258
+ background-color: rgba(255, 255, 255, 0.3);
259
+ }
260
+
261
+ #theme-toggle:active {
262
+ transform: scale(0.9);
263
+ }
264
+
265
+ /* History panel styles */
266
+ #historyPanel {
267
+ box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
268
+ }
269
+
270
+ html.dark #historyPanel {
271
+ box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
272
+ }
273
+
274
+ /* Text-to-speech button styles */
275
+ .text-to-speech-btn {
276
+ transition: all 0.2s ease;
277
+ }
278
+
279
+ .text-to-speech-btn:hover svg {
280
+ color: #7c3aed;
281
+ }
282
+
283
+ html.dark .text-to-speech-btn:hover svg {
284
+ color: #a78bfa;
285
+ }
286
+