/* ============================================================
   نظام التصميم — تحدي الذكاء
   البنفسجي لون الفعل، لا لون كل شيء.
   ============================================================ */
:root{
  --primary:#5E17EB;
  --primary-dark:#4310AE;
  --primary-light:#EDE5FE;
  --ink:#14082B;
  --muted:#5F5878;
  --bg:#F8F6FD;
  --surface:#FFFFFF;
  --border:#E4DEF2;
  --success:#0FA97A;
  --warning:#E09612;
  --danger:#D93A46;
  --accent:#00C4A7;

  --r-sm:8px; --r-md:14px; --r-lg:20px; --r-xl:28px;
  --shadow-sm:0 1px 2px rgba(20,8,43,.06), 0 1px 1px rgba(20,8,43,.04);
  --shadow-md:0 4px 14px rgba(20,8,43,.07);
  --shadow-lg:0 12px 34px rgba(20,8,43,.10);

  --t:180ms cubic-bezier(.3,.7,.4,1);
  --t-slow:280ms cubic-bezier(.3,.7,.4,1);

  --font-head:"Tajawal",system-ui,sans-serif;
  --font-body:"Tajawal",system-ui,sans-serif;
  --font-lat:"Poppins",system-ui,sans-serif;

  --wrap:1120px;
}

*,*::before,*::after{box-sizing:border-box}
html{
  -webkit-text-size-adjust:100%;
  overflow-x:hidden;
  max-width:100%;
  width:100%;
}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:17px;
  line-height:1.75;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  max-width:100%;
  width:100%;
}
h1,h2,h3,h4{font-family:var(--font-head);font-weight:800;line-height:1.35;margin:0 0 .5em}
p{margin:0 0 1em}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto;display:block}
[hidden]{display:none !important}
button{font:inherit;color:inherit}
ul{margin:0;padding:0;list-style:none}
:focus-visible{outline:3px solid var(--primary);outline-offset:3px;border-radius:6px}
.dark :focus-visible,.on-dark :focus-visible{outline-color:var(--accent)}

.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
.lat{font-family:var(--font-lat);font-weight:700;direction:ltr;unicode-bidi:isolate}

.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:20px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;inset-block-start:-60px;inset-inline-start:16px;background:var(--ink);color:#fff;padding:10px 18px;border-radius:0 0 var(--r-sm) var(--r-sm);z-index:99;transition:inset-block-start var(--t)}
.skip:focus{inset-block-start:0}

/* ---------- الأزرار ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:52px;padding:0 26px;border-radius:var(--r-md);
  border:1px solid transparent;background:transparent;
  font-family:var(--font-head);font-weight:800;font-size:17px;
  cursor:pointer;text-decoration:none;
  transition:background-color var(--t),border-color var(--t),color var(--t),transform var(--t);
}
.btn:hover{text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-outline{border-color:var(--border);background:var(--surface);color:var(--ink)}
.btn-outline:hover{border-color:var(--primary);color:var(--primary)}
.btn[disabled],.btn:disabled{opacity:.4;cursor:not-allowed}
.btn[disabled]:hover,.btn:disabled:hover{transform:none}
.btn-primary[disabled]:hover,.btn-primary:disabled:hover{background:var(--primary)}
.btn-outline[disabled]:hover,.btn-outline:disabled:hover{border-color:var(--border);color:var(--ink)}
.btn-quiet{color:var(--muted);padding-inline:14px}
.btn-quiet:hover{color:var(--ink)}
.btn-lg{min-height:60px;font-size:19px;padding:0 34px}
.btn-block{width:100%}
.btn-arrow{width:1em;height:1em;flex:none}

/* ---------- الرأس ---------- */
.site-header{
  position:sticky;top:0;z-index:40;
  background:rgba(248,246,253,.92);
  border-bottom:1px solid var(--border);
  width:100%;
}
@supports (backdrop-filter:blur(2px)){.site-header{backdrop-filter:saturate(1.2)}}
.header-in{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;min-height:72px;width:100%;box-sizing:border-box;
}
.brand{
  display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;
}
.brand img{
  height:40px;max-width:165px;width:auto;display:block;object-fit:contain;
}
.header-nav{display:none;margin-inline-start:auto;gap:26px}
.header-nav a{color:var(--muted);font-weight:500;font-size:16px}
.header-nav a:hover{color:var(--ink);text-decoration:none}
.header-cta{
  display:flex;align-items:center;gap:8px;flex-shrink:0;
}
@media(min-width:900px){
  .header-nav{display:flex}
  .header-cta{margin-inline-start:0}
}
@media(max-width:600px){
  .header-in{gap:8px;min-height:58px}
  .brand img{height:30px;max-width:130px}
  .header-cta{gap:6px}
  .lang-toggle-btn{min-height:36px;padding:0 8px;font-size:12px;gap:4px}
  .lang-toggle-btn img,.lang-toggle-btn svg{width:16px;height:16px}
  .header-cta .btn{min-height:36px;padding:0 12px;font-size:13.5px;white-space:nowrap}
}
@media(max-width:360px){
  .header-in{gap:6px}
  .brand img{height:26px;max-width:105px}
  .header-cta{gap:4px}
  .lang-toggle-btn{min-height:32px;padding:0 6px;font-size:11px}
  .header-cta .btn{min-height:32px;padding:0 8px;font-size:12px}
}

/* ---------- زخارف الدوائر الإلكترونية ---------- */
.circuit{
  position:absolute;inset:0;width:100%;height:100%;
  pointer-events:none;color:var(--primary);opacity:.14;
}
.grid-dots{
  position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(currentColor .9px,transparent .9px);
  background-size:26px 26px;color:var(--primary);opacity:.10;
}
.divider{display:block;width:100%;height:24px;color:var(--border)}

/* ---------- القسم الافتتاحي ---------- */
.hero{position:relative;overflow:hidden;padding-block:48px 60px;width:100%}
.hero-in{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;width:100%;max-width:820px;margin-inline:auto}
@media(min-width:960px){
  .hero{padding-block:76px 96px}
}
.hero-content{display:flex;flex-direction:column;align-items:center;text-align:center;width:100%}
.hero-sbc-wrap{
  display:flex;justify-content:center;align-items:center;
  margin-bottom:16px;width:100%;
}
.hero-sbc-badge{
  display:inline-flex;align-items:center;justify-content:center;
  gap:8px;
  background:rgba(255,255,255,0.95);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(26,65,134,0.18);
  border-radius:999px;
  padding:6px 14px;
  box-shadow:0 3px 14px rgba(26,65,134,0.06);
  cursor:default;
  user-select:none;
  max-width:min(100%, calc(100vw - 32px));
  box-sizing:border-box;
}
.hero-sbc-emblem{
  width:clamp(18px,4.5vw,22px);
  height:auto;
  aspect-ratio:131/142;
  flex:none;
  display:block;
  object-fit:contain;
}
.hero-sbc-text{
  font-size:clamp(10.5px,2.9vw,13px);
  font-weight:700;
  color:#1a4186;
  line-height:1;
  white-space:nowrap;
  letter-spacing:-.01em;
}
@media(max-width:480px){
  .hero-sbc-wrap{margin-bottom:12px}
  .hero-sbc-badge{padding:5px 11px;gap:6px}
}
.eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--primary-light);color:var(--primary-dark);
  font-weight:600;font-size:14px;line-height:1;
  padding:9px 16px;border-radius:999px;margin-bottom:20px;
  max-width:100%;
}
.eyebrow i{width:7px;height:7px;border-radius:2px;background:var(--primary);flex:none}
h1.hero-title{
  font-size:clamp(28px,6.5vw,56px);line-height:1.24;letter-spacing:-.01em;
  margin-bottom:18px;word-break:break-word;overflow-wrap:break-word;
}
h1.hero-title .hl{color:var(--primary);position:relative}
.hero-sub{
  font-size:clamp(16px,3.6vw,19px);line-height:1.75;color:var(--muted);
  max-width:56ch;margin-inline:auto;margin-bottom:28px;
}
.hero-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;justify-content:center;width:100%}
/* صندوق السعر والخصم في الواجهة الرئيسية */
.hero-pricing-card {
  background: linear-gradient(135deg, rgba(94, 23, 235, 0.05) 0%, rgba(236, 200, 118, 0.08) 100%);
  border: 1.5px solid rgba(94, 23, 235, 0.18);
  border-radius: var(--r-xl);
  padding: 18px 24px;
  margin-bottom: 22px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 10px 30px rgba(94, 23, 235, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  flex-wrap: nowrap;
}
.hero-old-price {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  color: #9CA3AF;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.hero-old-price del {
  color: #9CA3AF;
}
.hero-old-price .sar-symbol {
  height: 0.85em;
  color: #9CA3AF;
  vertical-align: -0.05em;
  margin-inline-start: 2px;
}
.hero-discount-pill {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #fff;
  font-size: clamp(11px, 2.7vw, 12px);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-new-price-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}
.hero-new-price-wrap .sar-symbol {
  height: 0.72em;
  color: var(--primary);
  vertical-align: -0.04em;
  margin-inline: 2px;
}
.hero-price-num {
  font-family: var(--font-head);
  font-size: clamp(34px, 7.5vw, 48px);
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
  text-shadow: 0 2px 10px rgba(94, 23, 235, 0.2);
}
.hero-price-label {
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 800;
  color: var(--ink);
}
.hero-price-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: clamp(10.5px, 2.7vw, 12.5px);
  font-weight: 700;
  color: var(--muted);
  border-top: 1px dashed rgba(94, 23, 235, 0.15);
  padding-top: 10px;
  width: 100%;
  white-space: nowrap;
}
.hero-price-features .dot-sep {
  opacity: 0.45;
  font-weight: 900;
  padding-inline: 2px;
}

