:root{
  --primary: #3F0067;       /* اللون الأساسي الجديد */
  --primary-700: #320055;   /* أغمق قليلًا للاستخدامات الثانوية */
  --primary-900: #23003D;   /* أغمق أكثر للقوائم/الخلفيات */
  --text-on-primary: #ffffff;
  --text-base: #ffffff;
  --sticker-bg: #ffffff;
  --sticker-text: #1b1b1b;
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  /* ارتفاع النافبار لاستخدامه في الحسابات */
  --navbar-height: 56px; /* لا تنسخ سطر //، هو توضيح فقط في الرد */
  /* تحكم موحّد بالخطوط والأيقونات */
  --font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  --base-font-size: 14px;
  --btn-font-size: 0.95rem;
  --icon-size: 16px;
  --sticker-size: 36px;
  --sticker-inner: 22px;
  --navbar-height: 56px;
  --navbar-height: 56px;
}
/* body */
body{
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  color: var(--text-base);
  background: #000;
  overflow: hidden; /* منع التمرير */
  font-size: 14px; /* تصغير النص العام */
  overflow-x: hidden;
  overflow-y: auto; /* كان overflow: hidden; لمنع اختفاء النصوص على الشاشات الصغيرة */
}

.bg-video{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* جودة ملء الشاشة */
  z-index: -2;
  filter: saturate(1.05) contrast(1.05);
}

.scrim{
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,.45) 70%, rgba(0,0,0,.65) 100%);
  z-index: -1;
}

/* Navbar */
.navbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: var(--shadow);
  z-index: 10;
}
.nav-inner{
  max-width: 1200px;
  margin: 0 auto;
  height: var(--navbar-height); /* كان 56px */
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: ltr;              /* يبقي الزر في نفس الجهة بغض النظر عن لغة الصفحة */
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.logo{
  width: 32px; height: 32px; flex: none;
}
.brand-text{ font-weight: 700; }

/* زر اللغة */
.lang{
  position: relative;
}

/* زر اللغة بشكل بسيط مع سهم احترافي */
.lang-btn{
  background: transparent;
  border: none;
  border-radius: 0;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 6px;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}
.lang-btn::after{
  content: ""; /* إزالة الرمز النصي لمنع السهم الثاني */
  width: 0; height: 0;
  margin-inline-start: 8px; /* إبعاد السهم قليلاً عن النص */
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255,255,255,.95); /* سهم للأسفل بمثلث */
  transform: translateY(-1px);
  transition: transform .15s ease;
}
/* تدوير السهم عند الفتح */
.lang-btn[aria-expanded="true"]::after{
  transform: translateY(0) rotate(180deg);
}

.lang-btn:hover{ opacity: .9; }
.lang-btn:active{ opacity: .8; }

/* القائمة المنسدلة */
.lang-menu{
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;     /* تعمل RTL/LTR */
  min-width: 160px;
  padding: 6px;
  background: var(--primary-900);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  z-index: 100;
}
.lang-menu[hidden]{ display: none; }

