* {
  /* هنا اساسيات للصفحه  */
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}


/* تغليف العنصرين داخل حاوية */


.container1 {
  width: 100%;
  display: flex;
  flex-direction: column;     /* العناصر تحت بعض */
  align-items: center;        /* توسيط أفقي داخل الحاوية */
  gap: 2px;                  /* مسافة بين العناصر */
  padding: 4px;              /* مسافة داخلية للحاوية */
  margin-bottom: 0px; /* 🔽 أضف أو قلل هذا بدل ترك المسافة كبيرة */

}




#countdown-timer{
  display: flex;
  flex-grow: 1; /* يمتد لملء المساحة المتبقية */
  text-align: left; /* محاذاة النص إلى اليسار */
  font-size: 15px;

}

/* نوع السؤال */
#AntwortenZahl {
  transition: background-color 0.6s ease-in-out;
  padding: 5px 10px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: bold;
  min-width: 180px;
  text-align: center;
  margin: 0px;

}




.language-selector {
  margin: 2px;
  font-size: 13px;
  padding: 2px;
}
.restoreButton {
  margin: 1px;
  font-size: 11px;
  padding: 2px;
  color: #ffffff;

}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  background-color: #007bff;
  color: rgb(50, 42, 42);
  border: none;
  outline: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  min-height: 44px;
  margin: 5px 0;
  position: relative;
  overflow: hidden;
}



/* Continar */
.continar {
  max-width: 1600px; /* الحد الأقصى لعرض الحاوية */
  padding: 7px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap; /* لضبط المحتويات بشكل تلقائي */
  gap: 20px;
}
@media (max-width: 768px) {
  .continar {
    /* العناصر تكون عمودية على الشاشات الصغيرة */
    padding: 15px;
  }
}
body {
  /* هنا تنسيق الصفحه  */
  width: 100%;
  min-height: 100vh;
  background-color: #f7f7f7;
  font-family: Arial, sans-serif;
  position: relative;
}
/* هنا ال navigttion */
.header {
  width: 100%;
  height: 5.2rem;
  padding: 2rem 4rem;
  background-color: #2e3b4e;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
}

.header .head-nav {
  font-size: 1.5rem !important;
  font-weight: bold;
}
@media (max-width: 790px) {
  .header {
    padding: 2rem 1rem;
  }
  .header .head-nav {
    font-size: 1rem;
  }
}
.header .right-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}
.header .right-nav .btn1 {
  width: 4rem; /* تقليل العرض */
  height: 0.5rem; /* تقليل الارتفاع */
  cursor: pointer;
  outline: none;
  background-color: #0080f0;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 11px; /* تصغير حجم الخط */
}

.header .right-nav .btn1:hover {
  background-color: #5a6268;
}
.header .right-nav .icon {
  font-size: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.header .right-nav .icon:hover {
  font-size: 27px;
}
@media (max-width: 570px) {
  .header .right-nav .btn1 {
    width: 4rem;
    height: 3rem;
    font-size: 11px;
  }
  .header .right-nav {
    gap: 1rem;
  }
  header.header {
    
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* اختياري: ظل للفصل عن المحتوى */
  }
  


}
/* List Left Item */
.list-left {
  width: 100%;
}

.list-left .continar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.timer {
  margin-top: 0rem !important;
  font-weight: bold;
  font-size: 15px;
  color: #2e3b4e !important;
  padding: 4px;
}
.table-container {
  position: fixed;
  top: 0; /* تحديد الارتفاع الجديد من الأعلى */
  right: 0;
  bottom: 0;
  width: 0px;
  margin-left: auto; /* دفع الجدول إلى اليمين */
  overflow-y: auto; /* تمكين التمرير العمودي */
  max-height: calc(
    100vh - 70px
  ); /* تحديد ارتفاع أقصى للجدول بعد التقليل من الأعلى */
  transition: all 0.4s ease-in-out;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.tableAdd {
  width: 250px;
}
.button-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -1%; /* توسيط أفقي */
  margin-top: -85px;
  font-size: 15px;
  
  
}

       


#button-container {
  display: flex;

  flex-direction: column;
  gap: 4px;
  padding: 0px;
  width: 95%;
  margin: auto;
  box-sizing: border-box;
  position: static; /* بدل من relative إن لم يكن هناك ضرورة له */
  top: 100%;
}

#button-container {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease-in-out;
}

#button-container.hidden {
  opacity: 0;
  visibility: hidden;
}



#button-container button {
  text-align: left;
  padding: 15px;
  outline: none;
  border: none;
  cursor: pointer;
  width: 100%;
  background-color: #007bff;
  color: #ffffff;
  font-size: 17px;
  height: 150%;
  font-weight: bold;

}

#button-container button:hover {
  transform: translateX(10px);
  background-color: #0056b3;
}
#button-container label {
  display: flex;
  width: 100%;
  justify-content: center;
  font-size: 13px;
  line-height: 1.3;
  font-weight: bold;
  height: 150%;
}

table {
  width: auto;
  background-color: #000003;
  gap: 50px;
  font-size: 16px !important;
}

#button-container label:first-child {
  background-color: #2e3b4e;
  padding: 10px;
  /* تغيير لون الخلفية */
  color: #fff; /* تغيير لون النص */
  font-weight: bold; /* تغيير الوزن */
  justify-content: center;
  display: flex;
  font-size: 18px;
}