/* بطاقة إدخال الاسم والبيانات قبل زر البداية */
.hero-name-card {
  width: 100%;
  max-width: 480px;
  margin-bottom: 18px;
  text-align: start;
}
.hero-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-name-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: clamp(12.5px, 3.3vw, 14.5px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.4;
}
.hero-name-label svg {
  flex-shrink: 0;
  color: var(--primary);
}
.hero-name-label .required-badge {
  color: #EF4444;
  font-weight: 900;
}
.hero-name-input-wrap {
  position: relative;
  width: 100%;
}
.hero-name-input {
  width: 100%;
  height: 52px;
  background: var(--surface);
  border: 2px solid #D6CCEE;
  border-radius: var(--r-md);
  padding: 0 16px;
  font-size: clamp(14px, 3.8vw, 16px);
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
}
.hero-name-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(94, 23, 235, 0.14);
}
.hero-name-input.error {
  border-color: #EF4444 !important;
  background: #FFFBFB;
  animation: nameShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* تنسيقات حقل رقم الجوال مع قائمة مفاتيح دول الخليج */
.hero-phone-wrap {
  display: flex;
  align-items: center;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 2px solid #D6CCEE;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: border-color var(--t), box-shadow var(--t);
  direction: ltr;
}
.hero-phone-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(94, 23, 235, 0.14);
}
.hero-phone-wrap.error {
  border-color: #EF4444 !important;
  background: #FFFBFB;
  animation: nameShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.hero-country-select {
  border: none;
  border-right: 2px solid #D6CCEE;
  background-color: var(--primary-light);
  color: var(--primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  padding: 0 24px 0 10px;
  height: 52px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  user-select: none;
  flex: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235E17EB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  direction: ltr;
}
.hero-country-select:focus {
  background-color: #E5DBFB;
}
.hero-country-select option {
  background: #FFFFFF;
  color: var(--ink);
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 12px;
}
.hero-phone-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 52px;
  direction: ltr;
  text-align: left;
  padding: 0 16px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.hero-name-error {
  display: block;
  color: #DC2626;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
  animation: nameShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes nameShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* زر البداية في الواجهة */
.btn-hero-start {
  padding: 14px 20px;
  font-size: clamp(14px, 3.8vw, 18px);
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(94, 23, 235, 0.35);
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 480px;
}
.btn-hero-start .btn-hero-text {
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-hero-start .sar-symbol {
  height: 0.9em;
  vertical-align: -0.05em;
  margin-inline: 1px;
}
.btn-hero-start .btn-arrow {
  flex-shrink: 0;
  width: 1.1em;
  height: 1.1em;
  transition: transform var(--t);
}
[dir="rtl"] .btn-hero-start:hover .btn-arrow {
  transform: translateX(-4px);
}
[dir="ltr"] .btn-hero-start:hover .btn-arrow {
  transform: translateX(4px);
}

@media(max-width:480px){
  .hero-actions{flex-direction:column;align-items:stretch;gap:10px}
  .hero-actions .btn{width:100%;justify-content:center}
  .hero-pricing-card{padding: 12px 14px; gap: 8px}
  .hero-price-row{gap: 10px}
  .hero-price-features{font-size: clamp(10px, 2.7vw, 11.5px); gap: 4px}
  .btn-hero-start{padding: 13px 14px; font-size: clamp(13px, 3.7vw, 16px)}
}
@media(max-width:360px){
  .hero-price-row{gap: 6px}
  .hero-price-num{font-size: 30px}
  .hero-discount-pill{font-size: 10px; padding: 2px 7px}
  .hero-name-label{font-size: 11.8px}
  .btn-hero-start{padding: 12px 10px; font-size: 12.8px; gap: 4px}
}
/* شرط نظامي: سطر السعر لا يُحذف ولا يُخفى */
.price-note{
  display:flex;align-items:flex-start;gap:10px;
  margin-top:18px;font-size:15px;color:var(--muted);
}
.price-note strong{color:var(--ink);font-weight:600}
.price-note svg{flex:none;margin-top:4px;color:var(--primary)}

/* شبكة وخانات الأشكال البصرية (سؤال المصفوفة) */
.matrix{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;direction:rtl}
.cell{
  aspect-ratio:1;background:var(--bg);border:1px solid var(--border);border-radius:var(--r-sm);
  display:grid;place-items:center;padding:12%;
}
.cell.q{border-style:dashed;border-color:var(--primary);background:var(--primary-light)}
.cell.q span{font-family:var(--font-head);font-size:30px;color:var(--primary);line-height:1}
.fig{width:100%;height:100%;display:block;overflow:visible}
@media(max-width:600px){
  .matrix{gap:6px}
  .cell.q span{font-size:24px}
}

/* ---------- شريط الأرقام ---------- */
.stats{border-block:1px solid var(--border);background:var(--surface);width:100%}
.stats-in{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
.stat{padding:26px 8px;text-align:center;position:relative}
.stat+.stat::before{content:"";position:absolute;inset-block:22%;inset-inline-start:0;width:1px;background:var(--border)}
.stat b{display:block;font-family:var(--font-head);font-size:clamp(24px,5.5vw,38px);line-height:1.2;color:var(--ink);font-variant-numeric:tabular-nums;will-change:contents}
.stat span{display:block;font-size:clamp(12px,2.8vw,14px);color:var(--muted);margin-top:2px}
@media(max-width:480px){
  .stat{padding:18px 4px}
}

/* ---------- الأقسام ---------- */
.section{padding-block:56px;position:relative}
@media(min-width:960px){.section{padding-block:84px}}
.section-head{max-width:56ch;margin-bottom:34px}
.section-head h2{font-size:clamp(25px,4.6vw,30px);margin-bottom:10px}
.section-head p{color:var(--muted);margin:0}
.kicker{font-size:14px;font-weight:600;color:var(--primary);letter-spacing:.02em;margin-bottom:8px}

.cards{display:grid;gap:16px;grid-template-columns:1fr}
@media(min-width:640px){.cards{grid-template-columns:1fr 1fr}}
@media(min-width:1000px){.cards{grid-template-columns:repeat(4,1fr)}}
.card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);
  padding:24px 22px;transition:border-color var(--t),transform var(--t),box-shadow var(--t);
}
.card:hover{border-color:#D6CCEE;box-shadow:var(--shadow-md)}
.card .ic{width:46px;height:46px;color:var(--primary);margin-bottom:16px}
.card h3{font-size:19px;margin-bottom:6px}
.card p{font-size:15px;color:var(--muted);margin:0}

/* ---------- ماذا ستحصل عليه ---------- */
.deliver{display:grid;gap:32px;align-items:center}
@media(min-width:900px){.deliver{grid-template-columns:1fr 1fr;gap:52px}}
.bullets li{display:flex;gap:14px;padding-block:14px;border-bottom:1px solid var(--border)}
.bullets li:last-child{border-bottom:0}
.bullets .n{
  flex:none;width:32px;height:32px;border-radius:var(--r-sm);
  background:var(--primary-light);color:var(--primary-dark);
  display:grid;place-items:center;font-family:var(--font-head);font-size:15px;
}
.bullets h3{font-size:17px;margin:0 0 2px}
.bullets p{margin:0;font-size:15px;color:var(--muted)}

.preview{
  position:relative;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-xl);overflow:hidden;box-shadow:var(--shadow-md);
}
.preview-top{background:var(--ink);color:#fff;padding:26px 24px;text-align:center}
.preview-top .score{font-family:var(--font-head);font-size:64px;line-height:1;color:var(--accent);filter:blur(11px);user-select:none}
.preview-top p{margin:10px 0 0;font-size:14px;color:#B9AFD4}
.preview-body{padding:22px 24px 26px}
.pv-row{margin-bottom:16px}
.pv-row:last-child{margin-bottom:0}
.pv-row .lbl{display:flex;justify-content:space-between;font-size:14px;margin-bottom:7px;color:var(--muted)}
.track{height:9px;background:var(--bg);border:1px solid var(--border);border-radius:999px;overflow:hidden}
.track i{display:block;height:100%;background:var(--primary);border-radius:999px}
.preview-fade{
  position:absolute;inset-inline:0;inset-block-end:0;height:46%;
  background:linear-gradient(to top,var(--surface) 22%,rgba(255,255,255,0));
  display:flex;align-items:flex-end;justify-content:center;padding-bottom:20px;
}
.preview-fade span{font-size:14px;color:var(--muted);display:inline-flex;align-items:center;gap:8px}
.pv-blur{filter:blur(4px);user-select:none}

/* ---------- الأسئلة الشائعة ---------- */
#faq .section-head{text-align:center;margin-inline:auto}
.faq{max-width:820px;margin-inline:auto}
.faq details{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);margin-bottom:10px;overflow:hidden}
.faq details[open]{border-color:#D6CCEE}
.faq summary{
  list-style:none;cursor:pointer;padding:18px 20px;font-weight:600;font-size:17px;
  display:flex;align-items:center;gap:14px;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary .pm{
  flex:none;margin-inline-start:auto;width:26px;height:26px;border-radius:7px;
  background:var(--primary-light);color:var(--primary-dark);
  display:grid;place-items:center;font-size:19px;line-height:1;transition:transform var(--t)
}
.faq details[open] summary .pm{transform:rotate(45deg)}
.faq .ans{padding:0 20px 20px;color:var(--muted);font-size:16px}
.faq .ans p:last-child{margin:0}

/* ---------- دعوة ختامية ---------- */
.cta{position:relative;overflow:hidden;background:var(--ink);color:#fff;border-radius:var(--r-xl);padding:44px 24px;text-align:center}
.cta h2{color:#fff;font-size:clamp(24px,5vw,32px);margin-bottom:12px}
.cta p{color:#B9AFD4;max-width:46ch;margin:0 auto 24px}
.cta .btn-primary{background:var(--accent);color:#04231E}
.cta .btn-primary:hover{background:#00A88F}
.cta .fine{margin:18px 0 0;font-size:14px;color:#B9AFD4}
.cta .circuit{opacity:.22;color:#fff}

/* ---------- التذييل ---------- */
.site-footer{background:var(--ink);color:#B9AFD4;padding-block:44px 30px;margin-top:56px}
.footer-in{display:grid;gap:28px}
@media(min-width:800px){.footer-in{grid-template-columns:1.4fr 1fr 1fr}}
.footer-brand{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.footer-brand strong{font-family:var(--font-head);font-size:19px;color:#fff}
.site-footer p{font-size:14px;max-width:40ch}
.site-footer h4{color:#fff;font-size:15px;margin-bottom:12px}
.site-footer li{margin-bottom:9px}
.site-footer a,.linkish{color:#B9AFD4;font-size:15px;background:none;border:0;padding:0;cursor:pointer;font-family:inherit;text-align:start}
.site-footer a:hover,.linkish:hover{color:#fff;text-decoration:underline}

/* حسابات التواصل الاجتماعي في الفوتر مع أيقونات بيضاء */
.footer-social-wrap {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-social-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  opacity: 0.88;
  letter-spacing: 0.02em;
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF !important;
  text-decoration: none !important;
  transition: all 0.22s ease-in-out;
  flex-shrink: 0;
}
.footer-social-link svg {
  color: #FFFFFF !important;
  fill: #FFFFFF !important;
  display: block;
}
.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #FFFFFF;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.22);
}
.footer-bottom{border-top:1px solid rgba(255,255,255,.10);margin-top:30px;padding-top:20px;font-size:13px;color:#8C82A8}
.footer-bottom p{margin:0;max-width:none}

/* ============================================================
   شاشة الاختبار
   ============================================================ */
.screen[hidden]{display:none}
.test-shell{min-height:100svh;display:flex;flex-direction:column;background:var(--bg)}
.test-bar{position:sticky;top:0;z-index:30;background:var(--surface);border-bottom:1px solid var(--border)}
.test-bar-in{display:flex;align-items:center;gap:14px;min-height:64px}
.qcount{font-weight:600;font-size:15px}
.qcount b{font-family:var(--font-head)}
.timer{
  margin-inline-start:auto;display:inline-flex;align-items:center;gap:8px;
  font-family:var(--font-head);font-size:19px;min-width:104px;justify-content:flex-end;
  color:var(--ink);
}
.timer svg{width:19px;height:19px;color:var(--muted);flex:none}
.timer.warn{color:var(--warning)}
.timer.warn svg{color:var(--warning)}
.segbar{display:flex;gap:3px;padding-bottom:10px}
.segbar i{flex:1;height:6px;border-radius:3px;background:var(--border);transition:background-color var(--t)}
.segbar i.done{background:var(--primary)}
.segbar i.now{background:var(--warning)}

.test-body{flex:1;padding-block:28px 40px}
.qcard{
  max-width:760px;margin-inline:auto;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--r-xl);
  padding:26px 22px;box-shadow:var(--shadow-md);
}
@media(min-width:700px){.qcard{padding:36px 40px}}
.qcat{font-size:13px;font-weight:600;color:var(--primary-dark);background:var(--primary-light);display:inline-block;padding:5px 12px;border-radius:999px;margin-bottom:16px}
.qtext{font-family:var(--font-head);font-size:clamp(20px,4.4vw,25px);line-height:1.55;margin:0 0 22px}
.qfig{
  background:var(--bg);border:1px solid var(--border);border-radius:var(--r-md);
  padding:20px;margin-bottom:24px;
}
.seq{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;direction:rtl;max-width:420px;margin-inline:auto}
.qfig .matrix{max-width:330px;margin-inline:auto}
.opts{display:grid;gap:10px}
.opt{
  display:flex;align-items:center;gap:14px;width:100%;min-height:60px;
  padding:12px 14px;background:var(--surface);border:1.5px solid var(--border);
  border-radius:var(--r-md);cursor:pointer;text-align:start;
  transition:border-color var(--t),background-color var(--t),box-shadow var(--t);
}
.opt:hover{border-color:#C9BCE9}
.opt .k{
  flex:none;width:38px;height:38px;border-radius:10px;background:var(--bg);
  border:1px solid var(--border);display:grid;place-items:center;
  font-family:var(--font-head);font-size:16px;color:var(--muted);
  transition:background-color var(--t),color var(--t),border-color var(--t);
}
.opt .v{font-size:17px;line-height:1.6}
.opt .v .fig{width:76px;height:76px}
.opt[aria-checked="true"]{border-color:var(--primary);background:var(--primary-light)}
.opt[aria-checked="true"] .k{background:var(--primary);border-color:var(--primary);color:#fff}
.opts.visual{grid-template-columns:1fr 1fr}
@media(min-width:560px){.opts.visual{grid-template-columns:repeat(4,1fr)}.opts.visual .opt{flex-direction:column;gap:8px;padding:14px 10px}}

.test-nav{display:flex;gap:12px;max-width:760px;margin:22px auto 0}
.test-nav .btn{flex:1}
.test-hint{max-width:760px;margin:14px auto 0;text-align:center;font-size:14px;color:var(--muted)}

/* ============================================================
   شاشة قفل النتيجة
   ============================================================ */
.lock-wrap{max-width:560px;margin-inline:auto;padding-block:40px 60px}
.lock-head{text-align:center;margin-bottom:26px}
.lock-head h2{font-size:clamp(26px,5.6vw,34px);margin-bottom:8px}
.lock-head p{color:var(--muted);margin:0}
.lock-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-xl);overflow:hidden;box-shadow:var(--shadow-lg)}
.lock-score{position:relative;background:var(--ink);padding:38px 20px;text-align:center;overflow:hidden}
.lock-score .circuit{opacity:.2;color:#fff}
.lock-score .val{position:relative;font-family:var(--font-head);font-size:76px;line-height:1;color:var(--accent);filter:blur(17px);user-select:none}
.lock-score .lockic{
  position:absolute;inset:0;display:grid;place-items:center;
}
.lock-score .lockic svg{width:46px;height:46px;color:#fff;opacity:.95}
.lock-score .cap{position:relative;margin:14px 0 0;font-size:14px;color:#B9AFD4}
.lock-body{padding:26px 22px}
@media(min-width:600px){.lock-body{padding:30px 32px}}
@media(max-width:480px){.lock-body{padding:20px 14px}}
.price-row{display:flex;align-items:baseline;justify-content:center;gap:8px;margin-bottom:6px}
.price-row .v{font-family:var(--font-head);font-size:42px;line-height:1;color:var(--ink)}
.price-row .c{font-size:18px;color:var(--muted);font-weight:600}
.price-cap{text-align:center;font-size:14px;color:var(--muted);margin:0 0 22px}
.incl li{display:flex;gap:11px;align-items:flex-start;margin-bottom:12px;font-size:16px}
.incl svg{flex:none;width:21px;height:21px;color:var(--success);margin-top:4px}
.field{margin:22px 0 6px}
.field label{display:block;font-size:15px;font-weight:600;margin-bottom:6px}
.field .opt-tag{font-weight:400;color:var(--muted);font-size:14px}
.field input{
  width:100%;min-height:52px;padding:0 16px;border-radius:var(--r-md);
  border:1.5px solid var(--border);background:var(--surface);
  font:inherit;font-size:16px;color:var(--ink);
  transition:border-color var(--t);
}
.field input:focus{border-color:var(--primary)}
.field .help{font-size:13px;color:var(--muted);margin:7px 0 0}
.field .err{font-size:13px;color:var(--danger);margin:7px 0 0;display:none}
.field.invalid input{border-color:var(--danger)}
.field.invalid .err{display:block}
.pay-methods{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:16px}
.pm-badge{
  height:30px;min-width:52px;padding:0 10px;border:1px solid var(--border);border-radius:6px;
  background:var(--surface);display:inline-flex;align-items:center;justify-content:center;gap:4px;
  font-size:12px;font-weight:700;color:var(--muted);
}
.pm-badge.mada{font-family:var(--font-head);font-size:14px;color:var(--ink)}
.pm-badge .visa{font-family:var(--font-lat);font-style:italic;font-size:15px;letter-spacing:.5px;color:#1A1F71}
.pm-badge .ap{font-family:var(--font-lat);font-size:13px;color:var(--ink)}
.pm-badge.stcpay{font-family:var(--font-lat);font-size:11px;font-weight:700;letter-spacing:.02em;color:#4B2E83}
.mc{display:inline-flex}
.mc i{width:15px;height:15px;border-radius:50%;display:block}
.mc i:first-child{background:#EB001B}
.mc i:last-child{background:#F79E1B;margin-inline-start:-6px}
.secure{display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px;color:var(--muted);margin-top:14px}
.secure svg{width:15px;height:15px;flex:none}
.lock-back{display:block;text-align:center;margin-top:20px}

/* ============================================================
   شاشة التقرير
   ============================================================ */
.rep-head{position:relative;background:var(--ink);color:#fff;overflow:hidden;padding-block:46px 52px;text-align:center}
.rep-head .circuit{opacity:.2;color:#fff}
.rep-head .rel{position:relative}
.rep-head .lbl{font-size:15px;color:#B9AFD4;margin:0 0 6px}
.rep-score{font-family:var(--font-head);font-size:clamp(76px,20vw,132px);line-height:1;color:var(--accent);letter-spacing:-.02em}
.rep-band{
  display:inline-block;margin-top:12px;padding:8px 18px;border-radius:999px;
  background:rgba(0,196,167,.14);border:1px solid rgba(0,196,167,.4);
  color:var(--accent);font-weight:600;font-size:15px;
}
.rep-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 28px;margin-top:22px;color:#B9AFD4;font-size:15px}
.rep-meta b{color:#fff;font-family:var(--font-head);font-weight:800}

/* ---------- شريط مشاركة النتيجة فوق المحور الأول ---------- */
.rep-share-bar{
  position:relative;
  z-index:10;
  margin-top:-32px;
  padding-bottom:12px;
}
.rep-share-card{
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:var(--r-xl);
  padding:22px 24px;
  box-shadow:var(--shadow-lg);
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:center;
  text-align:center;
  max-width:820px;
  margin-inline:auto;
}
@media(min-width:700px){
  .rep-share-card{
    flex-direction:row;
    text-align:start;
    justify-content:space-between;
    padding:22px 30px;
  }
}
.rep-share-info h3{
  font-size:19px;
  margin:0 0 5px;
  color:var(--ink);
}
.rep-share-info p{
  margin:0;
  font-size:14.5px;
  color:var(--muted);
  max-width:44ch;
}
.rep-share-card .btn{
  flex:none;
}
.rep-share-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
  flex:none;
}
@media(max-width:699px){
  .rep-share-actions{
    width:100%;
    flex-direction:column;
  }
  .rep-share-actions .btn{
    width:100%;
  }
}

.abil{display:grid;gap:18px;max-width:820px}
.abil-row{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);padding:18px 20px}
.abil-row .top{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.abil-row .top svg{width:26px;height:26px;color:var(--primary);flex:none}
.abil-row .top h3{margin:0;font-size:17px}
.abil-row .top .pct{margin-inline-start:auto;font-family:var(--font-head);font-size:17px}
.abil-row .track i{width:0;transition:width 900ms cubic-bezier(.25,.8,.35,1)}
.abil-row .note{margin:9px 0 0;font-size:14px;color:var(--muted)}

.review{display:grid;gap:14px;max-width:900px}
.rev{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-md);overflow:hidden}
.rev-head{display:flex;gap:12px;align-items:flex-start;padding:18px 20px;width:100%;background:none;border:0;cursor:pointer;text-align:start}
.rev-head .st{flex:none;width:28px;height:28px;border-radius:9px;display:grid;place-items:center;margin-top:2px}
.rev-head .st svg{width:16px;height:16px;color:#fff}
.rev.ok .st{background:var(--success)}
.rev.no .st{background:var(--danger)}
.rev-head .qn{font-size:13px;color:var(--muted);display:block;margin-bottom:2px}
.rev-head .qt{font-weight:600;font-size:16px;line-height:1.6}
.rev-head .chev{margin-inline-start:auto;flex:none;width:20px;height:20px;color:var(--muted);transition:transform var(--t)}
.rev.open .chev{transform:rotate(180deg)}
.rev-body{display:none;padding:0 20px 20px;border-top:1px solid var(--border);margin-top:-1px}
.rev.open .rev-body{display:block}
.rev-body .qfig{margin-top:18px}
.ans-line{display:flex;gap:10px;align-items:flex-start;font-size:15px;padding-block:7px}
.ans-line .tag{flex:none;font-size:13px;color:var(--muted);min-width:92px;padding-top:2px}
.ans-line .val{font-weight:600}
.ans-line .val .fig{width:52px;height:52px;display:inline-block;vertical-align:middle}
.val.good{color:var(--success)}
.val.bad{color:var(--danger)}
.val.none{color:var(--muted);font-weight:400}
.explain{margin-top:12px;background:var(--bg);border:1px solid var(--border);border-radius:var(--r-sm);padding:14px 16px;font-size:15px;color:var(--muted)}
.explain b{color:var(--ink);font-weight:600}

.rep-actions{display:flex;flex-wrap:wrap;gap:12px;max-width:900px;margin-top:28px}
@media(max-width:699px){
  .rep-actions{
    flex-direction:column;
    width:100%;
  }
  .rep-actions .btn{
    width:100%;
    justify-content:center;
  }
}
.disclaimer{max-width:900px;margin-top:36px;font-size:13.5px;line-height:1.8;color:var(--muted);border-top:1px solid var(--border);padding-top:18px}

/* ---------- نافذة المستندات ---------- */
dialog#legal{
  border:0;padding:0;border-radius:var(--r-lg);max-width:640px;width:calc(100% - 32px);
  background:var(--surface);color:var(--ink);box-shadow:var(--shadow-lg);
}
dialog#legal::backdrop{background:rgba(20,8,43,.55)}
.dlg-head{display:flex;align-items:center;gap:12px;padding:20px 22px;border-bottom:1px solid var(--border)}
.dlg-head h3{margin:0;font-size:19px}
.dlg-head button{margin-inline-start:auto;width:36px;height:36px;border-radius:10px;border:1px solid var(--border);background:var(--surface);cursor:pointer;display:grid;place-items:center}
.dlg-body{padding:20px 22px 26px;max-height:66vh;overflow:auto;font-size:15.5px;color:var(--muted)}
.dlg-body h4{color:var(--ink);font-size:16px;margin:18px 0 6px}
.dlg-body h4:first-child{margin-top:0}
.dlg-body p{margin:0 0 10px}

/* ---------- نافذة مشاركة النتيجة ---------- */
dialog#shareModal{
  border:0;padding:0;border-radius:var(--r-xl);max-width:540px;width:calc(100% - 32px);
  background:var(--surface);color:var(--ink);box-shadow:var(--shadow-lg);
  overflow:hidden;margin:auto;
}
dialog#shareModal::backdrop{
  background:rgba(20,8,43,.65);
  backdrop-filter:blur(4px);
}
.share-modal-body{
  padding:20px 22px 26px;
  max-height:82vh;overflow-y:auto;
}
.share-card-preview{
  background:#14082B;
  border-radius:var(--r-md);
  padding:14px;
  display:flex;
  justify-content:center;
  align-items:center;
  margin-bottom:16px;
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
}
.share-card-preview img{
  max-height:260px;
  width:auto;
  max-width:100%;
  border-radius:8px;
  display:block;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.share-quote-container{
  background:var(--primary-light);
  border:1px solid rgba(94,23,235,.2);
  border-radius:var(--r-md);
  padding:12px 14px;
  margin-bottom:18px;
}
.share-quote-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.share-quote-label{
  font-weight:700;
  font-size:13.5px;
  color:var(--primary-dark);
  display:flex;
  align-items:center;
  gap:6px;
}
.btn-copy-quote{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--primary-dark);
  padding:4px 10px;
  border-radius:6px;
  font-size:12.5px;
  font-weight:700;
  cursor:pointer;
  transition:all var(--t);
  font-family:var(--font-head);
}
.btn-copy-quote:hover{
  background:#fff;
  border-color:var(--primary);
  color:var(--primary);
}
.btn-copy-quote.copied{
  background:var(--success);
  border-color:var(--success);
  color:#fff;
}
.share-quote-message{
  font-size:14.5px;
  line-height:1.55;
  color:var(--ink);
  margin:0;
  word-break:break-word;
}
.share-platforms-title{
  font-family:var(--font-head);
  font-weight:700;
  font-size:14.5px;
  color:var(--ink);
  margin-bottom:10px;
}
.share-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:9px;
  margin-bottom:16px;
}
@media(min-width:440px){
  .share-grid{grid-template-columns:repeat(3,1fr);}
}
.share-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:11px 8px;
  border-radius:var(--r-sm);
  font-family:var(--font-head);
  font-weight:700;
  font-size:13.5px;
  text-decoration:none;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform var(--t),box-shadow var(--t),filter var(--t);
  color:#fff;
  text-align:center;
}
.share-btn svg{flex:none}
.share-btn:hover{
  text-decoration:none;
  transform:translateY(-1px);
  filter:brightness(1.06);
  box-shadow:0 4px 10px rgba(0,0,0,.15);
}
.share-btn:active{transform:translateY(0)}

.share-wa{background:#25D366;color:#fff}
.share-fb{background:#1877F2;color:#fff}
.share-snap{background:#FFFC00;color:#000}
.share-snap:hover{color:#000}
.share-ig{background:linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);color:#fff}
.share-tw{background:#000000;color:#fff}
.share-native{background:var(--primary);color:#fff}

.share-extra-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.share-hint{
  font-size:12.5px;
  color:var(--muted);
  text-align:center;
  line-height:1.5;
  margin-top:2px;
}
.share-toast{
  background:var(--ink);
  color:#fff;
  padding:10px 14px;
  border-radius:8px;
  font-size:13.5px;
  text-align:center;
  margin-top:6px;
  line-height:1.5;
}

/* ---------- الظهور التدريجي ---------- */
.reveal{transition:opacity var(--t-slow),transform var(--t-slow)}
/* الإخفاء الأولي يُفعّل فقط بعد تأكد عمل الجافاسكربت */
.js-reveal .reveal{opacity:0;transform:translateY(14px)}
.reveal.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;animation-iteration-count:1 !important;
    transition-duration:.001ms !important;scroll-behavior:auto !important;
  }
  .js-reveal .reveal{opacity:1;transform:none}
}

/* ---------- نافذة اختيار اللغة ---------- */
dialog#langModal{
  border:0;padding:0;border-radius:var(--r-xl);max-width:500px;width:calc(100% - 32px);
  background:var(--surface);color:var(--ink);box-shadow:0 24px 60px rgba(20,8,43,.28);
  overflow:hidden;margin:auto;
}
dialog#langModal::backdrop{
  background:rgba(20,8,43,.75);
  backdrop-filter:blur(6px);
}
.lang-modal-card{
  position:relative;
  padding:32px 26px;
  text-align:center;
}
.lang-modal-close{
  position:absolute;top:16px;inset-inline-end:16px;
  width:32px;height:32px;border-radius:50%;border:1px solid var(--border);
  background:var(--bg);color:var(--muted);font-size:20px;line-height:1;
  display:grid;place-items:center;cursor:pointer;transition:background var(--t),color var(--t),border-color var(--t);
}
.lang-modal-close:hover{
  background:var(--primary-light);color:var(--primary);border-color:var(--primary);
}
.lang-icon-badge{
  width:60px;height:60px;border-radius:20px;background:var(--primary-light);
  color:var(--primary);display:inline-grid;place-items:center;margin-bottom:16px;
}
.lang-modal-head h2{
  font-size:22px;margin:0 0 6px;line-height:1.35;
}
.lang-modal-head .lang-sub-title{
  display:block;font-size:16px;color:var(--muted);font-weight:600;font-family:var(--font-lat),sans-serif;margin-top:2px;
}
.lang-modal-head p{
  font-size:14px;color:var(--muted);margin:0 0 24px;line-height:1.55;
}
.lang-modal-head .lang-sub-desc{
  display:block;font-size:13px;color:var(--muted);font-family:var(--font-lat),sans-serif;margin-top:2px;
}
.lang-options-grid{
  display:grid;gap:14px;
}
.lang-opt-card{
  display:flex;align-items:center;gap:16px;padding:16px 20px;border-radius:var(--r-md);
  border:2px solid var(--border);background:var(--bg);cursor:pointer;
  transition:border-color var(--t),background-color var(--t),transform var(--t),box-shadow var(--t);
  text-align:start;width:100%;
}
.lang-opt-card:hover{
  border-color:var(--primary);background:var(--surface);transform:translateY(-2px);box-shadow:var(--shadow-md);
}
.lang-opt-card.active{
  border-color:var(--primary);background:var(--primary-light);
}
.lang-flag{
  font-size:32px;flex:none;line-height:1;
}
.lang-opt-text{
  flex:1;min-width:0;
}
.lang-opt-name{
  display:block;font-size:18px;color:var(--ink);margin-bottom:3px;font-weight:800;
}
.lang-opt-info{
  display:block;font-size:13px;color:var(--muted);line-height:1.4;
}
.lang-check-icon{
  width:28px;height:28px;border-radius:50%;background:var(--primary);color:#fff;
  display:none;place-items:center;font-size:14px;font-weight:bold;flex:none;
}
.lang-opt-card.active .lang-check-icon{
  display:grid;
}
@media(max-width:480px){
  dialog#langModal{width:calc(100% - 24px);max-width:100%}
  .lang-modal-card{padding:22px 16px}
  .lang-icon-badge{width:48px;height:48px;border-radius:14px;margin-bottom:12px}
  .lang-icon-badge img{width:28px;height:28px}
  .lang-modal-head h2{font-size:18px}
  .lang-modal-head .lang-sub-title{font-size:13.5px}
  .lang-modal-head p{font-size:12.5px;margin-bottom:16px}
  .lang-opt-card{padding:12px 14px;gap:12px}
  .lang-flag{font-size:24px}
  .lang-opt-name{font-size:16px}
  .lang-opt-info{font-size:12px}
}

/* زر تبديل اللغة في الهيدر */
.lang-toggle-btn{
  display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:0 14px;
  border-radius:var(--r-md);border:1.5px solid var(--border);background:var(--surface);
  color:var(--ink);font-family:var(--font-lat),sans-serif;font-weight:700;font-size:14px;
  cursor:pointer;transition:border-color var(--t),color var(--t),background-color var(--t),transform var(--t);
  flex:none;
}
.lang-toggle-btn:hover{
  border-color:var(--primary);color:var(--primary);background:var(--primary-light);
}
.lang-toggle-btn svg,
.lang-toggle-btn img{
  width:20px;height:20px;object-fit:contain;flex:none;display:block;
}
.lang-icon-badge img{
  width:36px;height:36px;object-fit:contain;display:block;
}

/* دعم اتجاه LTR */
html[dir="ltr"] body{
  font-family:var(--font-lat),system-ui,-apple-system,sans-serif;
  letter-spacing:-0.2px;
}
html[dir="ltr"] h1,html[dir="ltr"] h2,html[dir="ltr"] h3,html[dir="ltr"] h4{
  font-family:var(--font-lat),system-ui,sans-serif;
}
html[dir="ltr"] .btn-arrow{
  transform:rotate(180deg);
}
html[dir="ltr"] .rev-head .chev{
  transform:rotate(0deg);
}
html[dir="ltr"] .rev.open .chev{
  transform:rotate(180deg);
}
html[dir="ltr"] .rep-share-card{
  text-align:start;
}

/* ============================================================
   ١٣) تخصيص بوابة الدفع ميسر (Moyasar Payment Integration)
   ============================================================ */
.pay-error-banner{
  display:flex;
  align-items:center;
  gap:10px;
  background:#FFF1F2;
  border:1.5px solid #FDA4AF;
  color:#BE123C;
  padding:14px 18px;
  border-radius:var(--r-md);
  margin-top:16px;
  margin-bottom:8px;
  font-size:15px;
  font-weight:600;
  line-height:1.5;
  animation:fadeSlideDown 240ms ease;
}
.pay-error-banner svg{
  flex:none;
  stroke:#BE123C;
}

.pay-success-banner{
  background:linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.06) 100%);
  border-bottom:1.5px solid rgba(16, 185, 129, 0.35);
  padding-block:14px;
  animation:fadeSlideDown 300ms ease;
}
.pay-success-card{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:#065F46;
  font-size:16px;
  font-weight:700;
  text-align:center;
}
.pay-success-card svg{
  flex:none;
  stroke:#059669;
}

/* حاوية نموذج الدفع ميسر */
.moyasar-form-wrap{
  background:#FFFFFF;
  border:1.5px solid var(--border);
  border-radius:var(--r-lg);
  padding:20px 24px;
  margin-top:20px;
  box-shadow:var(--shadow-md);
  text-align:start;
  animation:fadeSlideDown 260ms cubic-bezier(.3,.7,.4,1);
}
.moyasar-form-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
}
.moyasar-form-head h4{
  font-size:17px;
  font-weight:800;
  color:var(--ink);
  margin:0;
}
.btn-cancel-pay{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--muted);
  font-size:18px;
  font-weight:bold;
  line-height:1;
  cursor:pointer;
  transition:all var(--t);
}
.btn-cancel-pay:hover{
  background:#FEE2E2;
  color:#DC2626;
  border-color:#FCA5A5;
}

/* مواءمة نموذج ميسر داخل الحاوية */
.mysr-form{
  width:100% !important;
  max-width:100% !important;
  min-height:180px;
}
.mysr-form form{
  font-family:inherit !important;
}
.mysr-form .btn-primary,
.mysr-form button[type="submit"]{
  background-color:var(--primary) !important;
  border-color:var(--primary) !important;
  font-family:inherit !important;
  font-weight:800 !important;
  border-radius:var(--r-md) !important;
  min-height:50px !important;
  font-size:16px !important;
  transition:background-color var(--t) !important;
}
.mysr-form .btn-primary:hover,
.mysr-form button[type="submit"]:hover{
  background-color:var(--primary-dark) !important;
  border-color:var(--primary-dark) !important;
}
.mysr-form input{
  font-family:inherit !important;
  border-radius:var(--r-sm) !important;
  border:1.5px solid var(--border) !important;
}
.mysr-form input:focus{
  border-color:var(--primary) !important;
  outline:none !important;
  box-shadow:0 0 0 3px var(--primary-light) !important;
}

@keyframes fadeSlideDown{
  from{opacity:0;transform:translateY(-8px)}
  to{opacity:1;transform:translateY(0)}
}


/* ============================================================
   الوضع التجريبي والتحقق من الدفع
   ============================================================ */

/* شريط ثابت أسفل الشاشة يبقى ظاهراً ما دام الوضع التجريبي مفعّلاً.
   pointer-events:none حتى لا يحجب أي زر تحته. */
.test-mode-banner{
  position:fixed;
  inset-block-end:14px;
  inset-inline-start:14px;
  z-index:9999;
  pointer-events:none;
  background:var(--warning);
  color:#2A1B00;
  font-family:var(--font-head);
  font-weight:700;
  font-size:13px;
  line-height:1;
  padding:9px 15px;
  border-radius:999px;
  box-shadow:0 4px 14px rgba(20,8,43,.25);
  letter-spacing:.01em;
}
@media(max-width:480px){
  .test-mode-banner{font-size:12px;padding:8px 13px}
}

/* حالة «جارٍ التحقق من عملية الدفع» على شاشة القفل */
.pay-verify-note{
  display:flex;
  align-items:center;
  gap:11px;
  margin-top:20px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--r-md);
  background:var(--primary-light);
  color:var(--primary-dark);
  font-size:15px;
  font-weight:600;
}
.pay-spinner{
  flex:none;
  width:19px;
  height:19px;
  border-radius:50%;
  border:2.5px solid rgba(94,23,235,.25);
  border-top-color:var(--primary);
  animation:pay-spin 700ms linear infinite;
}
@keyframes pay-spin{to{transform:rotate(360deg)}}

/* عند تفضيل تقليل الحركة تُلغى الحركة عالمياً (القاعدة أعلى الملف
   تفرض animation-duration بـ !important)، فنُبقي حلقة ساكنة فقط.
   المعنى يحمله نص «جارٍ التحقق…» وهو role="status" يُعلَن لقارئ الشاشة. */
@media (prefers-reduced-motion:reduce){
  .pay-spinner{border-color:var(--primary)}
}

/* ============================================================
   شريط الثقة والتهيئة المسبقة في الواجهة (Hero Trust Pill)
   ============================================================ */
.hero-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 8px 16px;
  background: rgba(94, 23, 235, 0.06);
  border: 1px solid rgba(94, 23, 235, 0.18);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-dark);
}
.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex: none;
}

/* ============================================================
   شاشة المعالجة الذكية بعد الاختبار (Processing Screen)
   ============================================================ */
.proc-wrap {
  max-width: 660px;
  margin: 40px auto 60px;
  padding: 0 16px;
}
.proc-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 44px 24px;
  box-shadow: 0 16px 45px rgba(20, 8, 43, 0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.proc-visual {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proc-pulse-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(94, 23, 235, 0.35);
  animation: proc-ring-pulse 2s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
}
.proc-pulse-ring.delay {
  inset: -22px;
  animation-delay: 0.75s;
  border-color: rgba(0, 196, 167, 0.35);
}
@keyframes proc-ring-pulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}
.proc-brain-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #7C3AED 0%, #5E17EB 100%);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 25px rgba(94, 23, 235, 0.35);
}
.proc-brain-icon svg {
  width: 44px;
  height: 44px;
  animation: proc-brain-pulse 1.8s ease-in-out infinite;
}
@keyframes proc-brain-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.proc-pct {
  font-size: 38px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  margin-bottom: 12px;
}
.proc-bar-wrap {
  background: #EDE8F7;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 24px;
  max-width: 380px;
}
.proc-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00C4A7 0%, #5E17EB 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.proc-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proc-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 28px;
}
.proc-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  width: 100%;
}
.p-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: #F8F6FD;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #ECE7F6;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 1 1 0;
}
.p-step span {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #E0DAF0;
  color: #554A70;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}
.p-step.active {
  background: rgba(94, 23, 235, 0.08);
  border-color: rgba(94, 23, 235, 0.3);
  color: var(--primary);
}
.p-step.active span {
  background: var(--primary);
  color: #fff;
}
.p-step.done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: #059669;
}
.p-step.done span {
  background: #10B981;
  color: #fff;
}
@media (max-width: 480px) {
  .proc-card {
    padding: 32px 14px;
  }
  .proc-steps {
    gap: 4px;
  }
  .p-step {
    padding: 6px 4px;
    font-size: 10px;
    gap: 3px;
  }
  .p-step span {
    width: 15px;
    height: 15px;
    font-size: 9.5px;
  }
}

/* ============================================================
   بطاقة النتيجة + الشهادة في شاشة القفل
   ============================================================ */
.free-score-banner {
  margin-bottom: 24px;
  text-align: center;
}
.free-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  color: #065F46;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}
.free-score-card {
  background: linear-gradient(135deg, #1C0A38 0%, #0C051E 100%);
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 22px;
  padding: 24px 28px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  box-shadow: 0 14px 40px rgba(20, 8, 43, 0.3);
}
@media (max-width: 520px) {
  .free-score-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px 16px;
  }
  .free-score-meta {
    align-items: center !important;
    text-align: center !important;
  }
}
.free-score-num-wrap {
  text-align: center;
  flex: none;
}
.free-score-val {
  font-size: 58px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: #00C4A7;
  line-height: 1;
  text-shadow: 0 0 25px rgba(0, 196, 167, 0.45);
}
.free-score-label {
  font-size: 13px;
  color: #C4B5FD;
  margin-top: 6px;
  font-weight: 600;
}
.free-score-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: start;
}
.free-band-badge {
  display: inline-block;
  background: rgba(94, 23, 235, 0.4);
  border: 1px solid rgba(167, 139, 250, 0.6);
  color: #EDE5FE;
  padding: 5px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  width: fit-content;
}
.free-percentile {
  font-size: 14px;
  color: #A7F3D0;
  font-weight: 700;
}
.free-time-spent {
  font-size: 12.5px;
  color: #A39CBD;
}

/* بطاقة العرض والترقية للشهادة */
.upsell-card {
  border-top: 4px solid var(--primary) !important;
  overflow: hidden;
}
.upsell-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.upsell-head h3 {
  font-size: clamp(13px, 3.8vw, 19px);
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
@media (max-width: 480px) {
  .upsell-head {
    padding: 16px 10px 14px;
  }
  .upsell-head h3 {
    font-size: clamp(11.5px, 3.7vw, 14.5px);
    white-space: nowrap;
    letter-spacing: -0.3px;
  }
}
@media (max-width: 360px) {
  .upsell-head {
    padding: 14px 6px 12px;
  }
  .upsell-head h3 {
    font-size: 11px;
    letter-spacing: -0.4px;
  }
}
.upsell-card .price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}
.price-strike-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.old-price {
  font-size: 18px;
  color: #9CA3AF;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: relative;
}
.old-price::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%) rotate(-4deg);
}
.old-price .sar-symbol {
  height: 0.72em;
  opacity: 0.75;
}
.discount-pill {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #DC2626;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}
.current-price-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.current-price-wrap .v {
  font-family: var(--font-head);
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}
.current-price-wrap .c {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}
/* شعار الريال السعودي المعتمد (SAMA) */
.sar-symbol {
  display: inline-block;
  vertical-align: -0.12em;
  height: 0.82em;
  width: auto;
  fill: currentColor;
  margin-inline-start: 4px;
  flex: none;
}
.current-price-wrap .sar-symbol {
  color: var(--primary);
  margin-inline-start: 6px;
  height: 0.75em;
  vertical-align: -0.06em;
}
#btnPay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  font-size: clamp(13px, 3.8vw, 18.5px);
  padding-inline: 16px;
  min-height: 56px;
  letter-spacing: -0.2px;
}
#btnPay .sar-symbol {
  height: 0.82em;
  vertical-align: -0.1em;
  margin-inline-start: 4px;
  margin-inline-end: 2px;
}
#btnPreviewCert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  font-size: clamp(12px, 3.3vw, 16px);
  padding-inline: 12px;
  min-height: 50px;
  letter-spacing: -0.2px;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  #btnPay {
    font-size: clamp(11.8px, 3.5vw, 14.5px);
    padding-inline: 8px;
    min-height: 52px;
    letter-spacing: -0.35px;
  }
  #btnPreviewCert {
    font-size: clamp(11px, 3.0vw, 13.5px);
    padding-inline: 6px;
    min-height: 46px;
    letter-spacing: -0.3px;
  }
}
@media (max-width: 360px) {
  #btnPay {
    font-size: 11px;
    padding-inline: 4px;
    letter-spacing: -0.45px;
  }
  #btnPreviewCert {
    font-size: 10.2px;
    padding-inline: 4px;
    letter-spacing: -0.4px;
  }
}
.upgrade-features {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upgrade-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: start;
  background: #FBF9FE;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #ECE7F6;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  overflow: hidden;
}
.upgrade-features li:hover {
  border-color: rgba(94, 23, 235, 0.25);
  box-shadow: 0 4px 12px rgba(94, 23, 235, 0.06);
}
.feat-ic-wrap {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #EDE5FE;
  border: 1px solid rgba(94, 23, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex: none;
  box-shadow: 0 2px 6px rgba(94, 23, 235, 0.1);
}
.feat-ic {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  display: block;
}
.upgrade-features strong {
  display: block;
  font-size: clamp(11.2px, 3.1vw, 14px);
  color: var(--ink);
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap !important;
  letter-spacing: -0.28px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
@media (max-width: 480px) {
  .upgrade-features li {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 10px;
  }
  .feat-ic-wrap {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  .feat-ic {
    width: 15px;
    height: 15px;
  }
  .upgrade-features strong {
    font-size: clamp(10px, 2.75vw, 12.5px);
    letter-spacing: -0.35px;
  }
}
@media (max-width: 360px) {
  .upgrade-features li {
    padding: 7px 8px;
    gap: 6px;
  }
  .feat-ic-wrap {
    width: 24px;
    height: 24px;
  }
  .feat-ic {
    width: 13px;
    height: 13px;
  }
  .upgrade-features strong {
    font-size: 9.5px;
    letter-spacing: -0.45px;
  }
}
.btn-pulse {
  animation: btn-glow-pulse 2s infinite;
}
@keyframes btn-glow-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(94, 23, 235, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(94, 23, 235, 0.6); }
}

/* ============================================================
   نافذة تنبيه بدء التحدي باللون الأساسي للموقع (Start Challenge Modal)
   ============================================================ */
dialog#startModal {
  border: 0;
  padding: 0;
  border-radius: var(--r-xl);
  max-width: 500px;
  width: calc(100% - 24px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 8, 43, 0.32);
  overflow: hidden;
  margin: auto;
}
dialog#startModal::backdrop {
  background: rgba(20, 8, 43, 0.75);
  backdrop-filter: blur(8px);
}
.start-modal-card {
  position: relative;
  padding: 30px 20px 22px;
  text-align: center;
}
.start-modal-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.start-modal-close:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.start-icon-badge {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--primary-light);
  border: 1.5px solid rgba(94, 23, 235, 0.22);
  color: var(--primary);
  display: inline-grid;
  place-items: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(94, 23, 235, 0.14);
}
.start-modal-head h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  line-height: 1.35;
  color: var(--ink);
}
.start-modal-head p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}
/* النافذة المنبثقة للدفع الفوري وبدء التحدي */
.checkout-modal-card {
  padding: 24px 20px 20px;
  position: relative;
}
.checkout-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.checkout-participant-strip {
  background: #F8F6FD;
  border: 1px solid #E6DFF7;
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.checkout-p-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: start;
}
.checkout-p-lbl {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.checkout-p-name {
  font-size: 14.5px;
  color: var(--primary);
  font-weight: 800;
}
.checkout-btn-edit-name {
  background: transparent;
  border: 1px solid #D6CCEE;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
}
.checkout-btn-edit-name:hover {
  background: var(--primary);
  color: #fff;
}
.checkout-price-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(94, 23, 235, 0.05), rgba(236, 200, 118, 0.06));
  border: 1px solid rgba(94, 23, 235, 0.15);
  border-radius: var(--r-md);
  padding: 10px 16px;
  margin-bottom: 16px;
}
.checkout-strike-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkout-old-price {
  font-size: 16px;
  font-weight: 700;
  color: #9CA3AF;
}
.checkout-strike-box .sar-symbol {
  height: 0.85em;
  color: #9CA3AF;
  vertical-align: -0.06em;
}
.checkout-discount-badge {
  background: #10B981;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.checkout-final-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.checkout-final-val {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.checkout-final-box .sar-symbol {
  height: 0.8em;
  color: var(--primary);
  vertical-align: -0.06em;
  margin-inline: 2px 4px;
}
.checkout-final-cur {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.checkout-methods {
  justify-content: center;
  margin-top: 14px;
  gap: 6px;
}
.checkout-secure-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.checkout-secure-note svg {
  width: 14px;
  height: 14px;
  color: #059669;
  flex: none;
}
@media (max-width: 480px) {
  dialog#startModal {
    width: calc(100% - 16px);
    max-width: 480px;
  }
  .checkout-modal-card {
    padding: 20px 14px 16px;
  }
  .checkout-price-strip {
    padding: 8px 12px;
    gap: 6px;
  }
  .checkout-final-val {
    font-size: 24px;
  }
  .checkout-p-name {
    font-size: 13.5px;
  }
  .start-modal-card {
    padding: 22px 12px 18px;
  }
  .start-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 10px;
  }
  .start-icon-badge svg {
    width: 24px;
    height: 24px;
  }
  .start-modal-head h2 {
    font-size: 18.5px;
  }
  .start-modal-head p {
    font-size: 12.5px;
    margin-bottom: 14px;
  }
  .start-trust-box {
    padding: 9px 10px;
    gap: 7px;
    margin-bottom: 14px;
  }
  .start-trust-dot {
    width: 8px;
    height: 8px;
  }
  .start-trust-text {
    font-size: clamp(10px, 2.65vw, 12px);
    letter-spacing: -0.32px;
    line-height: 1.35;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  .start-points-list {
    margin-bottom: 18px;
    gap: 7px;
  }
  .start-points-list li {
    font-size: 12px;
    padding: 8px 10px;
    gap: 8px;
  }
}
@media (max-width: 350px) {
  .start-trust-text {
    font-size: 9.8px;
    letter-spacing: -0.38px;
    white-space: normal !important;
    line-height: 1.35;
  }
}

