<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Questions</title>
  <link rel="icon" href="image/Logo.icon"> 
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
  <style>
    /* أساسيات التصميم */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #ffffff;
  line-height: 1.6;
}

/* رأس الصفحة */
header {
  background: #1f1f1f;
  text-align: center;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border-bottom: 4px solid #00B8ED;
}

header h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0;
}

/* عدادات المعلومات */
.counters {
  display: flex;
  justify-content: space-around; /* توزيع العناصر بالتساوي */
  padding: 15px;
  background-color: #1f1f1f; /* لون الخلفية */
  flex-wrap: wrap;
}

.counter {
  text-align: center;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: #ffffff; /* لون النص الأبيض لجميع النصوص داخل .counter */
  font-weight: bold;
}

.counter i {
  margin-right: 8px; /* ترك مسافة بين الأيقونة والنص */
}

.to {
  color: #DB770E; /* تأكد من أن النصوص البيضاء تبقى باللون الأبيض */
  margin-right: 5px; /* ترك مسافة بين النصوص */
}

.counter  {
  color: #fff; /* اللون الأحمر للنصوص المهمة */
  font-weight: bold;
}

/* معرض الصور */
.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  
}

.gallery img {
  border-radius: 10px;
  width: 100px;
  transition: transform 0.5s, box-shadow 0.3s ease-in-out;
}

.gallery img:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

/* صندوق الأسئلة */
#quiz-container {
  max-width: 90%;
  margin: 30px auto;
  background-color: #222;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#question {
  text-align: center;
  font-weight: bold;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 20px;
}

/* الخيارات */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.option img {
  width: 100%;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.option img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.3);
}

/* شريط التقدم */
.progress-bar {
  width: 100%;
  background: #444;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-bar div {
  height: 100%;
  background: #00B8ED;
  width: 0;
  transition: width 0.3s;
}

/* الفوتر */
  footer {
  background: #1f1f1f;
  text-align: center;
  padding: 15px;
  border-top: 4px solid #00B8ED; /* تغيير من border-bottom إلى border-top */
}


