  /*------------ All ------------ */
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&family=Russo+One&display=swap');
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: clamp(12px, 1.8vw, 14px); 
    font-weight: 500; /* شبه Medium */  
    outline: none !important; /* يلغي أي حد أزرق عند الضغط */
    -webkit-tap-highlight-color: transparent; /* للأجهزة اللمسية */
    user-select: none; /* يمنع تحديد النص */
    color: #000000;
  }
  body {
    background-color: #222831;
    font-family: system-ui, sans-serif;
    padding: 20px;
    font-family: 'Poppins', 'Russo One', sans-serif;
    padding: 0;
    margin: 0;
    max-width: 100%; 
  }
  input, textarea, select, button {
    font-family: system-ui, sans-serif;
  }

/*------------ Header ------------ */
header {
  max-width: 800px; /* ثابت */
  margin: auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 56px; /* نفس يوتيوب تقريبا */
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 1px rgb(62, 62, 62);
  transition: transform 0.2s ease;  /* نفس إحساس يوتيوب */
  position: fixed;   /* الهيدر نفسه ثابت */
  overflow: visible; /* ✅ مهم باش القائمة تبان */

  
}
.header-spacer {
  height: 105px; /* نفس ارتفاع الهيدر */
}
.search-box input,
.search-box select {
  border: none;
  border-radius: 11px;
  outline: none;
  color: #535353;
  font-size: clamp(14px, 1.8vw, 16px); 
}
/* ========================*/

.search-box {
  position: relative; /* مهم للتثبيت */
  height: 56px;
  background: #fdfdfd;
  display: flex;
  align-items: center;
  justify-content: center; /* يوسّط المحتوى أفقياً (البحث) */
  padding: 0;               /* لا تضع padding هنا إن تستخدم absolute لليسار واليمين */
}

/* اللوغو - ثابت على اليسار بمقدار 40px */
#logo{
  position: absolute;
  left: 2px;                         /* المسافة من اليسار = 40px */
  top: 50%;
  transform: translateY(-50%);
  width: clamp(36px, 4vh, 40px);
  height: clamp(36px, 4vh, 40px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000000af;
  color:#ffffff;
  border-radius:50%;
  z-index: 2;
  font-size: clamp(14px, 1.8vw, 16px);
}

/* زر الرفع - ثابت على اليمين بمقدار 40px */
.filter {
  position: absolute;
  right: 2px;                        /* المسافة من اليمين = 40px */
  top: 50%;
  transform: translateY(-50%);
  width: clamp(36px, 4vh, 40px);
  height: clamp(36px, 4vh, 40px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000000af;
  color:#fff;
  border-radius:50%;
  border: none;
  cursor: pointer;
  z-index: 2;
  font-size: clamp(14px, 1.8vw, 16px);
}

/* مربع البحث - في الوسط بالضبط، ولا يغطي اللوغو/الزر لأن له حد أقصى يعتمد على المسافات */
.oneSearch {
  flex: 1;                        /* يخلي البحث يتمدد وياخذ كل الفراغ */
  margin: 0 43px;                  /* يترك 40px يمين ويسار */
  height: clamp(36px, 4vh, 40px);
  max-width: calc(100% - 86px);/* 46px يمين + 46px يسار */  
  background-color: #e0e0e0;
  padding: 0 12px;                 /* مسافة داخلية يمين/يسار للنص */
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 22px;
  font-size: clamp(14px, 1.8vw, 16px);
}



    /* font-size: clamp(18px, 2.2vw, 20px); */

.toast{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #333;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 9999;
  font-size: .9rem;
}
.toast--show{ opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success{ background:#18a01f; }
.toast--error{ background:#d01717; }

#backBox {
  display: flex;
  position: fixed;
  top: 54px;               /* تحت whiteBox مباشرة (حسب ارتفاع header + whiteBox) */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  background: #fdfdfd;
  z-index: 9998;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  white-space: nowrap;
  padding: 8.5px 5px;
  border-radius: 2px;
  -webkit-overflow-scrolling: touch;
}

#backBox .tag {
  display: inline-block;
  background: #eaeaea;
  color: #333;
  padding: 6px 12px;
  border-radius: 16px;
  margin-right: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}



#backBox .tag.active {
  background: #000;
  color: #fff;
}


/* خلفية داكنة تغطي كامل الشاشة */
.popup {
  display: none; /* مخفية افتراضيا */
  top: 0; 
  left: 0;
    height: 100%;
  z-index: 9;
  overflow-y: auto;   /* 👈 النافذة تقدر تتمرر */
    align-items: flex-start; /* يبدأ من الأعلى */

}

/* محتوى النافذة */
.popup-content {
  background: #fff;
  margin: 105px auto; /* مسافة للهيدر */
  width: 800px;       /* العرض الثابت */
  max-width: 100%;     /* يظل متجاوب على الشاشات الصغيرة */
  min-height: 2000px;
  border-radius: 6px;
  text-align: center;
  position: relative;
    overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


 /* === Containers === */
  #myapp-login-container,
  #myapp-register-container {
    width: 350px;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    margin: 50px auto;
  }

  #myapp-login-container.hidden,
  #myapp-register-container.hidden {
    display: none;
  }

  