.lang-menu > button{
  width: 100%;
  background: transparent;
  color: #fff;
  border: none;
  text-align: start;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.lang-menu > button:hover{
  background: rgba(255,255,255,.08);
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.logo{
  width: 32px; height: 32px; flex: none;
}
.brand-text{ font-weight: 700; }

/* زر اللغة */
.lang-btn{
    /* إزالة الإطار والحواف والخلفية */
    background: transparent;
    border: none;
    border-radius: 0;

    /* تنسيق نصّي بسيط */
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;

    /* محاذاة وارتفاع لمساحة نقر جيدة */
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 6px; /* هامش بسيط فقط */
    cursor: pointer;

    /* إلغاء أي تأثيرات تحريك غير لازمة */
    transition: color .2s ease, opacity .2s ease;
}
.lang-btn::after{
 
    display: inline-block;
    font-size: 0.8em;
    opacity: 0.95;
    margin-inline-start: 6px;  /* يعمل RTL/LTR */
    transform: translateY(-1px); /* يرفع السهم قليلًا مثل الصورة */
}
.lang-btn:hover{
    background: transparent;
    opacity: .9;
}
.lang-btn:active{
    transform: none;
    opacity: .8;
}
.lang-btn:hover{ background: rgba(255,255,255,.1); }
.lang-btn:active{ transform: scale(.98); }

/* المحتوى وأزرار الأسفل - تصفيف صحيح بلا تعليقات JS */
/* المحتوى وأزرار الأسفل */
.content{
  position: relative;
  height: calc(100dvh - var(--navbar-height));     /* يملأ الشاشة مطروحاً منها النافبار */
  min-height: calc(100dvh - var(--navbar-height));
  display: grid;
  place-items: end center;                          /* محاذاة العناصر لأسفل وبالمنتصف */
  padding: 8px 16px 12px;                           /* مسافة بسيطة كي لا تلتصق بالحافة */
}

/* بقية الأسفل */
.bottom-cta{
  width: 100%;
  max-width: 520px;
  display: grid;
  gap: 10px;        /* كان 14px */
  text-align: center;
  margin-bottom: 0; /* تأكيد عدم وجود فراغ سفلي */
}

.buttons{
  display: grid;
  gap: 12px;
}

/* أزرار أساسية */
.btn{
  --btn-bg: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 80%;        /* عرض أصغر ليعطي مساحة حوله */
  max-width: 320px;
  min-height: 40px;  /* أقل ارتفاع مع الحفاظ على قابلية النقر */
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--btn-bg);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: var(--shadow);
  transition: transform .06s ease, filter .2s ease, background .2s ease;
  will-change: transform, filter;
}
.btn svg{ width: 20px; height: 20px; /* كان 20px */ }
.btn:hover{ filter: brightness(1.07); }
.btn:active{ transform: translateY(1px) scale(.99); }

.btn-primary{ --btn-bg: var(--primary); }
.btn-secondary{ --btn-bg: var(--primary-700); }

/* الملصقات (موجود مسبقاً) */
.sticker{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--sticker-bg);
  color: var(--sticker-text);
  text-decoration: none;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: transform .06s, box-shadow .2s;
}
.sticker:hover{ box-shadow: 0 10px 28px rgba(0,0,0,.3); }
.sticker:active{ transform: translateY(1px) scale(.99); }
.sticker-icon{
  width: 24px; height: 24px; display: grid; place-items: center;
  color: #fff; background: var(--primary); border-radius: 999px;
}
.sticker-icon svg{ width: 14px; height: 14px; }

/* === تصغير الأزرار أكثر (Overrides) === */
.btn{
  width: 72%;        /* كان 80% */
  max-width: 280px;  /* كان 320px */
  min-height: 34px;  /* كان 40px */
  padding: 7px 12px; /* كان 9px 14px */
  font-size: .90rem; /* تصغير بسيط للخط */
}
.btn svg{
  width: 18px;       /* كان 20px */
  height: 18px;
}