footer p {
  margin: 0;
  font-size: clamp(0.8rem, 2vw, 1rem);
}
/* تحسين الصور عند الهواتف */
@media (max-width: 768px) {
  .gallery img {
    width: 80px;
  }

  .options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* حركة التمرير */
@keyframes slideAnimation {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

  </style>
</head>
<body>
	<div style="
    display: flex; 
    justify-content: space-between; 
    background: #1f1f1f;
    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: #fff;">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>
    <h1>Let's search for what suits you.</h1>
   <p>With your choice and our expertise, you will have the most beautiful dating experience in the world.</p>
  </header>

  <div class="counters">
    <div class="counter">
      <i class="fas fa-clock"></i>
      <span class="to">Remaining time:</span>
      <span id="timer">10:00</span>
    </div>
    <div class="counter">
      <i class="fas fa-check"></i>
      <span class="to">Answers:</span>
      <span id="answers-count">0</span>/6
    </div>
    <div class="counter">
      <i class="fas fa-users"></i>
      <span class="to">Number of visitors:</span>
      <span id="visitor-count">598</span>
    </div>
</div>

  <div class="gallery-section">
    <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="امرأة4">
            <img src="image/male/male5.png" alt="امرأة5">
            <img src="image/male/male6.png" alt="امرأة6">
            <img src="image/male/male7.png" alt="امرأة7">
            <img src="image/male/male8.png" alt="امرأة8">
            <img src="image/male/male9.png" alt="امرأة9">
            <img src="image/male/male10.png" alt="امرأة10">
            <img src="image/male/male11.png" alt="امرأة11">
            <img src="image/male/male12.png" alt="امرأة12">
            <img src="image/male/male13.png" alt="امرأة13">
            <img src="image/male/male14.png" alt="امرأة14">
            <img src="image/male/male15.png" alt="امرأة15">
            <img src="image/male/male16.png" alt="امرأة16">
            <img src="image/male/male17.png" alt="امرأة17">
            <img src="image/male/male18.png" alt="امرأة18">
            <img src="image/male/male19.png" alt="امرأة19">
            <img src="image/male/male20.png" alt="امرأة20">
            <img src="image/male/male21.png" alt="امرأة21">
            <img src="image/male/male22.png" alt="امرأة22">
            <img src="image/male/male23.png" alt="امرأة23">
            <img src="image/male/male24.png" alt="امرأة24">
        </div>
    </section>

  <div id="quiz-container">
    <div id="question">ما هو أول شيء يجذبك في شريك حياتك؟</div>
    <div class="options">
      <div class="option" onclick="nextQuestion(0)">
        <img src="https://via.placeholder.com/300x200?">
      </div>
      <div class="option" onclick="nextQuestion(1)">
        <img src="https://via.placeholder.com/300x200?">
      </div>
      <div class="option" onclick="nextQuestion(2)">
        <img src="https://via.placeholder.com/300x200?">
      </div>
      <div class="option" onclick="nextQuestion(3)">
        <img src="https://via.placeholder.com/300x200?">
      </div>
    </div>
    <div class="progress-bar">
      <div id="progress-bar-fill"></div>
    </div>
  </div>
<!-- إعلان -->
<div class="ad-container">
    <script type="text/javascript">
        atOptions = {
            'key' : '6dd4f8dd0ee47352baffc2024096132a',
            'format' : 'iframe',
            'height' : 90,
            'width' : 728,
            'params' : {}
        };
    </script>
    <script type="text/javascript" src="//www.highperformanceformat.com/6dd4f8dd0ee47352baffc2024096132a/invoke.js"></script>
</div>

<style>
    .ad-container {
        width: 100%; /* تجعل الحاوية تأخذ العرض الكامل */
        max-width: 728px; /* الحد الأقصى للعرض */
        height: 90px; /* ارتفاع الإعلان */
        margin: 0 auto; /* لتوسيع العنصر في وسط الصفحة */
        overflow: hidden; /* إخفاء أي محتوى يتجاوز الحاوية */
    }

    /* لجعل الإطار داخلي مرن */
    .ad-container iframe {
        width: 100%; /* العرض 100% للحاوية */
        height: 100%; /* الارتفاع 100% للحاوية */
        border: none; /* إخفاء حدود الإطار */
    }
</style>

  <footer>
    <p>All Rights Reserved © 2024.</p>
  </footer>

  <script>
    let time = 10 * 60;
const timerElement = document.getElementById('timer');
const progressBarFill = document.getElementById('progress-bar-fill');
const answersCountElement = document.getElementById('answers-count');

// تحديث المؤقت كل ثانية
setInterval(() => {
  const minutes = Math.floor(time / 60);
  const seconds = time % 60;
  timerElement.textContent = `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
  time--;
  if (time < 0) {
    // إعادة التوجيه بعد انتهاء الوقت
    window.location.href = "female.html";
  }
}, 1000);

// تحديث عداد الزوار بشكل عشوائي
const visitorElement = document.getElementById('visitor-count');
setInterval(() => {
  visitorElement.textContent = parseInt(visitorElement.textContent) + Math.floor(Math.random() * 5);
}, 3000);

// الأسئلة والخيارات
const questions = [
  { question: "Do you prefer sex?", images: ["image/question1.png", "image/question2.png", "image/question0.png", "image/question00.png"] },
  { question: "What’s your favorite technique for passionate sex?", images: ["image/question6.png", "image/question7.png", "image/question10.png", "image/question13.png"] },
  { question: "What is something that turns you on?", images: ["image/questionF3.png", "image/questionF4.png", "image/questionF5.png", "image/questionF12.png"] },
  { question: "How would you rate yourself in bed?", images: ["image/question20.png", "image/question21.png", "image/question22.png", "image/question23.png"] },
  { question: "Is there something you wouldn’t do during sex?", images: ["image/question8.png", "image/question9.png", "image/question14.png", "image/question15.png"] },
  { question: "How would you rate yourself as a kisser?", images: ["image/question16.png", "image/question17.png", "image/question18.png", "image/question19.png"] },
];

let currentQuestion = 0;

// وظيفة الانتقال إلى السؤال التالي
function nextQuestion(answerIndex) {
  const progress = ((currentQuestion + 1) / questions.length) * 100;
  progressBarFill.style.width = `${progress}%`;

  if (currentQuestion < questions.length - 1) {
    currentQuestion++;
    loadQuestion();
    answersCountElement.textContent = currentQuestion + 1;
  } else {
    // إعادة ضبط القيم بعد الإجابة على السؤال الأخير
    setTimeout(() => {
      time = 10 * 60; // إعادة ضبط المؤقت إلى 10 دقائق
      answersCountElement.textContent = "0"; // إعادة ضبط عداد الإجابات
      progressBarFill.style.width = "0%"; // إعادة ضبط شريط التقدم
      currentQuestion = 0; // إعادة ضبط السؤال الحالي
      loadQuestion(); // إعادة تحميل السؤال الأول
      // إعادة التوجيه إلى الصفحة الجديدة
      window.location.href = "female2.html";
    }, 1000); // تأخير طفيف لإجراء الانتقال بسلاسة
  }
}

// وظيفة تحميل السؤال الحالي
function loadQuestion() {
  const current = questions[currentQuestion];
  document.getElementById('question').textContent = current.question;
  const options = document.querySelectorAll('.option img');
  options.forEach((option, index) => {
    option.src = current.images[index];
  });
}

// تحميل السؤال الأول عند فتح الصفحة
loadQuestion();
</script>
<script>
  // دالة التمرير التلقائي المُحسّنة
  function autoScrollGallery(selector) {
      const gallery = document.querySelector(selector);
      if (!gallery) return;

      let scrollStep = 1.5; // سرعة التمرير
      let scrollDirection = 1; // اتجاه التمرير (1 لليمين، -1 لليسار)

      function scrollGallery() {
          // التحكم في الاتجاه عند الوصول لنهاية أو بداية القائمة
          if (gallery.scrollLeft >= gallery.scrollWidth - gallery.clientWidth) {
              scrollDirection = -1; // عكس الاتجاه
          } else if (gallery.scrollLeft <= 0) {
              scrollDirection = 1; // العودة إلى الاتجاه الأصلي
          }

          // تطبيق التمرير
          gallery.scrollLeft += scrollStep * scrollDirection;

          // استدعاء الحركة التالية
          requestAnimationFrame(scrollGallery);
      }

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

  // تطبيق التمرير التلقائي عند تحميل الصفحة
  document.addEventListener('DOMContentLoaded', () => {
      autoScrollGallery('.gallery');
  });
</script>

</body>
</html>
