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
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
<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Java Schweizerdeutsch - Italienisch Übersetzer</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Inter', sans-serif;
            background-color: #f8fafc;
        }
        
        .language-flag {
            width: 30px;
            height: 20px;
            object-fit: cover;
            border-radius: 2px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        
        .text-area {
            min-height: 150px;
            resize: none;
        }
        
        .switch-btn {
            transition: all 0.3s ease;
        }
        
        .switch-btn:hover {
            transform: rotate(180deg);
        }
        
        .gradient-bg {
            background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
        }
        
        .translation-card {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
        }
        
        .translation-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        
        .history-item {
            transition: all 0.2s ease;
        }
        
        .history-item:hover {
            background-color: #f1f5f9;
            transform: translateX(2px);
        }
    </style>
</head>
<body class="min-h-screen">
    <div class="gradient-bg text-white py-6">
        <div class="container mx-auto px-4">
            <div class="flex items-center justify-between">
                <div class="flex items-center space-x-3">
                    <i class="fas fa-code text-2xl"></i>
                    <h1 class="text-2xl font-bold">Java Übersetzer</h1>
                </div>
                <div class="flex items-center space-x-4">
                    <button class="px-4 py-2 bg-white bg-opacity-20 rounded-full hover:bg-opacity-30 transition">
                        <i class="fas fa-user mr-2"></i>Login
                    </button>
                    <button class="px-4 py-2 bg-white text-indigo-600 rounded-full font-medium hover:bg-opacity-90 transition">
                        <i class="fas fa-plus mr-2"></i>Registrieren
                    </button>
                </div>
            </div>
            
            <div class="mt-8 text-center">
                <h2 class="text-3xl font-bold mb-2">Schweizerdeutsch - Italienisch Übersetzer</h2>
                <p class="text-white text-opacity-80 max-w-2xl mx-auto">
                    Übersetzen Sie zwischen Schweizerdeutsch und Italienisch mit unserer Java-basierten Übersetzungstechnologie.
                </p>
            </div>
        </div>
    </div>
    
    <div class="container mx-auto px-4 py-8 -mt-10">
        <div class="bg-white rounded-xl shadow-xl overflow-hidden">
            <div class="p-6">
                <div class="flex flex-col md:flex-row items-center justify-between space-y-4 md:space-y-0">
                    <div class="flex items-center space-x-3 w-full md:w-auto">
                        <img src="https://flagcdn.com/w20/ch.png" class="language-flag" alt="Swiss German">
                        <span class="font-medium">Schweizerdeutsch</span>
                    </div>
                    
                    <button class="switch-btn bg-gray-100 p-3 rounded-full text-gray-600 hover:bg-gray-200">
                        <i class="fas fa-exchange-alt"></i>
                    </button>
                    
                    <div class="flex items-center space-x-3 w-full md:w-auto">
                        <img src="https://flagcdn.com/w20/it.png" class="language-flag" alt="Italian">
                        <span class="font-medium">Italienisch</span>
                    </div>
                </div>
                
                <div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-6">
                    <div>
                        <div class="flex items-center justify-between mb-2">
                            <label class="text-sm font-medium text-gray-500">Eingabe</label>
                            <button class="text-xs text-indigo-600 hover:text-indigo-800 flex items-center">
                                <i class="fas fa-microphone mr-1"></i> Diktieren
                            </button>
                        </div>
                        <textarea 
                            class="w-full text-area p-4 border border-gray-200 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" 
                            placeholder="Geben Sie Schweizerdeutsch Text ein..."></textarea>
                        <div class="flex items-center justify-between mt-2">
                            <span class="text-xs text-gray-400">0/5000 Zeichen</span>
                            <button class="text-xs text-gray-500 hover:text-gray-700 flex items-center">
                                <i class="fas fa-trash-alt mr-1"></i> Löschen
                            </button>
                        </div>
                    </div>
                    
                    <div>
                        <div class="flex items-center justify-between mb-2">
                            <label class="text-sm font-medium text-gray-500">Übersetzung</label>
                            <div class="flex space-x-2">
                                <button class="text-xs text-indigo-600 hover:text-indigo-800 flex items-center">
                                    <i class="fas fa-copy mr-1"></i> Kopieren
                                </button>
                                <button class="text-xs text-indigo-600 hover:text-indigo-800 flex items-center">
                                    <i class="fas fa-volume-up mr-1"></i> Vorlesen
                                </button>
                            </div>
                        </div>
                        <div class="w-full min-h-[150px] p-4 border border-gray-200 rounded-lg bg-gray-50">
                            <p class="text-gray-700">Die Übersetzung erscheint hier...</p>
                        </div>
                        <div class="flex items-center justify-between mt-2">
                            <span class="text-xs text-gray-400">Maschinelle Übersetzung</span>
                            <button class="text-xs text-indigo-600 hover:text-indigo-800 flex items-center">
                                <i class="fas fa-thumbs-up mr-1"></i> Feedback
                            </button>
                        </div>
                    </div>
                </div>
                
                <div class="mt-6 flex justify-center">
                    <button class="gradient-bg text-white px-8 py-3 rounded-full font-medium hover:opacity-90 transition flex items-center">
                        <i class="fas fa-language mr-2"></i> Übersetzen
                    </button>
                </div>
            </div>
        </div>
    </div>
    
    <div class="container mx-auto px-4 py-8">
        <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
            <div class="translation-card bg-white p-6 rounded-xl">
                <div class="flex items-center justify-center w-12 h-12 bg-indigo-100 text-indigo-600 rounded-full mb-4">
                    <i class="fas fa-bolt text-xl"></i>
                </div>
                <h3 class="font-bold text-lg mb-2">Schnelle Übersetzungen</h3>
                <p class="text-gray-600">
                    Unsere Java-basierte Engine liefert blitzschnelle Übersetzungen zwischen Schweizerdeutsch und Italienisch.
                </p>
            </div>
            
            <div class="translation-card bg-white p-6 rounded-xl">
                <div class="flex items-center justify-center w-12 h-12 bg-green-100 text-green-600 rounded-full mb-4">
                    <i class="fas fa-brain text-xl"></i>
                </div>
                <h3 class="font-bold text-lg mb-2">KI-gestützt</h3>
                <p class="text-gray-600">
                    Fortschrittliche Algorithmen lernen kontinuierlich, um präzisere Übersetzungen zu liefern.
                </p>
            </div>
            
            <div class="translation-card bg-white p-6 rounded-xl">
                <div class="flex items-center justify-center w-12 h-12 bg-blue-100 text-blue-600 rounded-full mb-4">
                    <i class="fas fa-shield-alt text-xl"></i>
                </div>
                <h3 class="font-bold text-lg mb-2">Sicher & Privat</h3>
                <p class="text-gray-600">
                    Ihre Daten bleiben geschützt. Wir speichern keine persönlichen Informationen.
                </p>
            </div>
        </div>
    </div>
    
    <div class="container mx-auto px-4 py-8">
        <div class="bg-white rounded-xl shadow-md overflow-hidden">
            <div class="p-6 border-b border-gray-200">
                <h2 class="font-bold text-xl flex items-center">
                    <i class="fas fa-history mr-3 text-indigo-600"></i> Übersetzungsverlauf
                </h2>
            </div>
            <div class="divide-y divide-gray-200">
                <div class="history-item p-4 hover:cursor-pointer">
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="font-medium">Grüezi → Ciao</p>
                            <p class="text-sm text-gray-500">Heute, 14:32</p>
                        </div>
                        <button class="text-gray-400 hover:text-indigo-600">
                            <i class="fas fa-redo"></i>
                        </button>
                    </div>
                </div>
                <div class="history-item p-4 hover:cursor-pointer">
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="font-medium">Merci vielmal → Grazie mille</p>
                            <p class="text-sm text-gray-500">Gestern, 18:15</p>
                        </div>
                        <button class="text-gray-400 hover:text-indigo-600">
                            <i class="fas fa-redo"></i>
                        </button>
                    </div>
                </div>
                <div class="history-item p-4 hover:cursor-pointer">
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="font-medium">En Guete → Buon appetito</p>
                            <p class="text-sm text-gray-500">Gestern, 12:45</p>
                        </div>
                        <button class="text-gray-400 hover:text-indigo-600">
                            <i class="fas fa-redo"></i>
                        </button>
                    </div>
                </div>
            </div>
            <div class="p-4 bg-gray-50 text-center">
                <button class="text-indigo-600 hover:text-indigo-800 text-sm font-medium">
                    <i class="fas fa-chevron-down mr-1"></i> Mehr anzeigen
                </button>
            </div>
        </div>
    </div>
    
    <div class="gradient-bg text-white py-8">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-6 md:mb-0">
                    <h2 class="text-2xl font-bold mb-2">Möchten Sie mehr erfahren?</h2>
                    <p class="text-white text-opacity-80">Kontaktieren Sie uns für API-Zugriff oder Unternehmenslösungen.</p>
                </div>
                <button class="px-6 py-3 bg-white text-indigo-600 rounded-full font-medium hover:bg-opacity-90 transition">
                    <i class="fas fa-envelope mr-2"></i> Kontakt aufnehmen
                </button>
            </div>
        </div>
    </div>
    
    <footer class="bg-gray-100 py-8">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h3 class="font-bold text-lg mb-4">Java Übersetzer</h3>
                    <p class="text-gray-600">
                        Fortschrittliche Übersetzungstechnologie für Schweizerdeutsch und Italienisch.
                    </p>
                </div>
                <div>
                    <h3 class="font-bold text-lg mb-4">Nützliche Links</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-600 hover:text-indigo-600">Über uns</a></li>
                        <li><a href="#" class="text-gray-600 hover:text-indigo-600">Preise</a></li>
                        <li><a href="#" class="text-gray-600 hover:text-indigo-600">API</a></li>
                        <li><a href="#" class="text-gray-600 hover:text-indigo-600">Blog</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="font-bold text-lg mb-4">Rechtliches</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-600 hover:text-indigo-600">Datenschutz</a></li>
                        <li><a href="#" class="text-gray-600 hover:text-indigo-600">Nutzungsbedingungen</a></li>
                        <li><a href="#" class="text-gray-600 hover:text-indigo-600">Impressum</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="font-bold text-lg mb-4">Folgen Sie uns</h3>
                    <div class="flex space-x-4">
                        <a href="#" class="w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center text-gray-600 hover:bg-indigo-600 hover:text-white">
                            <i class="fab fa-facebook-f"></i>
                        </a>
                        <a href="#" class="w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center text-gray-600 hover:bg-blue-400 hover:text-white">
                            <i class="fab fa-twitter"></i>
                        </a>
                        <a href="#" class="w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center text-gray-600 hover:bg-pink-600 hover:text-white">
                            <i class="fab fa-instagram"></i>
                        </a>
                        <a href="#" class="w-10 h-10 bg-gray-200 rounded-full flex items-center justify-center text-gray-600 hover:bg-gray-800 hover:text-white">
                            <i class="fab fa-github"></i>
                        </a>
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-200 mt-8 pt-8 text-center text-gray-500">
                <p>© 2023 Java Übersetzer. Alle Rechte vorbehalten.</p>
            </div>
        </div>
    </footer>
    
    <script>
        // Basic functionality for the translator
        document.addEventListener('DOMContentLoaded', function() {
            // Switch languages
            const switchBtn = document.querySelector('.switch-btn');
            const languageFlags = document.querySelectorAll('.language-flag');
            const languageNames = document.querySelectorAll('.flex.items-center.space-x-3 span');
            const textareas = document.querySelectorAll('textarea, .min-h-[150px]');
            
            switchBtn.addEventListener('click', function() {
                // Swap flags
                const tempSrc = languageFlags[0].src;
                languageFlags[0].src = languageFlags[1].src;
                languageFlags[1].src = tempSrc;
                
                // Swap language names
                const tempText = languageNames[0].textContent;
                languageNames[0].textContent = languageNames[1].textContent;
                languageNames[1].textContent = tempText;
                
                // Swap placeholders if textarea is empty
                if (textareas[0].value === '') {
                    const tempPlaceholder = textareas[0].placeholder;
                    textareas[0].placeholder = textareas[1].textContent === 'Die Übersetzung erscheint hier...' ? 
                        'Geben Sie Italienisch Text ein...' : 'Geben Sie Schweizerdeutsch Text ein...';
                }
            });
            
            // Character counter
            const textarea = document.querySelector('textarea');
            const charCounter = document.querySelector('.text-xs.text-gray-400');
            
            textarea.addEventListener('input', function() {
                const count = this.value.length;
                charCounter.textContent = `${count}/5000 Zeichen`;
                
                if (count > 5000) {
                    charCounter.classList.add('text-red-500');
                    charCounter.classList.remove('text-gray-400');
                } else {
                    charCounter.classList.add('text-gray-400');
                    charCounter.classList.remove('text-red-500');
                }
            });
            
            // Translation button
            const translateBtn = document.querySelector('.gradient-bg.text-white');
            const outputDiv = document.querySelector('.min-h-[150px] p');
            
            // Mock translations (in a real app, this would be an API call)
            const translations = {
                'Grüezi': 'Ciao',
                'Merci vielmal': 'Grazie mille',
                'En Guete': 'Buon appetito',
                'Wie gaats?': 'Come stai?',
                'Tschüss': 'Arrivederci'
            };
            
            translateBtn.addEventListener('click', function() {
                const inputText = textarea.value.trim();
                
                if (inputText === '') {
                    outputDiv.textContent = 'Bitte geben Sie Text zum Übersetzen ein.';
                    return;
                }
                
                // Simple mock translation - in reality this would be an API call
                if (translations[inputText]) {
                    outputDiv.textContent = translations[inputText];
                } else {
                    outputDiv.textContent = `[Übersetzung von: "${inputText}"] - Dies ist eine simulierte Übersetzung. In der echten Anwendung würde dies eine API-Abfrage sein.`;
                }
                
                // Add to history (simplified)
                const historyContainer = document.querySelector('.divide-y.divide-gray-200');
                const newHistoryItem = document.createElement('div');
                newHistoryItem.className = 'history-item p-4 hover:cursor-pointer';
                newHistoryItem.innerHTML = `
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="font-medium">${inputText}${outputDiv.textContent.substring(0, 20)}${outputDiv.textContent.length > 20 ? '...' : ''}</p>
                            <p class="text-sm text-gray-500">Gerade eben</p>
                        </div>
                        <button class="text-gray-400 hover:text-indigo-600">
                            <i class="fas fa-redo"></i>
                        </button>
                    </div>
                `;
                
                historyContainer.insertBefore(newHistoryItem, historyContainer.firstChild);
            });
            
            // Copy button functionality
            const copyBtn = document.querySelectorAll('.flex.space-x-2 button')[0];
            
            copyBtn.addEventListener('click', function() {
                const textToCopy = outputDiv.textContent;
                navigator.clipboard.writeText(textToCopy).then(() => {
                    const originalText = copyBtn.innerHTML;
                    copyBtn.innerHTML = '<i class="fas fa-check mr-1"></i> Kopiert';
                    setTimeout(() => {
                        copyBtn.innerHTML = originalText;
                    }, 2000);
                });
            });
            
            // Clear button
            const clearBtn = document.querySelector('.text-xs.text-gray-500.hover\\:text-gray-700');
            
            clearBtn.addEventListener('click', function() {
                textarea.value = '';
                charCounter.textContent = '0/5000 Zeichen';
                charCounter.classList.add('text-gray-400');
                charCounter.classList.remove('text-red-500');
            });
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=AhBoh/prova2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>