/* ============================================================
   شريط تأكيد اسم الشهادة في شاشة القفل والترقية (Lock Confirmed Name)
   ============================================================ */
.lock-cert-for-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F8F5FE;
  border: 1px solid #E4DAF8;
  border-radius: var(--r-md);
  padding: 11px 16px;
  margin: 14px 0 10px;
  font-size: 14px;
  text-align: start;
}
.lock-cert-for-pill svg {
  color: var(--primary);
  flex: none;
}
.lock-cert-lbl {
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
}
.lock-cert-name {
  color: var(--ink);
  font-weight: 800;
  font-size: 14.5px;
}

/* ============================================================
   قسم الشهادة الممنوحة من تحدي الذكاء (Certificate Section)
   ============================================================ */
.cert-section {
  padding-block: 40px;
  background: linear-gradient(180deg, #F8F6FD 0%, #FFFFFF 100%);
  border-top: 1px solid rgba(94, 23, 235, 0.08);
  border-bottom: 1px solid rgba(94, 23, 235, 0.08);
}
.cert-control-panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid rgba(94, 23, 235, 0.14);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(94, 23, 235, 0.05);
}
.cert-panel-head {
  text-align: center;
  margin-bottom: 22px;
}
.cert-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(217, 119, 6, 0.1);
  color: #B45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.cert-gold-star {
  color: #D97706;
  font-size: 14px;
}
.cert-panel-head h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 6px;
}
.cert-panel-head p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.cert-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cert-btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* بطاقة الشهادة الأنيقة المعروضة حياً (Live Certificate Preview Card) */
.cert-frame-wrap {
  perspective: 1000px;
  margin: 0 auto;
  max-width: 960px;
}
.cert-card {
  background: #FFFDF9;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(94, 23, 235, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 16px;
  border: 2px solid #E2D4B7;
  position: relative;
  overflow: hidden;
}
.cert-inner-frame {
  border: 2px solid #C5A869;
  padding: 36px 42px;
  border-radius: 10px;
  position: relative;
  background: radial-gradient(circle at 50% 50%, #FFFFFF 0%, #FCF9F2 100%);
  overflow: hidden;
}
.cert-inner-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(197, 168, 105, 0.5);
  border-radius: 6px;
  pointer-events: none;
}
/* زخارف الأركان الذهبية */
.cert-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #A37F38;
  border-style: solid;
  pointer-events: none;
}
.cert-corner.c-tl { top: 12px; inset-inline-start: 12px; border-width: 3px 0 0 3px; }
.cert-corner.c-tr { top: 12px; inset-inline-end: 12px; border-width: 3px 3px 0 0; }
.cert-corner.c-bl { bottom: 12px; inset-inline-start: 12px; border-width: 0 0 3px 3px; }
.cert-corner.c-br { bottom: 12px; inset-inline-end: 12px; border-width: 0 3px 3px 0; }

