PageSourceSearch

https://titan-games.net/script.js?v=2

js titan-games.net collected 2026-10-02 02:02:16 UTC 78,012 bytes, 1,616 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2  const canvas = document.getElementById('stars');
3  if (canvas) {
4    const ctx = canvas.getContext('2d');
5    canvas.width = window.innerWidth;
6    canvas.height = window.innerHeight;
7
8    let stars = [];
9    for (let i = 0; i < 100; i++) {
10      stars.push({
11        x: Math.random() * canvas.width,
12        y: Math.random() * canvas.height,
13        radius: Math.random() * 2,
14        speed: Math.random() * 0.5 + 0.2,
15        color: Math.random() > 0.5 ? '#ff0000' : '#ffffff'
16      });
17    }
18
19    function drawStars() {
20      ctx.clearRect(0, 0, canvas.width, canvas.height);
21      stars.forEach(s => {
22        ctx.beginPath();
23        ctx.arc(s.x, s.y, s.radius, 0, Math.PI * 2);
24        ctx.fillStyle = s.color;
25        ctx.fill();
26        s.y += s.speed;
27        if (s.y > canvas.height) s.y = 0;
28      });
29      requestAnimationFrame(drawStars);
30    }
31    drawStars();
32
33    window.addEventListener('resize', () => {
34      canvas.width = window.innerWidth;
35      canvas.height = window.innerHeight;
36    });
37  }
38
39  const loginLink = document.getElementById('login-link');
40  const modal = document.getElementById('login-modal');
41  const closeModal = document.querySelector('.modal-close');
42  const loginForm = document.getElementById('login-form');
43  const logoutBtn = document.getElementById('logout-btn');
44  const registerForm = document.getElementById('register-form');
45
46  if (loginLink) {
47    loginLink.addEventListener('click', () => modal.style.display = 'flex');
48  }
49  if (closeModal) {
50    closeModal.addEventListener('click', () => modal.style.display = 'none');
51  }
52  window.addEventListener('click', e => {
53    if (e.target === modal) modal.style.display = 'none';
54  });
55
56  if (loginForm) {
57    loginForm.addEventListener('submit', e => {
58      e.preventDefault();
59      document.getElementById('username').textContent = 'TestPlayer';
60      document.getElementById('profile').style.display = 'block';
61      modal.style.display = 'none';
62      loginLink.innerHTML = '<a href="#">Logout</a>';
63    });
64  }
65
66  if (registerForm) {
67    registerForm.addEventListener('submit', e => {
68      e.preventDefault();
69      alert('Registered! Please log in.');
70      window.location.href = 'index.html';
71    });
72  }
73
74  document.querySelectorAll('.oauth').forEach(btn => {
75    btn.addEventListener('click', () => alert(`${btn.textContent} login mock`));
76  });
77
78  if (logoutBtn) {
79    logoutBtn.addEventListener('click', () => {
80      document.getElementById('profile').style.display = 'none';
81      loginLink.innerHTML = '<a href="#">Login</a>';
82    });
83  }
84
85  const slides = document.querySelectorAll('.carousel-slide');
86  let current = 0;
87  function showSlide(n) {
88    slides.forEach(s => s.classList.remove('active'));
89    slides[n].classList.add('active');
90  }
91  if (slides.length) {
92    document.querySelector('.carousel-prev').addEventListener('click', () => {
93      current = (current - 1 + slides.length) % slides.length;
94      showSlide(current);
95    });
96    document.querySelector('.carousel-next').addEventListener('click', () => {
97      current = (current + 1) % slides.length;
98      showSlide(current);
99    });
100    setInterval(() => {
101      current = (current + 1) % slides.length;
102      showSlide(current);
103    }, 5000);
104  }
105
106  const fadeElements = document.querySelectorAll('.fade-in');
107  const observer = new IntersectionObserver(entries => {
108    entries.forEach(entry => {
109      if (entry.isIntersecting) entry.target.classList.add('visible');
110    });
111  }, { threshold: 0.1 });
112  fadeElements.forEach(el => observer.observe(el));
113
114  setInterval(() => {
115    const table = document.getElementById('leaderboard-table');
116    if (table) {
117      table.children[0].children[2].textContent = Math.floor(Math.random() * 20000 + 10000);
118    }
119  }, 300000);
120
121  document.querySelectorAll('[data-captcha]').forEach(btn => {
122    btn.addEventListener('click', () => alert('CAPTCHA verified - action completed'));
123  });
124
125  document.querySelectorAll('.chat button').forEach(btn => {
126    btn.addEventListener('click', () => {
127      const input = btn.previousElementSibling;
128      if (input.value) {
129        const msg = document.createElement('p');
130        msg.textContent = `You: ${input.value}`;
131        input.previousElementSibling.appendChild(msg);
132        input.value = '';
133      }
134    });
135  });
136
137  document.querySelectorAll('.forum button').forEach(btn => {
138    btn.addEventListener('click', () => {
139      const input = btn.previousElementSibling;
140      if (input.value) {
141        const post = document.createElement('p');
142        post.textContent = `You: ${input.value}`;
143        input.previousElementSibling.appendChild(post);
144        input.value = '';
145      }
146    });
147  });
148
149  document.querySelectorAll('.ugc button').forEach(btn => {
150    btn.addEventListener('click', () => alert('Content uploaded!'));
151  });
152
153  document.querySelectorAll('#quiz button').forEach(btn => {
154    btn.addEventListener('click', () => alert('Answer submitted! +10 Credits'));
155  });
156
157  if ('Notification' in window) {
158    Notification.requestPermission().then(perm => {
159      if (perm === 'granted') {
160        setInterval(() => new Notification('Titan Games', { body: 'Check out new updates!' }), 3600000);
161      }
162    });
163  }
164});
165
166// Additions to script.js
167
168// Retro Arcade Platform Selection
169const platformSelect = document.getElementById('platform-select');
170if (platformSelect) {
171    platformSelect.addEventListener('change', (e) => {
172        const platform = e.target.value;
173        if (platform) {
174            window.location.hash = platform;
175            document.querySelectorAll('.platform-link').forEach(link => {
176                link.classList.toggle('active', link.getAttribute('href').includes(platform));
177            });
178        }
179    });
180
181    // Highlight active platform based on URL hash
182    window.addEventListener('hashchange', () => {
183        const platform = window.location.hash.slice(1);
184        platformSelect.value = platform;
185        document.querySelectorAll('.platform-link').forEach(link => {
186            link.classList.toggle('active', link.getAttribute('href').includes(platform));
187        });
188    });
189
190    // Initial hash check
191    if (window.location.hash) {
192        const platform = window.location.hash.slice(1);
193        platformSelect.value = platform;
194        document.querySelectorAll('.platform-link').forEach(link => {
195            link.classList.toggle('active', link.getAttribute('href').includes(platform));
196        });
197    }
198}
199
200// ============================================================
201// 🌠 ADVANCED STARFIELD ENHANCEMENTS (Conflict-Free Version)
202// ============================================================
203document.addEventListener('DOMContentLoaded', () => {
204  const canvas = document.getElementById('stars');
205  if (!canvas) return;
206
207  const ctx = canvas.getContext('2d');
208  let stars = [], flares = [], nebulae = [], shootingStars = [];
209  let parallaxX = 0, parallaxY = 0;
210
211  const STAR_COUNT = 200;
212  const NEBULA_COUNT = 5;
213  const startTime = Date.now();
214
215  // Ensure proper sizing
216  const resizeCanvas = () => {
217    canvas.width = window.innerWidth;
218    canvas.height = window.innerHeight;
219  };
220  resizeCanvas();
221  window.addEventListener('resize', resizeCanvas);
222
223  // --- Create stars
224  for (let i = 0; i < STAR_COUNT; i++) {
225    stars.push({
226      x: Math.random() * canvas.width,
227      y: Math.random() * canvas.height,
228      radius: Math.random() * 1.5,
229      dx: (Math.random() - 0.5) * 0.3,
230      dy: (Math.random() - 0.5) * 0.3,
231      color: Math.random() > 0.6 ? 'red' : 'white'
232    });
233  }
234
235  // --- Create nebula clouds
236  for (let i = 0; i < NEBULA_COUNT; i++) {
237    nebulae.push({
238      x: Math.random() * canvas.width,
239      y: Math.random() * canvas.height,
240      radius: 250 + Math.random() * 300,
241      dx: (Math.random() - 0.5) * 0.1,
242      dy: (Math.random() - 0.5) * 0.1,
243      color: `rgba(255,0,60,${0.05 + Math.random() * 0.1})`
244    });
245  }
246
247  // --- Animation loop
248  function drawEnhancedStars() {
249    ctx.clearRect(0, 0, canvas.width, canvas.height);
250
251    const elapsed = (Date.now() - startTime) / 1000;
252    const pulse = 0.8 + 0.2 * Math.sin((elapsed / 4) * Math.PI * 2);
253
254    // === Nebula background ===
255    nebulae.forEach(neb => {
256      const grad = ctx.createRadialGradient(
257        neb.x, neb.y, neb.radius * 0.2,
258        neb.x, neb.y, neb.radius
259      );
260      grad.addColorStop(0, neb.color);
261      grad.addColorStop(1, 'transparent');
262      ctx.fillStyle = grad;
263      ctx.beginPath();
264      ctx.arc(neb.x, neb.y, neb.radius, 0, Math.PI * 2);
265      ctx.fill();
266
267      neb.x += neb.dx;
268      neb.y += neb.dy;
269      if (neb.x > canvas.width + neb.radius) neb.x = -neb.radius;
270      if (neb.x < -neb.radius) neb.x = canvas.width + neb.radius;
271      if (neb.y > canvas.height + neb.radius) neb.y = -neb.radius;
272      if (neb.y < -neb.radius) neb.y = canvas.height + neb.radius;
273    });
274
275    // === Stars ===
276    stars.forEach(s => {
277      ctx.beginPath();
278      ctx.arc(
279        s.x + parallaxX * (s.radius * 0.5),
280        s.y + parallaxY * (s.radius * 0.5),
281        s.radius * pulse,
282        0,
283        Math.PI * 2
284      );
285      ctx.fillStyle = s.color;
286      ctx.shadowColor = s.color;
287      ctx.shadowBlur = 10 * pulse;
288      ctx.fill();
289
290      s.x += s.dx;
291      s.y += s.dy;
292      if (s.x < 0 || s.x > canvas.width) s.dx *= -1;
293      if (s.y < 0 || s.y > canvas.height) s.dy *= -1;
294    });
295
296    // === Flares (Novas) ===
297for (let i = flares.length - 1; i >= 0; i--) {
298  const flare = flares[i];
299  const life = (Date.now() - flare.start) / flare.duration;
300  if (life > 1) {
301    flares.splice(i, 1);
302    continue;
303  }
304
305  const progress = 1 - life;
306  const alpha = progress;
307
308  // --- Multi-color plasma core ---
309  const grad = ctx.createRadialGradient(
310    flare.x, flare.y, 0,
311    flare.x, flare.y, flare.maxRadius
312  );
313  grad.addColorStop(0, `rgba(255,255,255,${alpha})`);
314  grad.addColorStop(0.25, `rgba(255,200,120,${alpha * 0.9})`);
315  grad.addColorStop(0.55, `rgba(255,0,0,${alpha * 0.6})`);
316  grad.addColorStop(1, 'rgba(0,0,0,0)');
317  ctx.fillStyle = grad;
318  ctx.beginPath();
319  ctx.arc(flare.x, flare.y, flare.maxRadius, 0, Math.PI * 2);
320  ctx.fill();
321
322  // --- Rotating starburst rays ---
323  const rayCount = 8 + Math.floor(Math.random() * 4);
324  const rotation = life * Math.PI * 2 * flare.rotationDir;
325  for (let r = 0; r < rayCount; r++) {
326    const angle = (Math.PI * 2 / rayCount) * r + rotation;
327    const rayLength = flare.maxRadius * 2.5 * progress;
328    const rayWidth = 1.5 + 1.5 * progress;
329
330    ctx.save();
331    ctx.translate(flare.x, flare.y);
332    ctx.rotate(angle);
333
334    const rayGrad = ctx.createLinearGradient(0, 0, rayLength, 0);
335    rayGrad.addColorStop(0, `rgba(255,255,255,${alpha})`);
336    rayGrad.addColorStop(0.4, `rgba(255,120,80,${alpha * 0.8})`);
337    rayGrad.addColorStop(1, 'rgba(0,0,0,0)');
338
339    ctx.fillStyle = rayGrad;
340    ctx.fillRect(0, -rayWidth / 2, rayLength, rayWidth);
341    ctx.restore();
342  }
343}
344
345// === Balanced flare generator (cinematic slower timing) ===
346function spawnFlare() {
347  // Limit to 2 simultaneous flares
348  if (flares.length >= 2) return;
349
350  flares.push({
351    x: Math.random() * canvas.width,
352    y: Math.random() * canvas.height,
353    maxRadius: 50 + Math.random() * 70,
354    duration: 2000 + Math.random() * 1000, // ⏳ lasts 2–3 seconds
355    start: Date.now(),
356    rotationDir: Math.random() > 0.5 ? 1 : -1
357  });
358
359  // Next flare spawns every 2–3.5 seconds (slower pacing)
360  const nextTime = 2000 + Math.random() * 1500;
361  setTimeout(spawnFlare, nextTime);
362}
363spawnFlare();
364
365
366    // === Shooting stars ===
367    for (let i = shootingStars.length - 1; i >= 0; i--) {
368      const s = shootingStars[i];
369      ctx.strokeStyle = `rgba(255,255,255,${s.opacity})`;
370      ctx.lineWidth = 2;
371      ctx.beginPath();
372      ctx.moveTo(s.x, s.y);
373      ctx.lineTo(s.x - s.length, s.y + s.length * 0.3);
374      ctx.stroke();
375      s.x -= s.speed;
376      s.y += s.speed * 0.3;
377      s.opacity -= 0.01;
378      if (s.opacity <= 0) shootingStars.splice(i, 1);
379    }
380
381    requestAnimationFrame(drawEnhancedStars);
382  }
383
384  drawEnhancedStars();
385
386  // === Random flare generator ===
387  setInterval(() => {
388    flares.push({
389      x: Math.random() * canvas.width,
390      y: Math.random() * canvas.height,
391      maxRadius: 30 + Math.random() * 50,
392      duration: 800 + Math.random() * 800,
393      start: Date.now()
394    });
395  }, 3000);
396
397  // === Shooting stars ===
398  setInterval(() => {
399    shootingStars.push({
400      x: Math.random() * canvas.width,
401      y: Math.random() * canvas.height * 0.5,
402      length: 250,
403      speed: 6 + Math.random() * 4,
404      opacity: 1
405    });
406  }, 8000);
407
408  // === Parallax effect ===
409  document.addEventListener('mousemove', e => {
410    const centerX = window.innerWidth / 2;
411    const centerY = window.innerHeight / 2;
412    parallaxX = (e.clientX - centerX) / 100;
413    parallaxY = (e.clientY - centerY) / 100;
414  });
415
416  // === Interactive Glow Proximity Effect ===
417  const interactiveEls = document.querySelectorAll(
418    '.play-btn, .social-btn, .view-all, .cta'
419  );
420  
421  const translations = {
422  en: {
423    // --- Core & Navigation ---
424    title: "Titan Games - Conquer the Cosmos",
425    nav_games: "Games",
426    nav_featured: "Featured",
427    nav_community: "Community",
428    nav_tournaments: "Tournaments",
429    ticker: "🔥 Titan Week: Double Credits! | 🎮 New Update! | 🚀 Join Tournaments!",
430    fallback: "Fallback: Cosmic background video not loaded.",
431
432    // --- Auth / Login ---
433    login_title: "Login to Titan Games",
434    login_btn: "Login",
435    or_use: "Or use:",
436    register: "Register",
437
438    // --- Hero Section ---
439    hero_subtitle: "Unite • Play • Conquer",
440    cta_explore: "Explore Now",
441
442    // --- Featured / Games ---
443    featured: "Featured Games",
444    games: "Our Games",
445    play: "Play",
446    view_all: "View All Games",
447
448    fallout_desc: "Survive the apocalypse.",
449    survival_desc: "Zombie wasteland adventure.",
450    robo_desc: "Command robotic armies.",
451    mono_desc: "Strategic board game.",
452    tank_desc: "Blast enemies in tank battles.",
453    sky_desc: "Aerial combat MMO.",
454
455    // --- Upcoming Section ---
456    upcoming: "Upcoming Releases",
457    quest_desc: "Epic RPG adventure.",
458    starstrike_desc: "Space exploration epic.",
459    trailer: "Trailer",
460
461    // --- News ---
462    news: "Titan News Hub",
463    news_1: "New bosses, improved loot, and cross-server events are now live!",
464    news_2: "Check out the top 3 incredible vault designs created by players!",
465    news_3: "Battle your way through the cosmos — now available on Apple devices!",
466
467    // --- Community ---
468    community: "Our Community",
469    discord_join: "Join Us on Discord",
470    youtube: "YouTube",
471    facebook: "Facebook",
472    google_play: "Google Play",
473
474    // --- Tournaments ---
475    tournaments: "Tournaments",
476    tournaments_desc: "Compete for exclusive rewards!",
477    countdown: "Next Event Starts In",
478
479    // --- Support / Footer ---
480    support: "Support Us",
481    donate: "Donate",
482    privacy: "Privacy Policy",
483    terms: "Terms",
484    contact: "Contact",
485    footer_rights: "Titan Empire © 2025",
486    language_label: "🌐 Language:"
487  },
488
489  en: {
490    // --- Core & Navigation ---
491    title: "Titan Games - Conquer the Cosmos",
492    nav_games: "Games",
493    nav_featured: "Featured",
494    nav_community: "Community",
495    nav_tournaments: "Tournaments",
496    ticker: "🔥 Titan Week: Double Credits! | 🎮 New Update! | 🚀 Join Tournaments!",
497    fallback: "Fallback: Cosmic background video not loaded.",
498
499    // --- Auth / Login ---
500    login_title: "Login to Titan Games",
501    login_btn: "Login",
502    or_use: "Or use:",
503    register: "Register",
504
505    // --- Hero Section ---
506    hero_subtitle: "Unite • Play • Conquer",
507    cta_explore: "Explore Now",
508
509    // --- Featured / Games ---
510    featured: "Featured Games",
511    games: "Our Games",
512    play: "Play",
513    view_all: "View All Games",
514    fallout_desc: "Survive the apocalypse.",
515    survival_desc: "Zombie wasteland adventure.",
516    robo_desc: "Command robotic armies.",
517    mono_desc: "Strategic board game.",
518    tank_desc: "Blast enemies in tank battles.",
519    sky_desc: "Aerial combat MMO.",
520
521    // --- Upcoming Section ---
522    upcoming: "Upcoming Releases",
523    quest_desc: "Epic RPG adventure.",
524    starstrike_desc: "Space exploration epic.",
525    trailer: "Trailer",
526
527    // --- News ---
528    news: "Titan News Hub",
529    news_1: "New bosses, improved loot, and cross-server events are now live!",
530    news_2: "Check out the top 3 incredible vault designs created by players!",
531    news_3: "Battle your way through the cosmos — now available on Apple devices!",
532
533    // --- Community ---
534    community: "Our Community",
535    discord_join: "Join Us on Discord",
536    youtube: "YouTube",
537    facebook: "Facebook",
538    google_play: "Google Play",
539
540    // --- Tournaments ---
541    tournaments: "Tournaments",
542    tournaments_desc: "Compete for exclusive rewards!",
543    countdown: "Next Event Starts In",
544
545    // --- Support / Footer ---
546    support: "Support Us",
547    donate: "Donate",
548    privacy: "Privacy Policy",
549    terms: "Terms",
550    contact: "Contact",
551    footer_rights: "Titan Empire © 2025",
552    language_label: "🌐 Language:"
553  },
554  
555  es: {
556    title: "Titan Games - Conquista el Cosmos",
557    nav_games: "Juegos",
558    nav_featured: "Destacados",
559    nav_community: "Comunidad",
560    nav_tournaments: "Torneos",
561    ticker: "🔥 Semana Titan: ¡Créditos Dobles! | 🎮 ¡Nueva Actualización! | 🚀 ¡Únete a los Torneos!",
562    fallback: "Error al cargar el video de fondo cósmico.",
563    login_title: "Iniciar sesión en Titan Games",
564    login_btn: "Iniciar Sesión",
565    or_use: "O usa:",
566    register: "Registrarse",
567    hero_subtitle: "Unidos • Juega • Conquista",
568    cta_explore: "Explorar Ahora",
569    featured: "Juegos Destacados",
570    games: "Nuestros Juegos",
571    play: "Jugar",
572    view_all: "Ver Todos los Juegos",
573    fallout_desc: "Sobrevive al apocalipsis.",
574    survival_desc: "Aventura en un páramo zombi.",
575    robo_desc: "Comanda ejércitos robóticos.",
576    mono_desc: "Juego de mesa estratégico.",
577    tank_desc: "Destruye enemigos en batallas de tanques.",
578    sky_desc: "MMO de combate aéreo.",
579    upcoming: "Próximos Lanzamientos",
580    quest_desc: "Aventura RPG épica.",
581    starstrike_desc: "Épica de exploración espacial.",
582    trailer: "Tráiler",
583    news: "Centro de Noticias Titan",
584    news_1: "¡Nuevos jefes, botines mejorados y eventos entre servidores ya están disponibles!",
585    news_2: "¡Descubre los 3 mejores diseños de búnker creados por jugadores!",
586    news_3: "¡Lucha a través del cosmos, ahora disponible en dispositivos Apple!",
587    community: "Nuestra Comunidad",
588    discord_join: "Únete a Nosotros en Discord",
589    youtube: "YouTube",
590    facebook: "Facebook",
591    google_play: "Google Play",
592    tournaments: "Torneos",
593    tournaments_desc: "¡Compite por recompensas exclusivas!",
594    countdown: "El Próximo Evento Comienza En",
595    support: "Apóyanos",
596    donate: "Donar",
597    privacy: "Política de Privacidad",
598    terms: "Términos",
599    contact: "Contacto",
600    footer_rights: "Titan Empire © 2025",
601    language_label: "🌐 Idioma:"
602  },
603
604  fr: {
605    title: "Titan Games - Conquérir le Cosmos",
606    nav_games: "Jeux",
607    nav_featured: "En Vedette",
608    nav_community: "Communauté",
609    nav_tournaments: "Tournois",
610    ticker: "🔥 Semaine Titan : Crédits Doubles ! | 🎮 Nouvelle Mise à Jour ! | 🚀 Participez aux Tournois !",
611    fallback: "Échec du chargement de la vidéo de fond cosmique.",
612    login_title: "Connexion à Titan Games",
613    login_btn: "Se Connecter",
614    or_use: "Ou utiliser :",
615    register: "S'inscrire",
616    hero_subtitle: "Unir • Jouer • Conquérir",
617    cta_explore: "Explorer Maintenant",
618    featured: "Jeux en Vedette",
619    games: "Nos Jeux",
620    play: "Jouer",
621    view_all: "Voir Tous les Jeux",
622    fallout_desc: "Survivez à l'apocalypse.",
623    survival_desc: "Aventure dans un monde infesté de zombies.",
624    robo_desc: "Commandez des armées robotiques.",
625    mono_desc: "Jeu de société stratégique.",
626    tank_desc: "Affrontez vos ennemis dans des batailles de chars.",
627    sky_desc: "MMO de combat aérien.",
628    upcoming: "Sorties à Venir",
629    quest_desc: "Aventure RPG épique.",
630    starstrike_desc: "Épopée d'exploration spatiale.",
631    trailer: "Bande-Annonce",
632    news: "Centre d’Actualités Titan",
633    news_1: "De nouveaux boss, un meilleur butin et des événements inter-serveurs !",
634    news_2: "Découvrez les 3 meilleurs abris conçus par les joueurs !",
635    news_3: "Combattez dans le cosmos — maintenant sur appareils Apple !",
636    community: "Notre Communauté",
637    discord_join: "Rejoignez-nous sur Discord",
638    youtube: "YouTube",
639    facebook: "Facebook",
640    google_play: "Google Play",
641    tournaments: "Tournois",
642    tournaments_desc: "Participez pour des récompenses exclusives !",
643    countdown: "Prochain Événement Dans",
644    support: "Nous Soutenir",
645    donate: "Faire un Don",
646    privacy: "Politique de Confidentialité",
647    terms: "Conditions",
648    contact: "Contact",
649    footer_rights: "Titan Empire © 2025",
650    language_label: "🌐 Langue :"
651  },
652
653  de: {
654    title: "Titan Games - Erobere das Universum",
655    nav_games: "Spiele",
656    nav_featured: "Empfohlen",
657    nav_community: "Community",
658    nav_tournaments: "Turniere",
659    ticker: "🔥 Titan-Woche: Doppelte Credits! | 🎮 Neues Update! | 🚀 Nimm an Turnieren teil!",
660    fallback: "Kosmisches Hintergrundvideo konnte nicht geladen werden.",
661    login_title: "Bei Titan Games anmelden",
662    login_btn: "Anmelden",
663    or_use: "Oder nutzen:",
664    register: "Registrieren",
665    hero_subtitle: "Vereinen • Spielen • Erobern",
666    cta_explore: "Jetzt Entdecken",
667    featured: "Empfohlene Spiele",
668    games: "Unsere Spiele",
669    play: "Spielen",
670    view_all: "Alle Spiele Ansehen",
671    fallout_desc: "Überlebe die Apokalypse.",
672    survival_desc: "Zombie-Ödland-Abenteuer.",
673    robo_desc: "Befehle robotische Armeen.",
674    mono_desc: "Strategisches Brettspiel.",
675    tank_desc: "Zerstöre Feinde in Panzerkämpfen.",
676    sky_desc: "Luftkampf-MMO.",
677    upcoming: "Bevorstehende Veröffentlichungen",
678    quest_desc: "Episches RPG-Abenteuer.",
679    starstrike_desc: "Weltraum-Entdeckungsepos.",
680    trailer: "Trailer",
681    news: "Titan Nachrichtenhub",
682    news_1: "Neue Bosse, verbesserte Beute und serverübergreifende Events sind jetzt live!",
683    news_2: "Sieh dir die Top 3 unglaublichen Bunker-Designs der Spieler an!",
684    news_3: "Kämpfe dich durch das Universum — jetzt auf Apple-Geräten verfügbar!",
685    community: "Unsere Gemeinschaft",
686    discord_join: "Trete uns auf Discord bei",
687    youtube: "YouTube",
688    facebook: "Facebook",
689    google_play: "Google Play",
690    tournaments: "Turniere",
691    tournaments_desc: "Kämpfe um exklusive Belohnungen!",
692    countdown: "Nächstes Event In",
693    support: "Unterstütze Uns",
694    donate: "Spenden",
695    privacy: "Datenschutzrichtlinie",
696    terms: "Bedingungen",
697    contact: "Kontakt",
698    footer_rights: "Titan Empire © 2025",
699    language_label: "🌐 Sprache:"
700  },
701
702  ru: {
703    title: "Titan Games - Покори Космос",
704    nav_games: "Игры",
705    nav_featured: "Избранное",
706    nav_community: "Сообщество",
707    nav_tournaments: "Турниры",
708    ticker: "🔥 Неделя Titan: Двойные кредиты! | 🎮 Новое обновление! | 🚀 Присоединяйся к турнирам!",
709    fallback: "Фоновое видео не загружено.",
710    login_title: "Войти в Titan Games",
711    login_btn: "Войти",
712    or_use: "Или использовать:",
713    register: "Регистрация",
714    hero_subtitle: "Объединяйся • Играй • Завоевывай",
715    cta_explore: "Исследовать",
716    featured: "Избранные Игры",
717    games: "Наши Игры",
718    play: "Играть",
719    view_all: "Смотреть Все Игры",
720    fallout_desc: "Выживи после апокалипсиса.",
721    survival_desc: "Приключение в мире зомби.",
722    robo_desc: "Командуй армиями роботов.",
723    mono_desc: "Стратегическая настольная игра.",
724    tank_desc: "Сражайся в танковых битвах.",
725    sky_desc: "MMO воздушных боёв.",
726    upcoming: "Скоро Выходящие Игры",
727    quest_desc: "Эпическое RPG-приключение.",
728    starstrike_desc: "Космическая эпопея.",
729    trailer: "Трейлер",
730    news: "Новости Titan",
731    community: "Наше Сообщество",
732    discord_join: "Присоединиться к Discord",
733    youtube: "YouTube",
734    facebook: "Facebook",
735    google_play: "Google Play",
736    tournaments: "Турниры",
737    tournaments_desc: "Соревнуйся за эксклюзивные награды!",
738    countdown: "Следующее Событие Через",
739    support: "Поддержи Нас",
740    donate: "Пожертвовать",
741    privacy: "Политика Конфиденциальности",
742    terms: "Условия",
743    contact: "Контакты",
744    footer_rights: "Titan Empire © 2025",
745    language_label: "🌐 Язык:"
746  },
747
748  ja: {
749    title: "Titan Games - 宇宙を征服せよ",
750    nav_games: "ゲーム",
751    nav_featured: "注目",
752    nav_community: "コミュニティ",
753    nav_tournaments: "トーナメント",
754    ticker: "🔥 タイタンウィーク:クレジット2倍! | 🎮 新アップデート! | 🚀 トーナメントに参加しよう!",
755    fallback: "背景動画を読み込めませんでした。",
756    login_title: "Titan Gamesにログイン",
757    login_btn: "ログイン",
758    or_use: "または次を使用:",
759    register: "登録",
760    hero_subtitle: "団結 • プレイ • 征服",
761    cta_explore: "今すぐ探検",
762    featured: "注目のゲーム",
763    games: "私たちのゲーム",
764    play: "プレイ",
765    view_all: "すべてのゲームを見る",
766    fallout_desc: "終末を生き延びろ。",
767    survival_desc: "ゾンビ荒野の冒険。",
768    robo_desc: "ロボ軍団を指揮せよ。",
769    mono_desc: "戦略的ボードゲーム。",
770    tank_desc: "戦車バトルで敵を粉砕せよ。",
771    sky_desc: "空中戦MMO。",
772    upcoming: "近日リリース",
773    quest_desc: "壮大なRPGアドベンチャー。",
774    starstrike_desc: "宇宙探索の物語。",
775    trailer: "トレーラー",
776    news: "Titanニュースハブ",
777    community: "私たちのコミュニティ",
778    discord_join: "Discordに参加",
779    youtube: "YouTube",
780    facebook: "Facebook",
781    google_play: "Google Play",
782    tournaments: "トーナメント",
783    tournaments_desc: "限定報酬を手に入れよう!",
784    countdown: "次のイベントまで",
785    support: "サポート",
786    donate: "寄付する",
787    privacy: "プライバシーポリシー",
788    terms: "利用規約",
789    contact: "お問い合わせ",
790    footer_rights: "Titan Empire © 2025",
791    language_label: "🌐 言語:"
792  },
793
794  "zh-CN": {
795    title: "Titan Games - 征服宇宙",
796    nav_games: "游戏",
797    nav_featured: "精选",
798    nav_community: "社区",
799    nav_tournaments: "锦标赛",
800    ticker: "🔥 Titan周:双倍积分! | 🎮 新更新上线! | 🚀 加入锦标赛!",
801    fallback: "背景视频加载失败。",
802    login_title: "登录Titan Games",
803    login_btn: "登录",
804    or_use: "或使用:",
805    register: "注册",
806    hero_subtitle: "联合 • 游玩 • 征服",
807    cta_explore: "立即探索",
808    featured: "精选游戏",
809    games: "我们的游戏",
810    play: "开始游戏",
811    view_all: "查看所有游戏",
812    fallout_desc: "在末日中生存。",
813    survival_desc: "僵尸荒原冒险。",
814    robo_desc: "指挥机器人军队。",
815    mono_desc: "策略桌游。",
816    tank_desc: "坦克大战中击败敌人。",
817    sky_desc: "空战MMO。",
818    upcoming: "即将上线",
819    quest_desc: "史诗RPG冒险。",
820    starstrike_desc: "太空探索史诗。",
821    trailer: "预告片",
822    news: "Titan新闻中心",
823    community: "我们的社区",
824    discord_join: "加入Discord",
825    youtube: "YouTube",
826    facebook: "Facebook",
827    google_play: "Google Play",
828    tournaments: "锦标赛",
829    tournaments_desc: "赢取独家奖励!",
830    countdown: "下一个活动倒计时",
831    support: "支持我们",
832    donate: "捐赠",
833    privacy: "隐私政策",
834    terms: "条款",
835    contact: "联系我们",
836    footer_rights: "Titan Empire © 2025",
837    language_label: "🌐 语言:"
838  },
839
840  "pt-BR": {
841    title: "Titan Games - Conquiste o Cosmos",
842    nav_games: "Jogos",
843    nav_featured: "Destaques",
844    nav_community: "Comunidade",
845    nav_tournaments: "Torneios",
846    ticker: "🔥 Semana Titan: Créditos em Dobro! | 🎮 Nova Atualização! | 🚀 Participe dos Torneios!",
847    fallback: "Vídeo de fundo não carregado.",
848    login_title: "Entrar no Titan Games",
849    login_btn: "Entrar",
850    or_use: "Ou usar:",
851    register: "Registrar",
852    hero_subtitle: "Unir • Jogar • Conquistar",
853    cta_explore: "Explorar Agora",
854    featured: "Jogos em Destaque",
855    games: "Nossos Jogos",
856    play: "Jogar",
857    view_all: "Ver Todos os Jogos",
858    fallout_desc: "Sobreviva ao apocalipse.",
859    survival_desc: "Aventura em terras zumbis.",
860    robo_desc: "Comande exércitos robóticos.",
861    mono_desc: "Jogo de tabuleiro estratégico.",
862    tank_desc: "Destrua inimigos em batalhas de tanques.",
863    sky_desc: "MMO de combate aéreo.",
864    upcoming: "Lançamentos em Breve",
865    quest_desc: "Aventura RPG Épica.",
866    starstrike_desc: "Exploração Espacial Épica.",
867    trailer: "Trailer",
868    news: "Central de Notícias Titan",
869    community: "Nossa Comunidade",
870    discord_join: "Junte-se no Discord",
871    youtube: "YouTube",
872    facebook: "Facebook",
873    google_play: "Google Play",
874    tournaments: "Torneios",
875    tournaments_desc: "Compita por recompensas exclusivas!",
876    countdown: "Próximo Evento em",
877    support: "Apoie-nos",
878    donate: "Doar",
879    privacy: "Política de Privacidade",
880    terms: "Termos",
881    contact: "Contato",
882    footer_rights: "Titan Empire © 2025",
883    language_label: "🌐 Idioma:"
884  },
885
886  it: {
887    title: "Titan Games - Conquista il Cosmo",
888    nav_games: "Giochi",
889    nav_featured: "In Evidenza",
890    nav_community: "Comunità",
891    nav_tournaments: "Tornei",
892    ticker: "🔥 Settimana Titan: Crediti Doppi! | 🎮 Nuovo Aggiornamento! | 🚀 Partecipa ai Tornei!",
893    fallback: "Video di sfondo non caricato.",
894    login_title: "Accedi a Titan Games",
895    login_btn: "Accedi",
896    or_use: "Oppure usa:",
897    register: "Registrati",
898    hero_subtitle: "Unisciti • Gioca • Conquista",
899    cta_explore: "Esplora Ora",
900    featured: "Giochi in Evidenza",
901    games: "I Nostri Giochi",
902    play: "Gioca",
903    view_all: "Vedi Tutti i Giochi",
904    fallout_desc: "Sopravvivi all'apocalisse.",
905    survival_desc: "Avventura nel mondo dei zombie.",
906    robo_desc: "Comanda eserciti robotici.",
907    mono_desc: "Gioco da tavolo strategico.",
908    tank_desc: "Distruggi i nemici in battaglie tra carri armati.",
909    sky_desc: "MMO di combattimento aereo.",
910    upcoming: "Prossime Uscite",
911    quest_desc: "Epica avventura RPG.",
912    starstrike_desc: "Epica esplorazione spaziale.",
913    trailer: "Trailer",
914    news: "Centro Notizie Titan",
915    community: "La Nostra Comunità",
916    discord_join: "Unisciti su Discord",
917    youtube: "YouTube",
918    facebook: "Facebook",
919    google_play: "Google Play",
920    tournaments: "Tornei",
921    tournaments_desc: "Competi per premi esclusivi!",
922    countdown: "Prossimo Evento In",
923    support: "Sostienici",
924    donate: "Dona",
925    privacy: "Informativa sulla Privacy",
926    terms: "Termini",
927    contact: "Contatti",
928    footer_rights: "Titan Empire © 2025",
929    language_label: "🌐 Lingua:"
930  },
931
932  ko: {
933    title: "Titan Games - 우주를 정복하라",
934    nav_games: "게임",
935    nav_featured: "추천",
936    nav_community: "커뮤니티",
937    nav_tournaments: "토너먼트",
938    ticker: "🔥 타이탄 주간: 두 배 크레딧! | 🎮 새 업데이트! | 🚀 토너먼트에 참여하세요!",
939    fallback: "배경 비디오를 불러올 수 없습니다.",
940    login_title: "Titan Games 로그인",
941    login_btn: "로그인",
942    or_use: "또는 사용:",
943    register: "등록",
944    hero_subtitle: "단결 • 플레이 • 정복",
945    cta_explore: "지금 탐험하기",
946    featured: "추천 게임",
947    games: "우리의 게임",
948    play: "플레이",
949    view_all: "모든 게임 보기",
950    fallout_desc: "종말 후 생존하라.",
951    survival_desc: "좀비 황무지 모험.",
952    robo_desc: "로봇 군대를 지휘하라.",
953    mono_desc: "전략 보드 게임.",
954    tank_desc: "전차 전투에서 적을 격파하라.",
955    sky_desc: "항공전 MMO.",
956    upcoming: "출시 예정",
957    quest_desc: "서사적 RPG 모험.",
958    starstrike_desc: "우주 탐험 대서사시.",
959    trailer: "트레일러",
960    news: "Titan 뉴스 허브",
961    community: "우리의 커뮤니티",
962    discord_join: "Discord에 참여",
963    youtube: "YouTube",
964    facebook: "Facebook",
965    google_play: "Google Play",
966    tournaments: "토너먼트",
967    tournaments_desc: "독점 보상을 위해 경쟁하세요!",
968    countdown: "다음 이벤트까지",
969    support: "지원",
970    donate: "기부",
971    privacy: "개인정보 보호정책",
972    terms: "이용약관",
973    contact: "연락처",
974    footer_rights: "Titan Empire © 2025",
975    language_label: "🌐 언어:"
976  },
977
978  pl: {
979    title: "Titan Games - Podbij Kosmos",
980    nav_games: "Gry",
981    nav_featured: "Polecane",
982    nav_community: "Społeczność",
983    nav_tournaments: "Turnieje",
984    ticker: "🔥 Tydzień Titan: Podwójne Kredyty! | 🎮 Nowa Aktualizacja! | 🚀 Dołącz do Turniejów!",
985    fallback: "Nie udało się załadować tła wideo.",
986    login_title: "Zaloguj się do Titan Games",
987    login_btn: "Zaloguj się",
988    or_use: "Lub użyj:",
989    register: "Zarejestruj się",
990    hero_subtitle: "Zjednocz się • Graj • Podbijaj",
991    cta_explore: "Odkrywaj Teraz",
992    featured: "Polecane Gry",
993    games: "Nasze Gry",
994    play: "Graj",
995    view_all: "Zobacz Wszystkie Gry",
996    fallout_desc: "Przetrwaj apokalipsę.",
997    survival_desc: "Przygoda na pustkowiu zombie.",
998    robo_desc: "Dowódź armiami robotów.",
999    mono_desc: "Strategiczna gra planszowa.",
1000    tank_desc: "Pokonaj wrogów w bitwach czołgowych.",
1001    sky_desc: "MMO walk powietrznych.",
1002    upcoming: "Nadchodzące Premiery",
1003    quest_desc: "Epicka przygoda RPG.",
1004    starstrike_desc: "Epopeja o eksploracji kosmosu.",
1005    trailer: "Zwiastun",
1006    news: "Centrum Wiadomości Titan",
1007    community: "Nasza Społeczność",
1008    discord_join: "Dołącz na Discord",
1009    youtube: "YouTube",
1010    facebook: "Facebook",
1011    google_play: "Google Play",
1012    tournaments: "Turnieje",
1013    tournaments_desc: "Rywalizuj o ekskluzywne nagrody!",
1014    countdown: "Następne Wydarzenie Za",
1015    support: "Wesprzyj Nas",
1016    donate: "Wspomóż",
1017    privacy: "Polityka Prywatności",
1018    terms: "Warunki",
1019    contact: "Kontakt",
1020    footer_rights: "Titan Empire © 2025",
1021    language_label: "🌐 Język:"
1022  },
1023
1024  tr: {
1025    title: "Titan Games - Evreni Fethet",
1026    nav_games: "Oyunlar",
1027    nav_featured: "Öne Çıkanlar",
1028    nav_community: "Topluluk",
1029    nav_tournaments: "Turnuvalar",
1030    ticker: "🔥 Titan Haftası: Çift Kredi! | 🎮 Yeni Güncelleme! | 🚀 Turnuvalara Katıl!",
1031    fallback: "Arka plan videosu yüklenemedi.",
1032    login_title: "Titan Games'e Giriş Yap",
1033    login_btn: "Giriş Yap",
1034    or_use: "Veya kullan:",
1035    register: "Kayıt Ol",
1036    hero_subtitle: "Birleş • Oyna • Fethede",
1037    cta_explore: "Hemen Keşfet",
1038    featured: "Öne Çıkan Oyunlar",
1039    games: "Oyunlarımız",
1040    play: "Oyna",
1041    view_all: "Tüm Oyunları Gör",
1042    fallout_desc: "Kıyametten sağ çık.",
1043    survival_desc: "Zombi diyarında macera.",
1044    robo_desc: "Robot ordularına komuta et.",
1045    mono_desc: "Stratejik masa oyunu.",
1046    tank_desc: "Tank savaşlarında düşmanlarını yok et.",
1047    sky_desc: "Hava savaşı MMO.",
1048    upcoming: "Yakında Çıkacaklar",
1049    quest_desc: "Efsanevi RPG macerası.",
1050    starstrike_desc: "Uzay keşif destanı.",
1051    trailer: "Fragman",
1052    news: "Titan Haber Merkezi",
1053    community: "Topluluğumuz",
1054    discord_join: "Discord’a Katıl",
1055    youtube: "YouTube",
1056    facebook: "Facebook",
1057    google_play: "Google Play",
1058    tournaments: "Turnuvalar",
1059    tournaments_desc: "Özel ödüller için yarış!",
1060    countdown: "Sonraki Etkinlik Başlıyor",
1061    support: "Bizi Destekle",
1062    donate: "Bağış Yap",
1063    privacy: "Gizlilik Politikası",
1064    terms: "Şartlar",
1065    contact: "İletişim",
1066    footer_rights: "Titan Empire © 2025",
1067    language_label: "🌐 Dil:"
1068  }
1069};
1070
1071// ==========================================================
1072// 🌐 CONTACT PAGE TRANSLATIONS (MERGED INTO MAIN SYSTEM)
1073// ==========================================================
1074Object.keys(translations).forEach(lang => {
1075  if (!translations[lang]) translations[lang] = {};
1076  const t = translations[lang];
1077
1078  const merged = {
1079    contact_title: {
1080      en: "Contact Titan Games",
1081      es: "Contactar a Titan Games",
1082      fr: "Contacter Titan Games",
1083      de: "Kontakt zu Titan Games",
1084      ru: "Связаться с Titan Games",
1085      ja: "Titan Gamesへのお問い合わせ",
1086      "zh-CN": "联系 Titan Games",
1087      "pt-BR": "Contate a Titan Games",
1088      it: "Contatta Titan Games",
1089      ko: "Titan Games 문의하기",
1090      pl: "Skontaktuj się z Titan Games",
1091      tr: "Titan Games ile İletişim"
1092    },
1093    contact_intro: {
1094      en: "We’d love to hear from you! Whether you’re reporting a bug, submitting feedback, or requesting collaboration — get in touch below.",
1095      es: "¡Nos encantaría saber de ti! Ya sea que informes un error, envíes comentarios o solicites colaboración, contáctanos a continuación.",
1096      fr: "Nous serions ravis d’avoir de vos nouvelles ! Que vous signaliez un bug, donniez un avis ou proposiez une collaboration — contactez-nous ci-dessous.",
1097      de: "Wir würden uns freuen, von dir zu hören! Ob du einen Fehler meldest, Feedback gibst oder eine Zusammenarbeit vorschlägst — kontaktiere uns unten.",
1098      ru: "Мы будем рады вас услышать! Сообщите об ошибке, оставьте отзыв или предложите сотрудничество — напишите нам ниже.",
1099      ja: "ご意見・ご要望をお聞かせください!バグ報告、フィードバック、またはコラボのご提案など、以下のフォームからご連絡ください。",
1100      "zh-CN": "我们期待您的来信!无论是报告问题、提供反馈,还是提出合作请求,请通过下方联系表联系我们。",
1101      "pt-BR": "Adoraríamos ouvir você! Seja para relatar um bug, enviar feedback ou propor colaboração — entre em contato abaixo.",
1102      it: "Ci piacerebbe sentirti! Che si tratti di segnalare un bug, inviare un feedback o proporre una collaborazione — contattaci qui sotto.",
1103      ko: "버그 보고, 피드백 또는 협업 제안 등 언제든 환영합니다! 아래 양식을 작성해주세요.",
1104      pl: "Chętnie Cię wysłuchamy! Zgłoś błąd, podziel się opinią lub zaproponuj współpracę — wypełnij poniższy formularz.",
1105      tr: "Sizden haber almak isteriz! Hata bildirimi, geri bildirim veya işbirliği talebi için aşağıdan bizimle iletişime geçin."
1106    },
1107    contact_name: {
1108      en: "Your Name", es: "Tu Nombre", fr: "Votre Nom", de: "Dein Name",
1109      ru: "Ваше Имя", ja: "お名前", "zh-CN": "您的姓名", "pt-BR": "Seu Nome",
1110      it: "Il tuo nome", ko: "이름", pl: "Twoje Imię", tr: "Adınız"
1111    },
1112    contact_email: {
1113      en: "Your Email", es: "Tu Correo Electrónico", fr: "Votre Email", de: "Deine E-Mail",
1114      ru: "Ваш Email", ja: "メールアドレス", "zh-CN": "您的邮箱", "pt-BR": "Seu E-mail",
1115      it: "La tua email", ko: "이메일", pl: "Twój Email", tr: "E-postanız"
1116    },
1117    contact_message: {
1118      en: "Your Message", es: "Tu Mensaje", fr: "Votre Message", de: "Deine Nachricht",
1119      ru: "Ваше Сообщение", ja: "メッセージ内容", "zh-CN": "您的留言", "pt-BR": "Sua Mensagem",
1120      it: "Il tuo messaggio", ko: "메시지 내용", pl: "Twoja Wiadomość", tr: "Mesajınız"
1121    },
1122    contact_button: {
1123      en: "Send Message", es: "Enviar Mensaje", fr: "Envoyer le Message", de: "Nachricht Senden",
1124      ru: "Отправить Сообщение", ja: "メッセージを送信", "zh-CN": "发送消息", "pt-BR": "Enviar Mensagem",
1125      it: "Invia Messaggio", ko: "메시지 보내기", pl: "Wyślij Wiadomość", tr: "Mesaj Gönder"
1126    },
1127    contact_alt: {
1128      en: "Or email us directly at", es: "O envíanos un correo directamente a", fr: "Ou envoyez-nous directement un email à",
1129      de: "Oder sende uns direkt eine E-Mail an", ru: "Или напишите нам напрямую на", ja: "または次のメールアドレスへ直接ご連絡ください:",
1130      "zh-CN": "或直接发送邮件至", "pt-BR": "Ou envie-nos um e-mail diretamente para", it: "Oppure scrivici direttamente a",
1131      ko: "또는 다음 주소로 직접 이메일을 보내주세요:", pl: "Lub napisz bezpośrednio na adres", tr: "Veya doğrudan şu adrese e-posta gönderin:"
1132    }
1133  };
1134
1135  for (const key in merged) {
1136    t[key] = merged[key][lang] || merged[key].en;
1137  }
1138});
1139
1140// ==========================================================
1141// 🌐 PRIVACY PAGE TRANSLATIONS (MERGED INTO MAIN SYSTEM)
1142// ==========================================================
1143Object.keys(translations).forEach(lang => {
1144  if (!translations[lang]) translations[lang] = {};
1145  const t = translations[lang];
1146
1147  const merged = {
1148    privacy_title: {
1149      en: "Privacy Policy", es: "Política de Privacidad", fr: "Politique de Confidentialité",
1150      de: "Datenschutzrichtlinie", ru: "Политика конфиденциальности", ja: "プライバシーポリシー",
1151      "zh-CN": "隐私政策", "pt-BR": "Política de Privacidade", it: "Informativa sulla Privacy",
1152      ko: "개인정보 보호정책", pl: "Polityka Prywatności", tr: "Gizlilik Politikası"
1153    },
1154    privacy_updated: {
1155      en: "Last updated: November 6, 2025", es: "Última actualización: 6 de noviembre de 2025",
1156      fr: "Dernière mise à jour : 6 novembre 2025", de: "Zuletzt aktualisiert: 6. November 2025",
1157      ru: "Последнее обновление: 6 ноября 2025", ja: "最終更新日: 2025年11月6日",
1158      "zh-CN": "最后更新:2025年11月6日", "pt-BR": "Última atualização: 6 de novembro de 2025",
1159      it: "Ultimo aggiornamento: 6 novembre 2025", ko: "마지막 업데이트: 2025년 11월 6일",
1160      pl: "Ostatnia aktualizacja: 6 listopada 2025", tr: "Son güncelleme: 6 Kasım 2025"
1161    },
1162    privacy_intro: {
1163      en: "Titan Games values your privacy and explains how we collect, use, and protect your data.",
1164      es: "Titan Games valora tu privacidad y explica cómo recopilamos, usamos y protegemos tus datos.",
1165      fr: "Titan Games accorde une grande importance à votre vie privée et explique comment nous collectons, utilisons et protégeons vos données.",
1166      de: "Titan Games legt Wert auf Ihre Privatsphäre und erklärt, wie wir Ihre Daten erfassen, verwenden und schützen.",
1167      ru: "Titan Games ценит вашу конфиденциальность и объясняет, как мы собираем, используем и защищаем ваши данные.",
1168      ja: "Titan Gamesはお客様のプライバシーを重視し、データの収集・利用・保護について説明します。",
1169      "zh-CN": "Titan Games重视您的隐私,并解释我们如何收集、使用和保护您的数据。",
1170      "pt-BR": "A Titan Games valoriza sua privacidade e explica como coletamos, usamos e protegemos seus dados.",
1171      it: "Titan Games tiene alla tua privacy e spiega come raccogliamo, usiamo e protegg
1171iamo i tuoi dati.",
1172      ko: "Titan Games는 귀하의 개인 정보를 소중히 여기며, 데이터를 수집, 사용 및 보호하는 방법을 설명합니다.",
1173      pl: "Titan Games ceni Twoją prywatność i wyjaśnia, jak zbieramy, wykorzystujemy i chronimy Twoje dane.",
1174      tr: "Titan Games gizliliğinize değer verir ve verilerinizi nasıl topladığımızı, kullandığımızı ve koruduğumuzu açıklar."
1175    },
1176    privacy_1_title: {
1177      en: "1. Information We Collect", es: "1. Información que recopilamos", fr: "1. Informations collectées",
1178      de: "1. Informationen, die wir sammeln", ru: "1. Информация, которую мы собираем",
1179      ja: "1. 収集する情報", "zh-CN": "1. 我们收集的信息", "pt-BR": "1. Informações que coletamos",
1180      it: "1. Informazioni che raccogliamo", ko: "1. 수집하는 정보", pl: "1. Informacje, które zbieramy", tr: "1. Topladığımız Bilgiler"
1181    },
1182    privacy_2_title: {
1183      en: "2. How We Use Your Data", es: "2. Cómo usamos tus datos", fr: "2. Utilisation de vos données",
1184      de: "2. Wie wir Ihre Daten verwenden", ru: "2. Как мы используем ваши данные",
1185      ja: "2. データの利用方法", "zh-CN": "2. 我们如何使用您的数据", "pt-BR": "2. Como usamos seus dados",
1186      it: "2. Come usiamo i tuoi dati", ko: "2. 데이터 사용 방식", pl: "2. Jak wykorzystujemy Twoje dane", tr: "2. Verilerinizi Nasıl Kullanıyoruz"
1187    },
1188    privacy_3_title: {
1189      en: "3. Cookies", es: "3. Cookies", fr: "3. Cookies", de: "3. Cookies",
1190      ru: "3. Файлы cookie", ja: "3. クッキー", "zh-CN": "3. Cookies", "pt-BR": "3. Cookies",
1191      it: "3. Cookie", ko: "3. 쿠키", pl: "3. Pliki cookie", tr: "3. Çerezler"
1192    },
1193    privacy_4_title: {
1194      en: "4. Third-Party Services", es: "4. Servicios de terceros", fr: "4. Services tiers",
1195      de: "4. Drittanbieter-Dienste", ru: "4. Сторонние сервисы", ja: "4. サードパーティサービス",
1196      "zh-CN": "4. 第三方服务", "pt-BR": "4. Serviços de Terceiros", it: "4. Servizi di Terze Parti",
1197      ko: "4. 제3자 서비스", pl: "4. Usługi stron trzecich", tr: "4. Üçüncü Taraf Hizmetleri"
1198    },
1199    privacy_5_title: {
1200      en: "5. Data Security", es: "5. Seguridad de los Datos", fr: "5. Sécurité des Données",
1201      de: "5. Datensicherheit", ru: "5. Безопасность данных", ja: "5. データの安全性",
1202      "zh-CN": "5. 数据安全", "pt-BR": "5. Segurança dos Dados", it: "5. Sicurezza dei Dati",
1203      ko: "5. 데이터 보안", pl: "5. Bezpieczeństwo Danych", tr: "5. Veri Güvenliği"
1204    },
1205    privacy_6_title: {
1206      en: "6. Contact", es: "6. Contacto", fr: "6. Contact", de: "6. Kontakt",
1207      ru: "6. Контакт", ja: "6. お問い合わせ", "zh-CN": "6. 联系我们", "pt-BR": "6. Contato",
1208      it: "6. Contatto", ko: "6. 문의", pl: "6. Kontakt", tr: "6. İletişim"
1209    }
1210  };
1211
1212  for (const key in merged) {
1213    t[key] = merged[key][lang] || merged[key].en;
1214  }
1215});
1216
1217// ==========================================================
1218// 🌐 TERMS PAGE TRANSLATIONS (MERGED INTO MAIN SYSTEM)
1219// ==========================================================
1220Object.keys(translations).forEach(lang => {
1221  if (!translations[lang]) translations[lang] = {};
1222  const t = translations[lang];
1223
1224  const merged = {
1225    terms_title: {
1226      en: "Terms of Service", es: "Términos de Servicio", fr: "Conditions d'utilisation",
1227      de: "Nutzungsbedingungen", ru: "Условия обслуживания", ja: "利用規約",
1228      "zh-CN": "服务条款", "pt-BR": "Termos de Serviço", it: "Termini di Servizio",
1229      ko: "서비스 약관", pl: "Warunki korzystania", tr: "Hizmet Şartları"
1230    },
1231    terms_updated: {
1232      en: "Last updated: November 6, 2025", es: "Última actualización: 6 de noviembre de 2025",
1233      fr: "Dernière mise à jour : 6 novembre 2025", de: "Zuletzt aktualisiert: 6. November 2025",
1234      ru: "Последнее обновление: 6 ноября 2025", ja: "最終更新日: 2025年11月6日",
1235      "zh-CN": "最后更新:2025年11月6日", "pt-BR": "Última atualização: 6 de novembro de 2025",
1236      it: "Ultimo aggiornamento: 6 novembre 2025", ko: "마지막 업데이트: 2025년 11월 6일",
1237      pl: "Ostatnia aktualizacja: 6 listopada 2025", tr: "Son güncelleme: 6 Kasım 2025"
1238    },
1239    terms_1_title: {
1240      en: "1. Acceptance of Terms", es: "1. Aceptación de los Términos", fr: "1. Acceptation des Conditions",
1241      de: "1. Annahme der Bedingungen", ru: "1. Принятие условий", ja: "1. 規約の承諾",
1242      "zh-CN": "1. 接受条款", "pt-BR": "1. Aceitação dos Termos", it: "1. Accettazione dei Termini",
1243      ko: "1. 약관 동의", pl: "1. Akceptacja warunków", tr: "1. Şartların Kabulü"
1244    },
1245    terms_1_text: {
1246      en: "By using Titan Games, you agree to these Terms of Service.",
1247      es: "Al usar Titan Games, aceptas estos Términos de Servicio.",
1248      fr: "En utilisant Titan Games, vous acceptez ces Conditions d'utilisation.",
1249      de: "Durch die Nutzung von Titan Games stimmen Sie diesen Nutzungsbedingungen zu.",
1250      ru: "Используя Titan Games, вы соглашаетесь с этими Условиями обслуживания.",
1251      ja: "Titan Gamesを利用することで、これらの利用規約に同意したものとみなã
1251•れます。",
1252      "zh-CN": "使用Titan Games即表示您同意这些服务条款。",
1253      "pt-BR": "Ao usar o Titan Games, você concorda com estes Termos de Serviço.",
1254      it: "Utilizzando Titan Games, accetti i presenti Termini di Servizio.",
1255      ko: "Titan Games를 사용함으로써 본 이용약관에 동의하게 됩니다.",
1256      pl: "Korzystając z Titan Games, akceptujesz niniejsze Warunki korzystania.",
1257      tr: "Titan Games'i kullanarak bu Hizmet Şartlarını kabul etmiş olursunuz."
1258    },
1259    terms_2_title: {
1260      en: "2. Use of Services", es: "2. Uso de los Servicios", fr: "2. Utilisation des Services",
1261      de: "2. Nutzung der Dienste", ru: "2. Использование сервисов", ja: "2. サービスの利用",
1262      "zh-CN": "2. 服务使用", "pt-BR": "2. Uso dos Serviços", it: "2. Uso dei Servizi",
1263      ko: "2. 서비스 이용", pl: "2. Korzystanie z Usług", tr: "2. Hizmetlerin Kullanımı"
1264    },
1265    terms_2_item1: {
1266      en: "Be at least 13 years old", es: "Tener al menos 13 años", fr: "Avoir au moins 13 ans",
1267      de: "Mindestens 13 Jahre alt sein", ru: "Быть не моложе 13 лет", ja: "13歳以上であること",
1268      "zh-CN": "至少13岁", "pt-BR": "Ter pelo menos 13 anos", it: "Avere almeno 13 anni",
1269      ko: "만 13세 이상이어야 합니다", pl: "Mieć co najmniej 13 lat", tr: "En az 13 yaşında olun"
1270    },
1271    terms_2_item2: {
1272      en: "Refrain from harassment or cheating", es: "Abstenerse de acosar o hacer trampas",
1273      fr: "S'abstenir de harcèlement ou de triche", de: "Kein Belästigen oder Betrügen",
1274      ru: "Воздерживаться от домогательств или мошенничества", ja: "嫌がらせや不正行為をしないこと",
1275      "zh-CN": "避免骚扰或作弊", "pt-BR": "Abster-se de assédio ou trapaça", it: "Evitare molestie o imbrogli",
1276      ko: "괴롭힘이나 부정 행위를 하지 마세요", pl: "Powstrzymaj się od nękania lub oszustw", tr: "Taciz veya hileden kaçının"
1277    },
1278    terms_2_item3: {
1279      en: "Not exploit bugs, hacks, or reverse-engineer our games",
1280      es: "No explotar errores, hacks o ingeniería inversa en nuestros juegos",
1281      fr: "Ne pas exploiter de bugs, hacks ou rétro-ingénierie de nos jeux",
1282      de: "Keine Bugs, Hacks ausnutzen oder unsere Spiele rückentwickeln",
1283      ru: "Не использовать ошибки, хаки или обратное проектирование наших игр",
1284      ja: "バグやハックを悪用したり、ゲームをリバースエンジニアリングしないこと",
1285      "zh-CN": "不得利用漏洞、黑客行为或反向工程我们的游戏",
1286      "pt-BR": "Não explorar bugs, hacks ou fazer engenharia reversa de nossos jogos",
1287      it: "Non sfruttare bug, hack o fare reverse engineering dei nostri giochi",
1288      ko: "버그, 핵 또는 역공학을 하지 마세요",
1289      pl: "Nie wykorzystuj błędów, hacków ani nie odtwarzaj naszych gier wstecznie",
1290      tr: "Hataları, hileleri veya oyunlarımızı tersine mühendisliği kullanmayın"
1291    }
1292  };
1293
1294  for (const key in merged) {
1295    t[key] = merged[key][lang] || merged[key].en;
1296  }
1297});
1298
1299// ==========================================================
1300// 🌐 DONATIONS PAGE TRANSLATIONS (NEW FULL VERSION)
1301// ==========================================================
1302Object.keys(translations).forEach(lang => {
1303  if (!translations[lang]) translations[lang] = {};
1304  const t = translations[lang];
1305
1306  const merged = {
1307    donate_title: {
1308      en: "Support the Titan Empire",
1309      es: "Apoya al Imperio Titan",
1310      fr: "Soutenez l'Empire Titan",
1311      de: "Unterstütze das Titan-Imperium",
1312      ru: "Поддержите Империю Титан",
1313      ja: "タイタン・エンパイアを支援する",
1314      "zh-CN": "支持泰坦帝国",
1315      "pt-BR": "Apoie o Império Titan",
1316      it: "Sostieni l’Impero Titan",
1317      ko: "타이탄 제국을 지원하세요",
1318      pl: "Wesprzyj Imperium Tytanów",
1319      tr: "Titan İmparatorluğunu Destekle"
1320    },
1321    donate_intro: {
1322      en: "Titan Games is a <strong>100% free-to-play</strong> universe — no pay-to-win, no unfair advantages. We believe every player deserves a fair battleground where <strong>skill, teamwork, and creativity</strong> define victory. Your support keeps Titan Games thriving — funding new worlds, advanced systems, and a stronger, fairer gaming community.",es: "Titan Games es un universo completamente gratuito — sin pagar para ganar ni ventajas injustas. Creemos que cada jugador merece un campo de batalla justo donde la habilidad, el trabajo en equipo y la creatividad definan la victoria. Tu apoyo mantiene vivo Titan Games, financiando nuevos mundos, sistemas avanzados y una comunidad más fuerte.",
1323      fr: "Titan Games est un univers 100 % gratuit — sans pay-to-win 
1323ni avantages injustes. Nous croyons que chaque joueur mérite un champ de bataille équitable où la compétence, le travail d'équipe et la créativité définissent la victoire. Votre soutien fait prospérer Titan Games, finançant de nouveaux mondes, systèmes et une communauté plus forte.",
1324      de: "Titan Games ist ein vollständig kostenloses Universum — kein Pay-to-Win, keine unfairen Vorteile. Wir glauben, dass jeder Spieler ein faires Spielfeld verdient, auf dem Können, Teamwork und Kreativität den Sieg bestimmen. Deine Unterstützung hält Titan Games am Leben und finanziert neue Welten, Systeme und eine faire Community.",
1325      ru: "Titan Games — это полностью бесплатная вселенная без Pay-to-Win и несправедливых преимуществ. Мы верим, что каждый игрок заслуживает честного поля боя, где победу определяют мастерство, командная работа и креативность. Ваша поддержка помогает нам развивать новые миры, улучшать системы и укреплять сообщество.",
1326      ja: "Titan Gamesは完全無料の宇宙です。勝つための課金や不公平な優位性は一切ありません。プレイヤー全員がスキルとチームワーク、創造力で勝負できる公平な戦場を提供します。あなたの支援はTitan Gamesを維持し、新しい世界や公正なコミュニティの発展を支えます。",
1327      "zh-CN": "Titan Games 是一个完全免费游玩的宇宙——没有付费取胜,也没有不公平优势。我们相信每位玩家都应在公平的战场上凭实力、团队合作与创意取胜。您的支持让 Titan Games 持续繁荣,资助新世界、系统与更强大的玩家社区。",
1328      "pt-BR": "Titan Games é um universo 100% gratuito — sem pagar para vencer, sem vantagens injustas. Acreditamos que todo jogador merece um campo de batalha justo, onde habilidade, trabalho em equipe e criatividade definem a vitória. Seu apoio mantém o Titan Games vivo — financiando novos mundos, sistemas e uma comunidade mais forte.",
1329      it: "Titan Games è un universo completamente gratuito — niente pay-to-win, nessun vantaggio sleale. Crediamo che ogni giocatore meriti un campo di battaglia equo dove abilità, lavoro di squadra e creatività determinano la vittoria. Il tuo supporto mantiene Titan Games in vita, finanziando nuovi mondi e una comunità più forte.",
1330      ko: "Titan Games는 100% 무료 플레이 우주입니다 — 페이투윈이나 불공정한 이점은 없습니다. 모든 플레이어가 실력, 팀워크, 창의력으로 승부할 수 있는 공정한 전장을 누릴 자격이 있습니다. 여러분의 후원이 Titan Games를 발전시키고 새로운 세계와 공정한 커뮤니티를 만듭니다.",
1331      pl: "Titan Games to w 100% darmowy wszechświat — bez pay-to-win i niesprawiedliwych przewag. Wierzymy, że każdy gracz zasługuje na uczciwe pole bitwy, gdzie o zwycięstwie decydują umiejętności, współpraca i kreatywność. Twoje wsparcie utrzymuje Titan Games przy życiu, finansując nowe światy i sprawiedliwą społeczność.",
1332      tr: "Titan Games tamamen ücretsiz bir evrendir — pay-to-win yok, haksız avantaj yok. Her oyuncunun beceri, takım çalışması ve yaratıcılıkla zafer kazandığı adil bir savaş alanını hak ettiğine inanıyoruz. Desteğiniz Titan Games’in gelişmesini, yeni dünyalar ve adil bir topluluk oluşumunu sağlar."
1333    },
1334    donate_why_title: {
1335      en: "Where Your Donations Go",
1336      es: "A Dónde Van Tus Donaciones",
1337      fr: "À quoi servent vos dons",
1338      de: "Wofür Spenden verwendet werden",
1339      ru: "На что идут ваши пожертвования",
1340      ja: "寄付金の使い道",
1341      "zh-CN": "捐款的去向",
1342      "pt-BR": "Como Usamos as Doações",
1343      it: "Come vengono utilizzate le donazioni",
1344      ko: "기부금의 사용처",
1345      pl: "Na co przeznaczane są darowizny",
1346      tr: "Bağışlarınız nereye gidiyor"
1347    },
1348    donate_why_1: {
1349      en: "🌐 Dedicated game servers — stability, security, and performance for every player.",
1350      es: "🌐 Servidores dedicados: estabilidad, seguridad y rendimiento para todos los jugadores.",
1351      fr: "🌐 Serveurs de jeu dédiés — stabilité, sécurité et performance pour tous les joueurs.",
1352      de: "🌐 Dedizierte Spielserver — Stabilität, Sicherheit und Leistung für alle Spieler.",
1353      ru: "🌐 Игровые серверы — стабильность, безопасность и высокая производительность для всех игроков.",
1354      ja: "🌐 専用ゲームサーバー — 安定性、セキュリティ、パフォーマンスをすべてのプレイヤーに。",
1355      "zh-CN": "🌐 专用游戏服务器——为所有玩家提供稳定、安全与高性能的体验。",
1356      "pt-BR": "🌐 Servidores dedicados — estabilidade, segurança e desempenho para todos os jogadores.",
1357      it: "🌐 Server dedicati — stabilità, sicurezza e prestazioni per tutti i giocatori.",
1358      ko: "🌐 전용 게임 서버 — 모든 플레이어를 위한 안정성과 성능 보장.",
1359      pl: "🌐 Dedykowane serwery — stabilność, bezpieczeństwo i wydajność dla wszystkich graczy.",
1360      tr: "🌐 Özel oyun sunucuları — tüm oyuncular için stabilite, güvenlik ve performans."
1361    },
1362    donate_why_2: {
1363      en: "🗺️ New maps, missions, and worlds across the exp
1363anding Titan Universe.",
1364      es: "🗺️ Nuevos mapas, misiones y mundos en el universo en expansión de Titan.",
1365      fr: "🗺️ Nouvelles cartes, missions et mondes à travers l’univers en expansion de Titan.",
1366      de: "🗺️ Neue Karten, Missionen und Welten im wachsenden Titan-Universum.",
1367      ru: "🗺️ Новые карты, миссии и миры в растущей вселенной Titan.",
1368      ja: "🗺️ 拡大を続けるTitan宇宙の新しいマップやミッション、世界。",
1369      "zh-CN": "🗺️ 不断扩展的 Titan 宇宙中的新地图、任务与世界。",
1370      "pt-BR": "🗺️ Novos mapas, missões e mundos pelo universo em expansão de Titan.",
1371      it: "🗺️ Nuove mappe, missioni e mondi nell’universo in espansione di Titan.",
1372      ko: "🗺️ 확장되는 Titan 우주의 새로운 맵, 미션, 그리고 세계들.",
1373      pl: "🗺️ Nowe mapy, misje i światy w rozrastającym się wszechświecie Titan.",
1374      tr: "🗺️ Genişleyen Titan Evreninde yeni haritalar, görevler ve dünyalar."
1375    },
1376    donate_why_3: {
1377      en: "🎨 Art, sound, and animation enhancements that bring our games to life.",
1378      es: "🎨 Mejoras en arte, sonido y animación que dan vida a nuestros juegos.",
1379      fr: "🎨 Améliorations visuelles, sonores et d’animation donnant vie à nos jeux.",
1380      de: "🎨 Verbesserte Grafik, Sound und Animationen, die unsere Spiele zum Leben erwecken.",
1381      ru: "🎨 Улучшение графики, звука и анимаций, оживляющих наши игры.",
1382      ja: "🎨 ゲームを生き生きとさせるアート、サウンド、アニメーションの改良。",
1383      "zh-CN": "🎨 改进游戏美术、音效与动画,让每个世界更加生动。",
1384      "pt-BR": "🎨 Melhorias de arte, som e animações que dão vida aos nossos jogos.",
1385      it: "🎨 Miglioramenti grafici, sonori e di animazione che danno vita ai giochi.",
1386      ko: "🎨 게임에 생명을 불어넣는 그래픽, 사운드, 애니메이션 향상.",
1387      pl: "🎨 Udoskonalenie grafiki, dźwięku i animacji, które ożywiają nasze gry.",
1388      tr: "🎨 Oyunlarımızı hayata geçiren sanat, ses ve animasyon iyileştirmeleri."
1389    },
1390    donate_why_4: {
1391      en: "🤖 Smarter Discord bots, event systems, and community tools.",
1392      es: "🤖 Bots de Discord más inteligentes, sistemas de eventos y herramientas comunitarias.",
1393      fr: "🤖 Bots Discord plus intelligents, systèmes d’événements et outils communautaires.",
1394      de: "🤖 Intelligentere Discord-Bots, Events und Community-Tools.",
1395      ru: "🤖 Умные Discord-боты, системы событий и инструменты для сообщества.",
1396      ja: "🤖 より賢いDiscordボット、イベントシステム、コミュニティツール。",
1397      "zh-CN": "🤖 更智能的 Discord 机器人、活动系统与社区工具。",
1398      "pt-BR": "🤖 Bots de Discord mais inteligentes, sistemas de eventos e ferramentas comunitárias.",
1399      it: "🤖 Bot Discord più intelligenti, sistemi di eventi e strumenti comunitari.",
1400      ko: "🤖 더 스마트한 Discord 봇과 커뮤니티 툴, 이벤트 시스템.",
1401      pl: "🤖 Inteligentniejsze boty Discord, systemy wydarzeń i narzędzia społecznościowe.",
1402      tr: "🤖 Daha akıllı Discord botları, etkinlik sistemleri ve topluluk araçları."
1403    },
1404    donate_why_5: {
1405      en: "💡 Player customization — avatars, glowing borders, pets, achievements, and Titan Coins.",
1406      es: "💡 Personalización del jugador: avatares, bordes brillantes, mascotas, logros y Titan Coins.",
1407      fr: "💡 Personnalisation du joueur — avatars, bordures lumineuses, familiers, succès et Titan Coins.",
1408      de: "💡 Spieleranpassung — Avatare, leuchtende Ränder, Haustiere, Erfolge und Titan Coins.",
1409      ru: "💡 Кастомизация игроков — аватары, светящиеся рамки, питомцы, достижения и монеты Titan.",
1410      ja: "💡 プレイヤーカスタマイズ:アバター、発光ボーダー、ペット、実績、Titan Coin。",
1411      "zh-CN": "💡 玩家个性化——头像、发光边框、å
1411® ç‰©ã€æˆå°±å’Œ Titan Coins。",
1412      "pt-BR": "💡 Personalização de jogadores — avatares, bordas brilhantes, pets, conquistas e Titan Coins.",
1413      it: "💡 Personalizzazione del giocatore — avatar, bordi luminosi, animali, trofei e Titan Coins.",
1414      ko: "💡 플레이어 커스터마이징 — 아바타, 네온 테두리, 펫, 업적 및 Titan Coin.",
1415      pl: "💡 Personalizacja graczy — awatary, świecące ramki, zwierzęta, osiągnięcia i monety Titan.",
1416      tr: "💡 Oyuncu özelleştirmesi — avatarlar, parlak kenarlıklar, evcil hayvanlar, başarılar ve Titan Coin’ler."
1417    },
1418    donate_why_6: {
1419      en: "🎮 More free games, more modes, and continuous updates without paywalls.",
1420      es: "🎮 Más juegos gratuitos, más modos y actualizaciones continuas sin muros de pago.",
1421      fr: "🎮 Plus de jeux gratuits, plus de modes et des mises à jour continues sans barrières payantes.",
1422      de: "🎮 Mehr kostenlose Spiele, mehr Modi und ständige Updates ohne Paywalls.",
1423      ru: "🎮 Больше бесплатных игр, больше режимов и регулярные обновления без доната.",
1424      ja: "🎮 さらに多くの無料ゲーム、モード、ペイウォールのない継続的なアップデート。",
1425      "zh-CN": "🎮 更多免费游戏、更多模式与持续更新,无付费墙。",
1426      "pt-BR": "🎮 Mais jogos gratuitos, mais modos e atualizações contínuas sem paywalls.",
1427      it: "🎮 Più giochi gratuiti, più modalità e aggiornamenti continui senza paywall.",
1428      ko: "🎮 더 많은 무료 게임, 더 많은 모드, 페이월 없는 지속적인 업데이트.",
1429      pl: "🎮 Więcej darmowych gier, więcej trybów i ciągłe aktualizacje bez paywalla.",
1430      tr: "🎮 Daha fazla ücretsiz oyun, daha fazla mod ve paywall olmadan sürekli güncellemeler."
1431    },
1432    donate_why_7: {
1433      en: "🎉 Tournaments, seasonal events, and giveaways for all players.",
1434      es: "🎉 Torneos, eventos de temporada y sorteos para todos los jugadores.",
1435      fr: "🎉 Tournois, événements saisonniers et cadeaux pour tous les joueurs.",
1436      de: "🎉 Turniere, saisonale Events und Giveaways für alle Spieler.",
1437      ru: "🎉 Турниры, сезонные события и розыгрыши для всех игроков.",
1438      ja: "🎉 すべてのプレイヤー向けのトーナメント、シーズンイベント、ギブアウェイ。",
1439      "zh-CN": "🎉 面向所有玩家的锦标赛、赛季活动与赠品活动。",
1440      "pt-BR": "🎉 Torneios, eventos sazonais e sorteios para todos os jogadores.",
1441      it: "🎉 Tornei, eventi stagionali e giveaway per tutti i giocatori.",
1442      ko: "🎉 모든 플레이어를 위한 토너먼트, 시즌 이벤트 및 경품 행사.",
1443      pl: "🎉 Turnieje, wydarzenia sezonowe i rozdania dla wszystkich graczy.",
1444      tr: "🎉 Tüm oyuncular için turnuvalar, sezonluk etkinlikler ve çekilişler."
1445    },
1446    donate_footer: {
1447        en: "Titan Games runs without intrusive ads or paywalls — your contributions power our servers, innovation, and the next generation of fair gaming. Together, we are building the <strong>Titan Empire</strong> — a universe shaped by players, not purchases.",es: "Titan Games funciona sin anuncios intrusivos ni muros de pago — tus contribuciones impulsan nuestros servidores, la innovación y la próxima generación de juegos justos. Juntos, estamos construyendo el Imperio Titan — un universo creado por jugadores, no por compras.",
1448      fr: "Titan Games fonctionne sans publicités intrusives ni barrières payantes — vos contributions alimentent nos serveurs, l’innovation et la prochaine génération de jeux équitables. Ensemble, nous construisons l’Empire Titan — un univers façonné par les joueurs, pas par les achats.",
1449      de: "Titan Games läuft ohne störende Werbung oder Paywalls — eure Unterstützung treibt unsere Server, Innovation und die nächste Generation fairer Spiele an. Gemeinsam bauen wir das Titan-Imperium — ein Universum, das von Spielern, nicht von Käufen, gestaltet wird.",
1450      ru: "Titan Games работает без навязчивой рекламы и донат-заграждений — ваши пожертвования обеспечивают серверы, инновации и будущее честного гейминга. Вместе мы создаём Империю Титан — вселенную, построенную игроками, а не покупками.",
1451      ja: "Titan Gamesは広告や課金制限なしで運営されています。あなたの支援は私たちのサーバー、革新、そして公正な次世代ゲームを支えます。共に、プレイヤーによって築かれるTitan帝国を創り上げましょう。",
1452      "zh-CN": "Titan Games 无广告、无付费墙运营——您的支持推动服务器、创新与公平游戏的未来。我们共同打造由玩家塑造的泰坦帝国。",
1453      "pt-BR": "Titan Games funciona sem anúncios invasivos nem paywalls — suas contribuições impulsionam nossos servidores, inovação e a próxima geração de jogos justos. Juntos, estamos construindo o Império Titan — um universo moldado por jogadores, não por compras.",
1454      it: "Titan Games funziona senza pubblicità invasive o paywall — i tuoi contributi alimentano i nostri server, l’innovazione e la prossima generazione di giochi equi. Insieme stiamo costruendo l’Impero Titan — un universo creato dai giocatori, non dagli acquisti.",
1455      ko: "Titan Games는 광고나 페이월 없이 운영됩니다 — 여러분의 후원이 서버, 혁신, 그리고 공정한 차세대 게임을 만들어 갑니다. 우리는 함께, 구매가 아닌 플레이어가 만든 타이탄 제국을 건설하고 있습니다.",
1456      pl: "Titan Games działa bez nachalnych reklam i paywalli — twoje wsparcie napędza nasze serwery, innowacje i przyszłość uczciwego grania. Razem budujemy Imperium Titan — wszechświat tworzony przez graczy, nie przez zakupy.",
1457      tr: "Titan Games rahatsız edici reklamlar veya paywall'lar olmadan çalışır — katkılarınız sunucularımıza, yeniliğe ve adil oyunların geleceğine güç verir. Birlikte, oyuncular tarafından şekillenen Titan İmparatorluğunu inşa ediyoruz."
1458    },
1459    donate_button: {
1460      en: "Donate via PayPal",
1461      es: "Donar con PayPal",
1462      fr: "Faire un don via PayPal",
1463      de: "Über PayPal spenden",
1464      ru: "Пожертвовать через PayPal",
1465      ja: "PayPalで寄付する",
1466      "zh-CN": "通过PayPal捐赠",
1467      "pt-BR": "Doar via PayPal",
1468      it: "Dona tramite PayPal",
1469      ko: "PayPal로 기부하기",
1470      pl: "Wpłać przez PayPal",
1471      tr: "PayPal ile Bağış Yap"
1472    }
1473  };
1474
1475  for (const key in merged) {
1476    t[key] = merged[key][lang] || merged[key].en;
1477  }
1478});
1479
1480// ==============================================
1481// 🧩 Extend setLanguage() to update placeholders
1482// ==============================================
1483const oldSetLanguage = setLanguage;
1484setLanguage = function (lang) {
1485  oldSetLanguage(lang);
1486
1487  // Update placeholders
1488  document.querySelectorAll("[data-placeholder]").forEach(el => {
1489    const key = el.getAttribute("data-placeholder");
1490    if (translations[lang][key]) {
1491      el.placeholder = translations[lang][key];
1492    }
1493  });
1494};
1495
1496// ==============================================
1497// 🌍 AUTO-DETECT LANGUAGE BY BROWSER LOCALE
1498// ==============================================
1499(function autoDetectLanguage() {
1500  // Only detect if user hasn't chosen a language yet
1501  if (!localStorage.getItem("lang")) {
1502    const browserLang = navigator.language ? navigator.language.split("-")[0] : "en";
1503    const supportedLangs = ["en","es","fr","de","ru","ja","zh-CN","pt-BR","it","ko","pl","tr"];
1504    let detectedLang = supportedLangs.includes(browserLang) ? browserLang : "en";
1505
1506    // Handle special cases like "zh-CN" or "pt-BR"
1507    if (navigator.language.startsWith("zh")) detectedLang = "zh-CN";
1508    if (navigator.language.startsWith("pt")) detectedLang = "pt-BR";
1509
1510    setLanguage(detectedLang);
1511    document.querySelectorAll("#language-select, #language-select-footer").forEach(sel => {
1512      sel.value = detectedLang;
1513    });
1514  }
1515})();
1516
1517// ==============================================
1518// 🌍 LANGUAGE SYSTEM
1519// ==============================================
1520function setLanguage(lang) {
1521  if (!translations[lang]) return;
1522  document.querySelectorAll("[data-translate]").forEach(el => {
1523  const key = el.getAttribute("data-translate");
1524  if (translations[lang][key]) {
1525    el.innerHTML = translations[lang][key];  // ✅ FIXED — preserves <strong>, <b>, etc.
1526  }
1527});
1528  localStorage.setItem("lang", lang);
1529}
1530
1531// Apply saved or default language
1532const savedLang = localStorage.getItem("lang") || "en";
1533setLanguage(savedLang);
1534
1535// Sync both selectors and apply on change
1536document.querySelectorAll("#language-select, #language-select-footer").forEach(sel => {
1537  sel.value = savedLang;
1538  sel.addEventListener("change", e => {
1539    const lang = e.target.value;
1540    setLanguage(lang);
1541    document.querySelectorAll("#language-select, #language-select-footer").forEach(s => (s.value = lang));
1542  });
1543});
1544
1545// ==============================================
1546// 💬 DARK / LIGHT MODE TOGGLE
1547// ==============================================
1548(function themeToggleSystem() {
1549  const toggleBtn = document.getElementById("theme-toggle");
1550  const currentTheme = localStorage.getItem("theme") || "dark";
1551
1552  // Apply saved theme on load
1553  if (currentTheme === "light") {
1554    document.body.classList.add("light-mode");
1555    if (toggleBtn) toggleBtn.textContent = "☀️";
1556  } else {
1557    if (toggleBtn) toggleBtn.textContent = "🌙";
1558  }
1559
1560  // Handle toggle click
1561  if (toggleBtn) {
1562    toggleBtn.addEventListener("click", () => {
1563      document.body.classList.toggle("light-mode");
1564      const isLight = document.body.classList.contains("light-mode");
1565      toggleBtn.textContent = isLight ? "☀️" : "🌙";
1566      localStorage.setItem("theme", isLight ? "light" : "dark");
1567    });
1568  }
1569})();
1570
1571function startCountdown(targetDate) {
1572  const timerEl = document.getElementById("countdown-timer");
1573  if (!timerEl) return;
1574
1575  function updateTimer() {
1576    const now = new Date();
1577    const diff = targetDate - now;
1578    if (diff <= 0) {
1579      timerEl.textContent = "LIVE NOW!";
1580      timerEl.style.color = "lime";
1581      return;
1582    }
1583    const days = Math.floor(diff / (1000 * 60 * 60 * 24));
1584    const hours = Math.floor((diff / (1000 * 60 * 60)) % 24);
1585    const mins = Math.floor((diff / (1000 * 60)) % 60);
1586    const secs = Math.floor((diff / 1000) % 60);
1587    timerEl.textContent = `${days}d ${hours}h ${mins}m ${secs}s`;
1588  }
1589
1590  updateTimer();
1591  setInterval(updateTimer, 1000);
1592}
1593
1594// Example: Event starts Dec 1, 2025
1595startCountdown(new Date("2025-12-01T00:00:00"));
1596
1597  document.addEventListener('mousemove', e => {
1598    interactiveEls.forEach(el => {
1599      const rect = el.getBoundingClientRect();
1600      const elX = rect.left + rect.width / 2;
1601      const elY = rect.top + rect.height / 2;
1602      const dist = Math.hypot(e.clientX - elX, e.clientY - elY);
1603      const maxDist = 250;
1604
1605      if (dist < maxDist) {
1606        const intensity = 1 - dist / maxDist;
1607        el.style.boxShadow = `0 0 ${25 * intensity}px red, 0 0 ${50 * intensity}px crimson`;
1608        el.style.transform = `scale(${1 + 0.05 * intensity})`;
1609      } else {
1610        el.style.boxShadow = '';
1611        el.style.transform = '';
1612      }
1613    });
1614  });
1615});
1616

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.