/* Navigation */
nav {
    background-color: #0077ee;
    padding: 12px 0;
    text-align: center; /* روابط التنقل تبقى في الوسط */
    border-radius: 5px;
    margin-bottom: 20px;
}
nav a {
    color: #ffffff;
    margin: 0 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s, transform 0.3s;
}
nav a:hover {
    color: #ffdd00;
    transform: scale(1.05);
}

/* Main content */
main {
    padding: 25px 20px;
    max-width: 900px;
    margin: 0 auto 30px auto;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: left;
}

/* Section titles */
h1 {
    font-size: 20px;
    color: #004aad;
    margin-bottom: 12px;
    text-align: left;
}

/* Paragraphs */
p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #333333;
}

/* Footer */
footer {
    background-color: #004aad;
    color: #ffffff;
    text-align: center; /* نص الفوتر لليسار */
    padding: 18px 20px;
    margin-top: 30px;
    font-size: 14px;
    border-radius: 5px 5px 0 0;
}

/* Links inside content */
a {
    color: #0077ee;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
    color: #ff9900;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main {
        padding: 20px 15px;
        max-width: 95%;
    }
    h1 {
        font-size: 18px;
    }
    p {
        font-size: 14px;
    }
    nav a {
        display: block;
        margin: 8px 0;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 15px 10px;
    }
    h1 {
        font-size: 16px;
    }
    p {
        font-size: 13px;
    }
    nav a {
        font-size: 14px;
    }
    footer {
        font-size: 13px;
        padding: 15px 10px;
    }
}


#whiteBox {
  display: none;
  position: fixed;   /* يبقى فوق الصفحة وما يزحزحش المحتوى */
  top: 56px;         
  left: 50%;         
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  height: auto;
  background: #fdfdfd;
  z-index: 9999;
  opacity: 1;
  pointer-events: auto;       /* تفعيل التفاعل */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  overflow-y: visible;       /* يلغي تمرير عمودي داخلي */
  -webkit-overflow-scrolling: touch; /* سلاسة التمرير للموبايل */


}

#whiteBox.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}


#whiteBox ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

#whiteBox li {
  padding-top:3px;
  padding-bottom:4.5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;

}
/* الحاوية الأفقية مع تمرير */


/* أيقونات الصور */
#whiteBox .icon {
  flex: 0 0 auto;           /* يمنع الصور من الانكماش */
  width: 40px;
  height: 40px;
  border-radius: 50%;       /* الصورة تبقى دائرية */
  background-color: azure;   
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;        /* يسمح للإطار بالخروج */
  cursor: pointer;
  position: relative;
  
}

/* الصور داخل الدائرة */
#whiteBox .icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;       /* الصورة تبقى دائرية */
  position: relative;
  z-index: 2;
  display: block;
  
}

/* عند الضغط/تفعيل الصورة */
#whiteBox .icon.active {
  background-color: white;
}

/* الإطار الخارجي (باك قراوند مربع خارج الصورة) */
#whiteBox .icon.active::after {
  content: "";
  position: absolute;
  top: -6px;               /* خارج حدود الصورة */
  left: -6px;
  right: -6px;
  bottom: -6px;
  background-color: rgba(170, 170, 170, 0.401); /* باك قراوند واضح */
  border-radius: 8px;       /* مربع بزوايا خفيفة */
  z-index: 1;
  transition: all 0.3s ease;
}

/* أيقونات الصور مع الجملة */
#whiteBox .icon {
  display: flex;
  flex-direction: column; /* الصورة فوق، الجملة تحت */
  align-items: center;
}




#whiteBox .icon .caption {
  transform: translateY(-10px);
  z-index: 122;
  background-color: #222831;
  font-size: 12px;
  text-align: center;
  color: #ffffff;
  white-space: nowrap; /* منع الكسر */
}


/* كونتينر التمرير */
.scroll-container {
  overflow-x: auto;          /* تمكين التمرير الأفقي */
  padding: 0 5px;           /* padding خفيف يمين ويسار */
  white-space: nowrap;       /* منع التفاف العناصر */
  -webkit-overflow-scrolling: touch; /* smooth scroll للهواتف */
    scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
    overflow-y: hidden; /* يمنع التمرير العمودي */

}

/* قائمة الصور أفقية */
.horizontal-list li {
  display: inline-flex;      /* ترتيب الصور أفقياً */
  gap: 16px;                 /* مسافة بين الصور */
  list-style: none;          /* إزالة النقاط الافتراضية */
  
}