.cert-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.cert-logo-box {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}
.cert-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.cert-header-text {
  text-align: center;
  flex: 1;
  padding: 0 16px;
}
.cert-org-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #786444;
  margin-bottom: 4px;
}
.cert-headline {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 900;
  color: #2D1457;
  margin: 0 0 4px;
  letter-spacing: 1px;
}
.cert-en-sub {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #8D7653;
  text-transform: uppercase;
}
.cert-seal-mini {
  background: linear-gradient(135deg, #ECC876 0%, #B88E3E 100%);
  color: #2D1457;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 10px rgba(184, 142, 62, 0.3);
}

.cert-center-body {
  text-align: center;
  position: relative;
  z-index: 1;
  margin-block: 16px 28px;
}
.cert-certify-line {
  font-size: 14.5px;
  color: #63503C;
  font-weight: 500;
  margin: 0 0 8px;
}
.cert-name-display {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  color: #5E17EB;
  margin: 4px 0 10px;
  padding-inline: 20px;
  display: inline-block;
  letter-spacing: 0.5px;
  min-height: 48px;
}
.cert-gold-bar {
  width: 240px;
  height: 3px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, #C5A869, #ECC876, #C5A869, transparent);
  border-radius: 2px;
}
.cert-statement-text {
  font-size: 14px;
  line-height: 1.7;
  color: #4A3E31;
  max-width: 650px;
  margin: 0 auto 20px;
}

.cert-results-strip {
  display: inline-flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid #E5D9C4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.cert-res-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 16px;
}
.cert-res-item:not(:last-child) {
  border-inline-end: 1px solid #ECE1CD;
}
.cert-res-item .cr-lbl {
  font-size: 11.5px;
  color: #7B6852;
  font-weight: 600;
  margin-bottom: 4px;
}
.cert-res-item .cr-val {
  font-size: 18px;
  font-weight: 900;
  color: #2D1457;
}
.cert-res-item.highlight .cr-val {
  color: #5E17EB;
}
.cert-res-item .cr-val.verified {
  color: #059669;
  font-size: 15px;
}

.cert-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #EFE4D0;
  position: relative;
  z-index: 1;
}
.cert-info-col {
  text-align: start;
}
.cert-info-line {
  margin-bottom: 5px;
  font-size: 12.5px;
  color: #6D5B48;
}
.cert-info-line .ci-lbl {
  margin-inline-end: 6px;
}
.cert-info-line .ci-val {
  color: #2D1457;
  letter-spacing: 0.5px;
}