.first-item-wrapper {
  margin-top: -20px; /* رفع العنصر الأول إلى الأعلى بقيمة سالبة */
}


#label1 {
  display: none;

  margin-top: 20px;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tr {
  font-size: 13px !important;
}
#label5 {
  margin-top: 40px;
  font-size: 16px;
  font-weight: bold;
}
#list {
  display: none;
}
#next-buttons {
  width: 100%;
  padding: 0 3rem;
  display: flex;
  gap: 20px;
  margin-top: 18px; /* إضافة مسافة بادئة من أعلى الأزرار */
  align-items: center;
  justify-content: center;
  margin-bottom: 0rem;
}


#check-button {
  margin-top: 10px; /* إضافة مسافة بادئة من أعلى الأزرار */
}

.container {
  margin-bottom: 3rem;
  margin: 10px auto 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 80%;
  gap: 0px;
  display: none; /* تحديد العنصر كعنصر Flexbox */
}

.subject {
  margin-top: 10px; /* تحديد هامش علوي لتجنب تغطية العنوان */
}

.subject h3 {
  margin-bottom: 5px;
}
.bar-container {
  background-color: #f0f0f0;
  border-radius: 5px;
  padding: 5px;
  position: relative;
}
.bar {
  background-color: #4caf50;
  height: 20px;
  border-radius: 5px;
  position: relative;
}
.percentage,
.percentage2,
.percentage3,
.percentage4,
.percentage5,
.percentage6,
.percentage7,
.percentage8,
.percentage9 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
 color: #ffffff;

}
#resultsContainer,
#resultsContainer2,
#resultsContainer3,
#resultsContainer4,
#resultsContainer5,
#resultsContainer6,
#resultsContainer7,
#resultsContainer8,
#resultsContainer9 {
  flex-direction: column;
  gap: 0px; /* تقليل التباعد بين العناصر */
  background-color: #5c91f3;

}

#resultsContainer9 {
  margin-bottom: 100px;
}

.table-container table {
  border-collapse: collapse;
  width: 100%;
}
.table-container th,
.table-container td {
  border: 1px solid black;
  padding: 0; /* تخفيض التباعد داخل الخلية */
}
.table-container button {
  height: 50px;
  width: 100%;
  padding: 10px 20px;
  overflow: hidden;
  text-overflow: ellipsis; /* لوضع نقط الانقطاع في حال تم قص النص */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* عدد الأسطر التي يتم عرضها */
  -webkit-box-orient: vertical;
}

#finalResultText {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* توسيط النص داخل العنصر */
  gap: 20px;
  margin-top: 10px;
  font-weight: bold;

}

#label40,
#label50,
#label60,
#label70,
#label80 {
  display: none;
}
#countdown-timer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* توسيط النص داخل العنصر */
  gap: 10px;
  margin-top: 10px;
  color: #007bff; /* تغيير لون النص */
}
#Pro {
  display: none;
}

#labelIndex {
  display: none;
}
#list2 {
  display: none;
}

#next {
  display: flex;
  justify-content: center; /* توسيط العناصر */
  align-items: center; /* توسيط العناصر */
  background-color: #1e88e5; /* لون خلفية العنصر */
  border-radius: 10px; /* زوايا مستديرة */
  padding: 10px; /* هامش داخلي */
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* ظل */
  color: #fffdfd; /* لون النص */
  font-size: 15px; /* حجم الخط */
  width: 50%;
  height: auto;
  cursor: pointer;
  outline: none;
  border: none;
  

}
#next:hover {
  background-color: #0056b3;
}
#back {
  display: flex;
  justify-content: center; /* توسيط العناصر */
  align-items: center; /* توسيط العناصر */
  background-color: #1e88e5; /* لون خلفية العنصر */
  border-radius: 10px; /* زوايا مستديرة */
  padding: 10px; /* هامش داخلي */
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* ظل */
  color: #fffdfd; /* لون النص */
  font-size: 15px; /* حجم الخط */
  width: 50%;
  cursor: pointer;
  outline: none;
  border: none;
  
 
}
#back:hover {
  background-color: #0056b3;
}
#checkAnswers {
  display: flex;
  justify-content: center; /* توسيط العناصر */
  align-items: center; /* توسيط العناصر */
  background-color: #4caf50; /* لون خلفية العنصر */
  border-radius: 10px; /* زوايا مستديرة */
  padding: 10px; /* هامش داخلي */
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* ظل */
  color: #fff; /* لون النص */
  font-size: 13px; /* حجم الخط */
  width: 50%;
  cursor: pointer;
  outline: none;
  border: none;
  
 
}




/* تحسين أداء النقر في WebView */
button:active {
  transform: scale(0.95);
  transition: transform 0.1s;
}

/* تحسين عرض الأزرار على الأجهزة المحمولة */
@media (max-width: 768px) {
  button {
    min-height: 44px;
    padding: 12px;
    font-size: 16px;
  }

  #button-container button {
    margin: 5px 0;
  }
}

/* إضافة تأثير الـ ripple */
.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s linear;
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/* تحسينات WebView */
* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
}

button {
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  perspective: 1000px !important;
  will-change: transform !important;
  transition: transform 0.1s ease-out !important;
}

.ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s linear;
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}
