<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>إعادة التوجيه | Redirection</title>
    <link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary: #c7a45d;
            --secondary: #8e6c2f;
            --accent: #5d4215;
            --bg-dark: #1a1a1a;
            --text-light: #fff;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            font-family: 'Tajawal', Arial, sans-serif;
            background: var(--bg-dark);
            color: var(--text-light);
            overflow: hidden;
        }

        .container {
            text-align: center;
            padding: 40px;
            background: rgba(199, 164, 93, 0.05);
            border-radius: 30px;
            backdrop-filter: blur(10px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
            position: relative;
            z-index: 1;
            max-width: 600px;
            width: 90%;
            border: 2px solid rgba(199, 164, 93, 0.1);
        }

        .islamic-pattern {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: repeating-linear-gradient(
                45deg,
                rgba(199, 164, 93, 0.05) 25%,
                transparent 25%,
                transparent 75%,
                rgba(199, 164, 93, 0.05) 75%,
                rgba(199, 164, 93, 0.05)
            );
            background-size: 30px 30px;
            border-radius: 30px;
            opacity: 0.3;
            z-index: -1;
        }

        .rtl {
            direction: rtl;
        }

        h1 {
            margin-bottom: 30px;
            font-size: 2.8em;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: titleGlow 2s ease-in-out infinite alternate;
            font-weight: 700;
            position: relative;
        }

        h1::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 150px;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--primary), transparent);
        }

        .loader {
            width: 100px;
            height: 100px;
            margin: 30px auto;
            position: relative;
        }

        .loader::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 3px solid transparent;
            border-top-color: var(--primary);
            animation: spin 1s linear infinite;
        }

        .loader::after {
            content: '';
            position: absolute;
            width: 70%;
            height: 70%;
            border-radius: 50%;
            border: 3px solid transparent;
            border-top-color: var(--secondary);
            top: 15%;
            left: 15%;
            animation: spin 0.5s linear infinite reverse;
        }

        .countdown-wrapper {
            position: relative;
            margin: 40px 0;
        }

        .countdown {
            font-size: 64px;
            font-weight: bold;
            color: var(--primary);
            text-shadow: 0 0 20px rgba(199, 164, 93, 0.3);
            animation: pulse 1s ease-in-out infinite alternate;
        }

        .message {
            font-size: 1.4em;
            margin: 15px 0;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
        }

        .ornament {
            font-size: 24px;
            color: var(--primary);
            margin: 20px 0;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            100% { transform: scale(1.1); }
        }

        @keyframes titleGlow {
            0% { filter: brightness(1); }
            100% { filter: brightness(1.5); }
        }

        .background-effects {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
        }

        .circle {
            position: absolute;
            border-radius: 50%;
            background: radial-gradient(circle at center, var(--primary), transparent);
            opacity: 0.1;
            animation: float 20s infinite linear;
        }

        @keyframes float {
            0% { transform: translateY(100vh) rotate(0deg); }
            100% { transform: translateY(-100vh) rotate(360deg); }
        }

        @media (max-width: 480px) {
            .container {
                padding: 20px;
            }
            h1 {
                font-size: 2em;
            }
            .countdown {
                font-size: 48px;
            }
            .message {
                font-size: 1.2em;
            }
        }
    </style>
</head>
<body>
    <div class="background-effects" id="backgroundEffects"></div>
    <div class="container" id="mainContainer">
        <div class="islamic-pattern"></div>
        <div class="ornament">☪</div>
        <h1 id="title"></h1>
        <div class="loader"></div>
        <p class="message" id="redirectMessage"></p>
        <div class="countdown-wrapper">
            <div class="countdown" id="countdown"></div>
        </div>
        <p class="message" id="messageMessage"></p>
        <div class="ornament">⭒</div>
    </div>

    <script>
        const translations = {
            fr: {
                title: "Tongasoa",
                redirect: "",
                message: "Bienvenue sur le site Zoto Web"
            },
            en: {
                title: "Tongasoa",
                redirect: "",
                message: "Welcome to Zoto Web site"
            },
            ar: {
                title: "Tongasoa",
                redirect: "",
                message: "مرحبا في موقع زوتو ويب"
            }
        };

        // Création des effets d'arrière-plan
        function createBackgroundEffects() {
            const container = document.getElementById('backgroundEffects');
            for (let i = 0; i < 15; i++) {
                const circle = document.createElement('div');
                circle.className = 'circle';
                const size = Math.random() * 200 + 50;
                circle.style.width = `${size}px`;
                circle.style.height = `${size}px`;
                circle.style.left = `${Math.random() * 100}%`;
                circle.style.animationDelay = `${Math.random() * 20}s`;
                container.appendChild(circle);
            }
        }
        createBackgroundEffects();

        // Détection de la langue
        const userLanguage = navigator.language.split('-')[0];
        const currentTranslation = translations[userLanguage] || translations.ar; // Par défaut en arabe

        // Application des traductions
        document.getElementById('title').textContent = currentTranslation.title;
        document.getElementById('redirectMessage').textContent = currentTranslation.redirect;
        document.getElementById('messageMessage').textContent = currentTranslation.message;

        // Ajout de la classe RTL pour l'arabe
        if (userLanguage === 'ar' || true) { // Force RTL pour un style plus oriental
            document.getElementById('mainContainer').classList.add('rtl');
        }

        // URL de destination
        const destinationURL = "https://aryarzoto.great-site.net/SilamBoki";
        
        // Compte à rebours
        let countdown = 5;
        const countdownElement = document.querySelector('.countdown');
        
        const timer = setInterval(() => {
            countdown--;
            countdownElement.textContent = countdown;
            
            if (countdown <= 0) {
                clearInterval(timer);
                window.location.href = destinationURL;
            }
        }, 1000);

        // Effet de parallaxe
        document.addEventListener('mousemove', (e) => {
            const container = document.querySelector('.container');
            const xAxis = (window.innerWidth / 2 - e.pageX) / 25;
            const yAxis = (window.innerHeight / 2 - e.pageY) / 25;
            container.style.transform = `rotateY(${xAxis}deg) rotateX(${yAxis}deg)`;
        });

        document.addEventListener('mouseleave', () => {
            const container = document.querySelector('.container');
            container.style.transform = 'rotateY(0deg) rotateX(0deg)';
        });
    </script>
</body>
</html>