/* الختم الرسمي الدائري الذهبي (Official Golden Embossed Seal) */
.cert-seal-col {
  display: flex;
  justify-content: center;
}
.cert-official-seal {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, #ECC876 0%, #D4A950 50%, #9F7425 100%);
  border: 3px double #FFF;
  box-shadow: 0 6px 18px rgba(159, 116, 37, 0.4), inset 0 2px 6px rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  position: relative;
}
.cert-official-seal .seal-rings {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #4A3305;
}
.seal-star-top {
  font-size: 9px;
  letter-spacing: 2px;
}
.seal-core-title {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}
.seal-core-sub {
  font-size: 9px;
  font-weight: 700;
}
.seal-dots {
  font-size: 8px;
  letter-spacing: 1px;
}

.cert-sign-col {
  text-align: center;
  min-width: 170px;
}
.cert-signature-line {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sig-svg {
  width: 140px;
  height: 38px;
}
.cert-sign-org {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #2D1457;
  border-top: 1px solid #C5A869;
  padding-top: 4px;
}
.cert-sign-en {
  display: block;
  font-size: 9.5px;
  font-family: 'Poppins', sans-serif;
  color: #7B6852;
}

/* نافذة معاينة الشهادة (Cert Modal) */
dialog#certModal {
  border: 0;
  padding: 0;
  border-radius: var(--r-xl);
  max-width: 780px;
  width: calc(100% - 32px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 8, 43, 0.35);
  overflow: hidden;
  margin: auto;
}
dialog#certModal::backdrop {
  background: rgba(20, 8, 43, 0.75);
  backdrop-filter: blur(8px);
}
.cert-modal-body {
  padding: 20px;
}
.cert-modal-sample-notice {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(94, 23, 235, 0.06) 100%);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: start;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cert-notice-badge {
  background: #D97706;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex: none;
}
.cert-modal-sample-notice p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.cert-modal-preview {
  background: #F8F6FD;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.cert-modal-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.cert-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cert-modal-actions button {
  flex: 1;
  min-width: 200px;
}