/* شاشات صغيرة جدًا */
@media (max-width: 380px){
  .btn{
    width: 82%;        /* تقليل العرض قليلًا على الهواتف الصغيرة */
    min-height: 32px;  /* أقل ارتفاع ممكن مع بقاءه قابل للنقر */
    padding: 6px 10px;
    font-size: .875rem;
  }
  .btn svg{ width: 16px; height: 16px; }
}
.sticker.icon-only{
  width: 36px;
  height: 36px;
}
/* === Overrides: إزالة الإطار الأبيض عن أيقونات إنستا والموقع مع الإبقاء على البنفسجي === */
.sticker.icon-only{
  background: transparent !important;  /* إزالة خلفية الأبيض */
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.sticker.icon-only .sticker-icon{
  background: var(--primary) !important;  /* البنفسجي يبقى */
  border-radius: 999px !important;        /* دائرة كاملة */
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* تأكيد عدم وجود خلفية أخرى على الـ SVG */
.sticker.icon-only .sticker-icon svg{
  background: transparent !important;
}
.sticker.icon-only .sticker-icon{
  width: 22px;
  height: 22px;
}
/* تحسين في الأجهزة القصيرة جدًا حتى تبقى كل العناصر ظاهرة بدون سكرول */
@media (max-height: 640px){
  .bottom-cta{ gap: 8px; }
  .btn{ min-height: 36px; padding: 7px 12px; font-size: .9rem; }
  .footer{ font-size: .85rem; }
}
/* نهاية الملف: تمت إزالة الأسطر الشاردة التي كانت خارج أي محدد */
.buttons{
  justify-items: center; /* تصغير العرض بمحاذاة العناصر للوسط */
}

/* === Overrides: تقليل مسافة الأيقونة والنص + إنزال العناصر للأسفل === */

/* تقليل المسافة بين الأيقونة والنص داخل الأزرار */
.btn{
  gap: 6px;
}

/* إنزال مجموعة العناصر السفلية قليلًا */
.bottom-cta{
  transform: translateY(8px);
}

/* تقليل الحافة السفلية للمحتوى ليقترب أكثر من أسفل الشاشة */
.content{
  padding: 8px 16px 6px; /* كان 12px في الأسفل */
}

/* لو أردت تقليل المسافة بجانب سهم زر اللغة (إن وُجد) */
.lang-btn::after{
  margin-inline-start: 4px;
}
.lang-btn:hover{
  background: transparent;
  opacity: .9;
}
.lang-btn:active{
  transform: none;
  opacity: .8;
}
.lang-btn:hover{ background: rgba(255,255,255,.1); }
.lang-btn:active{ transform: scale(.98); }

/* المحتوى وأزرار الأسفل - تصفيف صحيح بلا تعليقات JS */
/* المحتوى وأزرار الأسفل */
.content{
  position: relative;
  height: calc(100dvh - var(--navbar-height));     /* يملأ الشاشة مطروحاً منها النافبار */
  min-height: calc(100dvh - var(--navbar-height));
  display: grid;
  place-items: end center;                          /* محاذاة العناصر لأسفل وبالمنتصف */
  padding: 8px 16px 12px;                           /* مسافة بسيطة كي لا تلتصق بالحافة */
}

/* بقية الأسفل */
.bottom-cta{
  width: 100%;
  max-width: 520px;
  display: grid;
  gap: 10px;        /* كان 14px */
  text-align: center;
  margin-bottom: 0; /* تأكيد عدم وجود فراغ سفلي */
}

.buttons{
  display: grid;
  gap: 12px;
}

/* أزرار أساسية */
.btn{
  --btn-bg: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 80%;        /* عرض أصغر ليعطي مساحة حوله */
  max-width: 320px;
  min-height: 40px;  /* أقل ارتفاع مع الحفاظ على قابلية النقر */
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--btn-bg);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: var(--shadow);
  transition: transform .06s ease, filter .2s ease, background .2s ease;
  will-change: transform, filter;
}
.btn svg{ width: 20px; height: 20px; /* كان 20px */ }
.btn:hover{ filter: brightness(1.07); }
.btn:active{ transform: translateY(1px) scale(.99); }

.btn-primary{ --btn-bg: var(--primary); }
.btn-secondary{ --btn-bg: var(--primary-700); }

/* الملصقات (موجود مسبقاً) */
.sticker{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--sticker-bg);
  color: var(--sticker-text);
  text-decoration: none;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: transform .06s, box-shadow .2s;
}
.sticker:hover{ box-shadow: 0 10px 28px rgba(0,0,0,.3); }
.sticker:active{ transform: translateY(1px) scale(.99); }
.sticker-icon{
  width: 24px; height: 24px; display: grid; place-items: center;
  color: #fff; background: var(--primary); border-radius: 999px;
}
.sticker-icon svg{ width: 14px; height: 14px; }

/* === تصغير الأزرار أكثر (Overrides) === */
.btn{
  width: 72%;        /* كان 80% */
  max-width: 280px;  /* كان 320px */
  min-height: 34px;  /* كان 40px */
  padding: 7px 12px; /* كان 9px 14px */
  font-size: .90rem; /* تصغير بسيط للخط */
}
.btn svg{
  width: 18px;       /* كان 20px */
  height: 18px;
}

/* شاشات صغيرة جدًا */
@media (max-width: 380px){
  .btn{
    width: 82%;        /* تقليل العرض قليلًا على الهواتف الصغيرة */
    min-height: 32px;  /* أقل ارتفاع ممكن مع بقاءه قابل للنقر */
    padding: 6px 10px;
    font-size: .875rem;
  }
  .btn svg{ width: 16px; height: 16px; }
}
.sticker.icon-only{
  width: 36px;
  height: 36px;
}
/* === Overrides: تكبير الأيقونات وإنزالها قليلًا === */
.bottom-cta .stickers{
  transform: translateY(12px); /* كان ~4px */
}

.sticker.icon-only{
  width: 44px !important;   /* تكبير خفيف */
  height: 44px !important;
}

.sticker.icon-only .sticker-icon{
  width: 28px !important;   /* تكبير الدائرة الداخلية */
  height: 28px !important;
}