/* تحسين التمرير (اختياري) */
.scroll-container::-webkit-scrollbar {
  height: 6px;
}
.scroll-container::-webkit-scrollbar-thumb {
  background-color: #aaa;
  border-radius: 1px;
}







/*------------ card ------------ */
.card {
  width: 100%;   
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  max-width: 800px;
 margin: 0 auto auto auto;
} 
.card:not(:last-child) {
  margin-bottom: 0px;  /* المسافة فقط بين البطاقات */
}

.card img.main {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.image-wrapper {
  position: relative;
}

.text-box {
  padding: clamp(6px, 1vw, 10px) clamp(4px, 1vw, 8px);
  max-width: 800px;
}

.text-box > div {
  display: flex;
  flex-wrap: wrap;          /* يخلي العناصر يقدرو ينزلو لسطر ثاني */
  align-items: center;
  gap: 8px;                 /* مسافة بين العناصر */
  margin-bottom: 25px ;
  margin-top: 6px ;

}
.text-line {
  direction: ltr;
  white-space: nowrap;
  text-align: left;
  font-weight: normal;
  transition: color 0.2s ease;
  cursor: pointer;

}

/* العنوان */
.text-line:first-child {
  flex: 1 1 auto;         /* يتمدد بجنب الصورة */
  display: flex;
  align-items: flex-start; /* يخلي النص يطلع لأعلى بالنسبة للصورة */
  gap: 10px;
  font-size: clamp(18px, 2.2vw, 20px); 
  margin-top: -4px;        /* يرفع العنوان شوية */
  justify-content: space-between; /* يخلي الصورة+العنوان يسار و 3 نقاط يمين */
    font-weight: 400; /* خفيف */

}

/* الإحصائيات */
.text-line:last-child {
  flex-basis: 100%;                 /* ينزل لسطر جديد */
  margin-left: calc(40px + 12px);    /* بداية من نهاية الصورة */
  display: flex;
  gap: 4px;
  font-size: clamp(12px, 1.8vw, 14px);
  margin-top: -20px;                  /* ينزل شوية لتحت */
  color: #898989;

}

.photo {
  width: 40px !important;   /* لا يجبرها على التكبير */
  height: 40px !important;
  object-fit: cover;
  border-radius: 50%;
    border: 2.3px solid transparent; /* مبدئياً بلا إطار */

}
.photo.active {
  border-color: #f80032 ; /* يظهر الإطار الأحمر بعد الضغط */
}
/* 3 نقاط */
.text-line:first-child img[alt="3point"] {
  width: 20px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0; /* ما تتصغرش */
  margin-left: auto; /* يزقها لليمين */
}

/* ---------------------------- */
.bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 6px;
  border-top: 1px solid #ddd;
  flex-wrap: wrap;
}

/* نجعل كل الصور الصغيرة داخل .info-item و .text-line تاخذ نفس الحجم */
.info-item img,
.text-line img {
  width: clamp(12px, 2.4vw, 16px);
  height: clamp(12px, 2.4vw, 16px);
  transform: translateY(2px) ;
}

/* خلفية داكنة تغطي الصفحة */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* الصندوق الأبيض */
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  text-align: center;
  
}

/* العنوان */
.modal h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #000000;
  
}

/* الأزرار */
.modal button {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #5d5b5b;
  cursor: pointer;
  font-size: 14px;
  color: #ffff !important;
}

.modal button:hover {
  background: #7f7b7b;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  
}



/* ------------------------------------------- */
/* ❤️ قلب متحرك */
.heart-anim {
  position: absolute;
  top: 50%;
  left: 50%;
  color: red;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  animation: pop 0.6s ease forwards;
}

@keyframes pop {
  0%   { transform: translate(-50%, -50%) scale(2); opacity: 0; }
  50%  { transform: translate(-50%, -50%) scale(3.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* --------------------------------------------------------------- */

.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: clamp(10px, 5vw, 20px); /* 🔥 padding متغير حسب حجم الشاشة */

}

.loading-dots span {
  width: clamp(8px, 3vw, 14px);   /* الحجم يتغير مع الشاشة */
  height: clamp(8px, 3vw, 14px);
  background: white;
  border-radius: 50%;
  display: inline-block;
  animation: bounce 1.2s infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.0);
    opacity: 1;
  }
}
.no-results {
  text-align: center;
  color: #ccc;
  font-family: 'Poppins', sans-serif;
  margin: 50px 0;
  animation: fadeIn 0.6s ease;
}

.no-results .circle {
  width: 80px;
  height: 80px;
  border: 3px dashed #555;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #999;
  animation: spin 3s linear infinite;
}

.no-results .text {
  font-size: 18px;
  font-weight: 400;
  color: #aaa;
  letter-spacing: 0.5px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