/* تجاوب الشهادة مع مختلف الشاشات (Responsive Certificate) */
@media (max-width: 768px) {
  .cert-inner-frame {
    padding: 22px 18px;
  }
  .cert-top-row {
    flex-direction: column;
    gap: 12px;
  }
  .cert-seal-mini {
    display: none;
  }
  .cert-results-strip {
    gap: 8px;
    padding: 10px 14px;
  }
  .cert-res-item {
    padding: 2px 8px;
  }
  .cert-bottom-row {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
  }
  .cert-info-col {
    text-align: center;
  }
  .cert-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cert-btn-group {
    flex-direction: column;
  }
  .cert-btn-group button {
    width: 100%;
  }
}

/* ============================================================
/* ============================================================
   نافذة سحب iPhone 18 Pro Max الترويجية الفاخرة (1:1 في المنتصف)
   ============================================================ */
dialog#giveawayModal {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 24px !important;
  width: min(92vw, 440px) !important;
  max-width: 440px !important;
  box-shadow: none !important;
  margin: auto !important;
  overflow: visible !important;
}

dialog#giveawayModal:not([open]) {
  display: none !important;
}

dialog#giveawayModal[open] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

dialog#giveawayModal::backdrop {
  background: rgba(12, 4, 25, 0.82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  animation: gwFadeIn 0.3s ease-out;
}