.sticker.icon-only .sticker-icon svg{
  width: 18px !important;   /* تكبير الأيقونة نفسها */
  height: 18px !important;
}

/* شاشات صغيرة جدًا */
@media (max-width: 380px){
  .sticker.icon-only{ width: 40px !important; height: 40px !important; }
  .sticker.icon-only .sticker-icon{ width: 26px !important; height: 26px !important; }
  .sticker.icon-only .sticker-icon svg{ width: 16px !important; height: 16px !important; }
}
.sticker.icon-only .sticker-icon{
  width: 22px;
  height: 22px;
}
/* تحسين في الأجهزة القصيرة جدًا حتى تبقى كل العناصر ظاهرة بدون سكرول */
@media (max-height: 640px){
  .bottom-cta{ gap: 8px; }
  .btn{ min-height: 36px; padding: 7px 12px; font-size: .9rem; }
  .footer{ font-size: .85rem; }
}
/* نهاية الملف أو قبل أي media query أخيرة */
.btn, .sticker, .lang-btn{
  position: relative;
  overflow: hidden; /* قصّ الموجة داخل حدود العنصر */
}

.btn::before,
.sticker::before,
.lang-btn::before{
  content: "";
  position: absolute;
  top: calc(var(--ripple-y, 50%) - 6px);
  left: calc(var(--ripple-x, 50%) - 6px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
}

.btn.clicked::before,
.sticker.clicked::before,
.lang-btn.clicked::before{
  animation: ripple .6s ease-out forwards;
}

@keyframes ripple{
  0%   { opacity: .35; transform: scale(1); }
  100% { opacity: 0;   transform: scale(18); }
}
.sticker-icon{
  width: 24px; height: 24px; display: grid; place-items: center;
  color: #fff; background: var(--primary); border-radius: 999px;
}
.sticker-icon svg{ width: 14px; height: 14px; }

/* الفوتر الصغير */
.footer{
  margin-top: 8px;
  position: relative;
}
.footer::before{
  content: "";
  display: block;
  width: 140px;
  height: 2px;
  margin: 10px auto 12px;
  background: linear-gradient(90deg, rgba(192,192,192,0) 0%, rgba(192,192,192,.9) 50%, rgba(192,192,192,0) 100%);
  border-radius: 2px;
}
.footer small,
.footer .madeby{ opacity: .9; }  /* تطبيق نفس الشفافية على الرابط */
.footer .madeby{
  color: inherit;             /* نفس لون النص */
  text-decoration: none;      /* بدون خط تحته ليتماشى مع التصميم */
}
.footer .madeby:hover{ opacity: 1; }  /* تلميح بسيط عند التحويم */
.footer small{ opacity: .9; }

/* استجابة */
@media (min-width: 640px){
  .buttons{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px){
  .btn{ min-height: 44px; padding: 10px 14px; }
}

/* إمكانية الوصول */
@media (prefers-reduced-motion: reduce){
  .btn, .sticker, .lang-btn{ transition: none; }
}

/* جعل الملصق أيقونة فقط بشكل دائري (موجود سابقًا) */
.sticker.icon-only{
  width: 40px;
  height: 40px;
  padding: 0;               /* لا نحتاج حشو لأن الحجم ثابت */
  justify-content: center;  /* وسط الأيقونة */
}

/* حجم الأيقونة داخل الملصق */
.sticker.icon-only .sticker-icon{
  width: 24px;
  height: 24px;
}
.sticker.icon-only .sticker-icon svg{
  width: 14px;
  height: 14px;
}

/* تصغير إضافي للشاشات الصغيرة جداً (موجود سابقًا) */
@media (max-width: 380px){
  .btn{ width: 88%; } /* عرض أكبر قليلاً على الهواتف الصغيرة */
  .btn{ 
    min-height: 36px;     /* كان 44px */
    padding: 8px 12px; 
    font-size: .875rem; 
  }
}
.sticker.icon-only{
  width: 36px;
  height: 36px;
}
.sticker.icon-only .sticker-icon{
  width: 22px;
  height: 22px;
}
/* تحسين في الأجهزة القصيرة جدًا حتى تبقى كل العناصر ظاهرة بدون سكرول */
@media (max-height: 640px){
  .bottom-cta{ gap: 8px; }
  .btn{ min-height: 36px; padding: 7px 12px; font-size: .9rem; }
  .footer{ font-size: .85rem; }
}