@keyframes gwFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gwScaleUp {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.giveaway-modal-card,
.giveaway-card-image-only {
  position: relative !important;
  background: transparent !important;
  border: none !important;
  border-radius: 24px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  box-shadow: none !important;
  animation: gwScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.giveaway-modal-close {
  position: absolute !important;
  top: 14px !important;
  left: 14px !important;
  background: rgba(20, 8, 43, 0.8) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
  color: #FFFFFF !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  line-height: 1 !important;
  z-index: 30 !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

.giveaway-modal-close:hover {
  background: #FFFFFF !important;
  color: #14082B !important;
  transform: scale(1.12);
}

/* بوستر السحب بمقاس 1:1 مربع كبير في المنتصف تماماً */
.giveaway-img-wrap {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  aspect-ratio: 1 / 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #180309 !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(94, 23, 235, 0.45) !important;
  border: 2px solid rgba(255, 255, 255, 0.25) !important;
  cursor: pointer !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease !important;
}

.giveaway-img-wrap:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.75), 0 0 55px rgba(94, 23, 235, 0.6) !important;
}

.giveaway-phone-img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 24px !important;
  transition: transform 0.4s ease;
}
  margin: 0 0 12px;
}

.giveaway-subtitle {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.giveaway-form {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gw-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gw-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gw-label svg {
  color: var(--primary);
}

.gw-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.gw-input::placeholder {
  color: #A098B5;
}

.gw-input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(94, 23, 235, 0.15);
}

.gw-input.error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(217, 58, 70, 0.18) !important;
}

.gw-phone-wrap {
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: all 0.2s ease;
  direction: ltr;
}

.gw-phone-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 23, 235, 0.15);
}

.gw-country-select {
  border: none;
  border-right: 1.5px solid var(--border);
  background-color: var(--primary-light);
  color: var(--primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  padding: 0 24px 0 10px;
  height: 44px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
  flex: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235E17EB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  direction: ltr;
}

.gw-country-select:focus {
  background-color: #E5DBFB;
}

.gw-country-select option {
  background: #FFFFFF;
  color: var(--ink);
  font-weight: 700;
  font-size: 13.5px;
  padding: 6px 10px;
}

.gw-phone-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 44px;
  direction: ltr;
  text-align: left;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
}

.gw-error-msg {
  background: rgba(217, 58, 70, 0.08);
  border: 1px solid rgba(217, 58, 70, 0.3);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  animation: shake 0.3s ease;
}

.gw-submit-btn {
  margin-top: 4px;
  background: var(--primary);
  border: 1px solid transparent;
  color: #FFFFFF;
  padding: 13px 20px;
  font-size: 16px;
  font-weight: 800;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(94, 23, 235, 0.35);
  transition: all 0.25s ease;
}

.gw-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(94, 23, 235, 0.45);
  background: var(--primary-dark);
}

.gw-skip-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  text-align: center;
}

.gw-skip-btn:hover {
  color: var(--primary);
}

.gw-footer-note {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.45;
}

/* الزر العائم لسحب الآيفون — بنفسجي ملكي بتأثير متناسق */
.floating-gw-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #5E17EB 0%, #4310AE 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(94, 23, 235, 0.38), 0 0 16px rgba(94, 23, 235, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: floatingGlow 3s infinite alternate ease-in-out;
}

.floating-gw-btn:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: #FFFFFF;
  box-shadow: 0 12px 30px rgba(94, 23, 235, 0.55), 0 0 24px rgba(94, 23, 235, 0.4);
}

.floating-gw-icon {
  font-size: 18px;
  animation: bounceGift 2s infinite ease-in-out;
}

.floating-gw-badge {
  background: #F59E0B;
  color: #1F0E00;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

@keyframes bounceGift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px) rotate(-6deg); }
}

@keyframes floatingGlow {
  0% { box-shadow: 0 8px 24px rgba(94, 23, 235, 0.35), 0 0 14px rgba(94, 23, 235, 0.2); }
  100% { box-shadow: 0 8px 24px rgba(94, 23, 235, 0.5), 0 0 22px rgba(94, 23, 235, 0.35); }
}

@media (max-width: 480px) {
  dialog#giveawayModal {
    width: min(92vw, 380px) !important;
    max-width: 380px !important;
    padding: 0 !important;
    margin: auto !important;
  }
  .giveaway-modal-card,
  .giveaway-card-image-only {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .giveaway-img-wrap {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
  }
  .giveaway-phone-img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 20px !important;
  }
  .giveaway-modal-close {
    top: 10px !important;
    left: 10px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 22px !important;
  }
  .floating-gw-btn {
    bottom: 16px;
    right: 16px;
    padding: 8px 13px;
    font-size: 12px;
  }
/* ============================================================
   شاشة تحميل وتجهيز الاختبار الفاخرة (3 ثوانٍ)
   ============================================================ */
.test-prep-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(13, 6, 28, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.test-prep-overlay.active {
  opacity: 1;
  visibility: visible;
}

.test-prep-card {
  position: relative;
  background: linear-gradient(145deg, #1C0F38 0%, #100624 100%);
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  border-radius: 28px;
  padding: 38px 28px 30px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  color: #FFFFFF;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 45px rgba(94, 23, 235, 0.35);
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.test-prep-overlay.active .test-prep-card {
  transform: scale(1);
}

/* أيقونة الذكاء الاصطناعي مع الحلقات المدارية المشعة */
.test-prep-icon-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-prep-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #8B5CF6, #EC4899, #3B82F6, #8B5CF6);
  filter: blur(8px);
  opacity: 0.75;
  animation: prepSpin 3s linear infinite;
}

.test-prep-orbit {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  animation: prepSpin 4s linear infinite;
}

.orbit-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #F43F5E;
  box-shadow: 0 0 10px #F43F5E, 0 0 20px #F43F5E;
}

.test-prep-icon {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #180933;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A855F7;
  z-index: 2;
  box-shadow: inset 0 0 16px rgba(139, 92, 246, 0.4);
  animation: prepBrainPulse 1.8s ease-in-out infinite;
}

.test-prep-icon svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

@keyframes prepSpin {
  100% { transform: rotate(360deg); }
}

@keyframes prepBrainPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.8)); }
}

.test-prep-title {
  font-size: 22px;
  font-weight: 900;
  color: #FFFFFF;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.test-prep-step {
  font-size: 13.5px;
  font-weight: 700;
  color: #C4B5FD;
  margin: 0 0 20px;
  min-height: 20px;
  transition: all 0.3s ease;
}

.test-prep-progress-wrap {
  position: relative;
  width: 100%;
  margin: 0 0 22px;
}

.test-prep-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.test-prep-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8B5CF6, #EC4899, #F59E0B);
  border-radius: 999px;
  transition: width 3s linear;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.7);
}

.test-prep-percent {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #E9D5FF;
  margin-top: 8px;
}

.test-prep-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prep-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #DDD6FE;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.btn-hero-start.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

@media (max-width: 480px) {
  .test-prep-card {
    padding: 30px 20px 24px;
    border-radius: 22px;
  }
  .test-prep-title {
    font-size: 19px;
  }
  .test-prep-step {
    font-size: 12.5px;
  }
  .prep-badge {
    font-size: 10.5px;
    padding: 3px 8px;
  }
}

/* ============================================================
   نافذة حفظ وتنزيل الصورة الذكية المتوافقة مع الآيفون والأجهزة الذكية
   ============================================================ */
.image-save-modal {
  width: min(92vw, 480px);
  padding: 0;
  border-radius: 24px;
  background: var(--bg-card, #1A112F);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  color: #FFFFFF;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 35px rgba(94, 23, 235, 0.3);
}
.image-save-modal::backdrop {
  background: rgba(10, 5, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.image-save-body {
  padding: 20px 22px 26px;
  text-align: center;
}
.image-save-hint {
  background: rgba(94, 23, 235, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #EDE5FE;
  margin-bottom: 16px;
  text-align: right;
}
.image-save-hint b {
  color: #00E5C0;
}
.image-save-preview {
  margin: 0 auto 18px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0D061A;
  max-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-save-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: contain;
  -webkit-touch-callout: default !important;
  user-select: auto !important;
}
.image-save-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
