
/* ==========================================================
   HARMONIKA QUIZ CENTER
   PROF ABDELFETTAH
   ========================================================== */

.zqBtn{
  position:relative;
  width:105px;
  height:74px;
  margin:13px auto;
  padding:7px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  border:1px solid rgba(191,139,255,.48);
  border-radius:22px;
  color:#fff;
  cursor:pointer;
  overflow:hidden;
  font-family:inherit;
  background:
    radial-gradient(circle at 25% 0%,rgba(255,196,78,.18),transparent 38%),
    linear-gradient(145deg,#301653,#151126 58%,#10111d);
  box-shadow:
    0 10px 28px rgba(16,6,36,.35),
    inset 0 1px 0 rgba(255,255,255,.13),
    0 0 18px rgba(141,72,255,.10);
  -webkit-tap-highlight-color:transparent;
  transition:.2s ease;
}

.zqBtn:active{
  transform:scale(.95);
}

.zqBtnIcon{
  position:relative;
  font-size:27px;
  line-height:1;
}

.zqBrain{
  position:absolute;
  top:-8px;
  right:-13px;
  width:21px;
  height:21px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-size:12px;
  background:linear-gradient(145deg,#ffd667,#d68b1f);
  box-shadow:0 2px 8px rgba(0,0,0,.3);
}

.zqBtn strong{
  font-size:12px;
  font-weight:950;
}

.zqBtn small{
  font-size:7.5px;
  color:rgba(255,255,255,.55);
}

.zqPulse{
  position:absolute;
  top:8px;
  left:9px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#5cff91;
  box-shadow:0 0 9px #42f47c;
}


/* OVERLAY */

.zqOverlay{
  position:fixed;
  inset:0;
  z-index:1200000;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(5,4,12,.88);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:.25s ease;
}

.zqOverlay.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.zqPanel{
  position:relative;
  width:min(95vw,520px);
  max-height:90dvh;
  overflow-y:auto;
  scrollbar-width:none;
  direction:rtl;
  padding:23px 15px 17px;
  border-radius:28px;
  color:#fff;
  border:1px solid rgba(187,133,255,.36);
  background:
    radial-gradient(circle at 50% -10%,rgba(132,65,239,.27),transparent 38%),
    radial-gradient(circle at 100% 50%,rgba(222,72,130,.12),transparent 40%),
    linear-gradient(160deg,#171326,#0e101a);
  box-shadow:
    0 30px 80px rgba(0,0,0,.65),
    inset 0 1px 0 rgba(255,255,255,.09);
  transform:scale(.94) translateY(20px);
  transition:.3s cubic-bezier(.2,.9,.25,1.08);
}

.zqOverlay.show .zqPanel{
  transform:none;
}

.zqPanel::-webkit-scrollbar{
  display:none;
}

.zqClose{
  position:absolute;
  top:12px;
  left:12px;
  width:38px;
  height:38px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:50%;
  color:#fff;
  background:rgba(255,255,255,.08);
  font-size:24px;
  font-family:inherit;
}

.zqHeader{
  text-align:center;
  padding:4px 42px 16px;
}

.zqHeaderIcon{
  width:63px;
  height:63px;
  margin:0 auto 8px;
  display:grid;
  place-items:center;
  border-radius:21px;
  font-size:32px;
  background:
    linear-gradient(145deg,#7645d7,#342168);
  box-shadow:
    0 8px 24px rgba(102,53,197,.3),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.zqHeader h2{
  margin:0;
  font-size:23px;
  font-weight:950;
}

.zqHeader p{
  margin:5px 0 0;
  color:rgba(255,255,255,.55);
  font-size:10px;
}


/* LOCKED */

.zqLocked{
  padding:29px 17px;
  text-align:center;
  border-radius:22px;
  border:1px solid rgba(255,191,83,.17);
  background:rgba(255,255,255,.035);
}

.zqLockIcon{
  width:72px;
  height:72px;
  margin:0 auto 13px;
  display:grid;
  place-items:center;
  border-radius:24px;
  font-size:34px;
  background:
    linear-gradient(145deg,#3c294c,#1b1729);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09);
}

.zqLocked h3{
  margin:0 0 8px;
  color:#ffe3a1;
  font-size:18px;
}

.zqLocked p{
  margin:0 auto;
  max-width:330px;
  color:rgba(255,255,255,.62);
  font-size:11px;
  line-height:1.8;
}

.zqLockedNote{
  margin-top:17px;
  color:#c8a6ff;
  font-size:9px;
}


/* SUBJECTS */

.zqSectionTitle{
  margin:3px 2px 11px;
  color:rgba(255,255,255,.65);
  font-size:10px;
}

.zqSubjects{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.zqSubject{
  min-height:112px;
  padding:13px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid rgba(180,130,255,.19);
  border-radius:20px;
  color:#fff;
  cursor:pointer;
  font-family:inherit;
  background:
    radial-gradient(circle at 50% 0%,rgba(148,84,239,.15),transparent 48%),
    rgba(255,255,255,.035);
  transition:.2s ease;
}

.zqSubject:active{
  transform:scale(.97);
}

.zqSubjectIcon{
  width:47px;
  height:47px;
  display:grid;
  place-items:center;
  border-radius:15px;
  font-size:24px;
  background:
    linear-gradient(145deg,#5e378e,#292044);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}

.zqSubject strong{
  font-size:11px;
  line-height:1.35;
}

.zqSubject small{
  color:#c5a5f6;
  font-size:8px;
}


/* QUIZ LIST */

.zqBack{
  width:max-content;
  margin:0 0 12px auto;
  padding:7px 12px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  color:#fff;
  background:rgba(255,255,255,.05);
  font-family:inherit;
  font-size:10px;
}

.zqSubjectHead{
  margin-bottom:13px;
  text-align:center;
}

.zqSubjectHead span{
  font-size:31px;
}

.zqSubjectHead h3{
  margin:5px 0 0;
  font-size:19px;
}

.zqQuizList{
  display:flex;
  flex-direction:column;
  gap:9px;
}

.zqQuizCard{
  padding:11px;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(176,128,255,.18);
  border-radius:18px;
  background:rgba(255,255,255,.04);
}

.zqQuizNumber{
  width:39px;
  height:39px;
  flex:0 0 39px;
  display:grid;
  place-items:center;
  border-radius:13px;
  color:#e9d9ff;
  background:#342451;
  font-size:11px;
  font-weight:900;
}

.zqQuizInfo{
  flex:1;
  min-width:0;
  text-align:right;
}

.zqQuizInfo strong{
  display:block;
  font-size:11px;
}

.zqQuizInfo small{
  display:block;
  margin-top:3px;
  color:rgba(255,255,255,.48);
  font-size:8px;
}

.zqStart{
  min-width:106px;
  min-height:42px;
  padding:7px 9px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  border-radius:13px;
  color:#fff;
  text-decoration:none;
  text-align:center;
  background:
    linear-gradient(135deg,#7846da,#b13d94);
  box-shadow:0 5px 14px rgba(92,44,173,.24);
  font-size:8.5px;
  font-weight:900;
}

.zqPlay{
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#392052;
  background:#fff;
  font-size:9px;
}

.zqEmpty{
  padding:28px 15px;
  border-radius:19px;
  text-align:center;
  color:rgba(255,255,255,.55);
  background:rgba(255,255,255,.035);
  font-size:11px;
}


/* ==========================================================
   ADMIN QUIZ CENTER
   ========================================================== */

.zqAdminLauncher{
  position:fixed;
  z-index:1100000;
  right:12px;
  bottom:82px;
  display:none;
  min-height:46px;
  padding:8px 13px;
  align-items:center;
  gap:7px;
  border:1px solid rgba(185,132,255,.45);
  border-radius:15px;
  color:#fff;
  font-family:inherit;
  background:linear-gradient(145deg,#5a318e,#261b3d);
  box-shadow:0 8px 25px rgba(0,0,0,.35);
}

.zqAdminLauncher.show{
  display:flex;
}

.zqAdminOverlay{
  position:fixed;
  inset:0;
  z-index:1500000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  background:rgba(4,4,10,.9);
  backdrop-filter:blur(13px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.zqAdminOverlay.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.zqAdminPanel{
  position:relative;
  width:min(96vw,650px);
  max-height:92dvh;
  overflow:auto;
  direction:rtl;
  padding:20px 14px;
  border-radius:25px;
  color:#fff;
  border:1px solid rgba(170,116,255,.35);
  background:#12101c;
}

.zqAdminPanel h2{
  margin:0 0 15px;
  font-size:20px;
}

.zqAdminClose{
  position:absolute;
  top:11px;
  left:11px;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  color:#fff;
  background:#2a2437;
  font-size:22px;
}

.zqAdminStatus{
  margin-bottom:13px;
  padding:13px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-radius:17px;
  background:#1d1928;
}

.zqAdminStatus strong{
  display:block;
  font-size:12px;
}

.zqAdminStatus small{
  color:rgba(255,255,255,.5);
  font-size:8px;
}

.zqToggle{
  min-width:90px;
  padding:9px;
  border:0;
  border-radius:12px;
  color:#fff;
  font-family:inherit;
  font-weight:900;
}

.zqToggle.on{
  background:#198754;
}

.zqToggle.off{
  background:#a42c3c;
}

.zqAdminBlock{
  margin-top:11px;
  padding:12px;
  border-radius:18px;
  background:#191622;
}

.zqAdminBlock h3{
  margin:0 0 10px;
  font-size:13px;
}

.zqAdminForm{
  display:grid;
  grid-template-columns:1fr 85px auto;
  gap:6px;
}

.zqAdminForm.quiz{
  grid-template-columns:1fr 1.5fr auto;
}

.zqAdminInput,
.zqAdminSelect{
  min-width:0;
  padding:10px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:11px;
  outline:none;
  color:#fff;
  font-family:inherit;
  background:#25202f;
}

.zqAdminAdd{
  padding:9px 12px;
  border:0;
  border-radius:11px;
  color:#fff;
  background:#6840a4;
  font-family:inherit;
  font-weight:900;
}

.zqAdminRows{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.zqAdminRow{
  padding:9px;
  display:flex;
  align-items:center;
  gap:7px;
  border-radius:12px;
  background:#24202e;
}

.zqAdminRowInfo{
  flex:1;
  min-width:0;
}

.zqAdminRowInfo strong{
  display:block;
  font-size:10px;
}

.zqAdminRowInfo small{
  display:block;
  margin-top:2px;
  overflow:hidden;
  text-overflow:ellipsis;
  color:rgba(255,255,255,.43);
  font-size:7px;
}

.zqMiniBtn{
  padding:7px 8px;
  border:0;
  border-radius:9px;
  color:#fff;
  font-family:inherit;
  font-size:8px;
  background:#393144;
}

.zqMiniBtn.hide{
  background:#74501f;
}

.zqMiniBtn.delete{
  background:#842d3a;
}

.zqAdminHint{
  margin-top:9px;
  color:rgba(255,255,255,.4);
  font-size:8px;
  line-height:1.6;
}

@media(max-width:430px){

  .zqSubjects{
    grid-template-columns:1fr;
  }

  .zqQuizCard{
    flex-wrap:wrap;
  }

  .zqStart{
    width:100%;
  }

  .zqAdminForm,
  .zqAdminForm.quiz{
    grid-template-columns:1fr;
  }

}


/* ==========================================================
   QUIZ ADMIN — EMBEDDED INSIDE ORIGINAL ADMIN PANEL
   ========================================================== */

/* إلغاء الزر العائم نهائياً */
#zqAdminLauncher,
.zqAdminLauncher,
.zqAdminLauncher.show{
  display:none !important;
}


/* تبويب الكويزات */
#adminQuizTab{
  position:relative;
}

#adminQuizTab::after{
  content:"";
  width:6px;
  height:6px;
  position:absolute;
  top:8px;
  left:8px;
  border-radius:50%;
  background:#b578ff;
  box-shadow:0 0 8px rgba(181,120,255,.8);
}


/* اللوحة داخل إدارة المحتوى */
.zqEmbeddedAdminPanel{
  width:100%;
  margin-top:18px;
  direction:rtl;
  animation:zqEmbeddedIn .22s ease;
}

@keyframes zqEmbeddedIn{
  from{
    opacity:0;
    transform:translateY(7px);
  }
  to{
    opacity:1;
    transform:none;
  }
}

.zqEmbeddedHead{
  margin-bottom:12px;
  padding:16px;
  border:1px solid rgba(166,111,255,.20);
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0%,
      rgba(128,66,219,.18),
      transparent 45%),
    rgba(16,25,42,.68);
}

.zqEmbeddedHead small{
  display:block;
  margin-bottom:3px;
  color:#a88bcf;
  font-size:9px;
}

.zqEmbeddedHead h2{
  margin:0;
  color:#fff;
  font-size:20px;
}

.zqEmbeddedLoading{
  padding:30px 15px;
  text-align:center;
  border:1px solid rgba(255,255,255,.07);
  border-radius:18px;
  color:rgba(255,255,255,.65);
  background:rgba(255,255,255,.025);
}


/* داخل اللوحة لا نحتاج Panel النافذة */
#adminQuizPanel .zqAdminStatus,
#adminQuizPanel .zqAdminBlock{
  border:1px solid rgba(255,255,255,.055);
}


/* الهاتف */
@media(max-width:520px){

  #adminQuizTab{
    font-size:14px !important;
  }

  .zqEmbeddedAdminPanel{
    margin-top:14px;
  }

}


/* ==========================================================
   ZQ PROFESSIONAL ICON SYSTEM V1
   ========================================================== */

.zqProIcon{
  width:58px;
  height:58px;
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border-radius:18px;
  vertical-align:middle;

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255,255,255,.17),
      transparent 28%
    ),
    linear-gradient(
      145deg,
      rgba(118,61,211,.92),
      rgba(52,27,101,.96)
    );

  border:1px solid rgba(197,153,255,.22);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    inset 0 -12px 24px rgba(25,8,53,.18),
    0 12px 30px rgba(61,22,120,.25),
    0 0 24px rgba(130,68,220,.12);
}

.zqProIcon::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  pointer-events:none;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.18),
      transparent 35%,
      transparent 70%,
      rgba(178,115,255,.08)
    );
}

.zqProIcon svg{
  position:relative;
  z-index:2;
  width:72%;
  height:72%;
  overflow:visible;
  filter:drop-shadow(0 3px 5px rgba(0,0,0,.28));
}


/* GAMEPAD */
.zqGameIcon{
  width:78px;
  height:78px;
  border-radius:23px;

  background:
    radial-gradient(
      circle at 27% 18%,
      rgba(255,255,255,.20),
      transparent 28%
    ),
    linear-gradient(
      145deg,
      #7941dc,
      #4a2097 52%,
      #2e145f
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 16px 36px rgba(81,31,165,.32),
    0 0 35px rgba(129,71,230,.16);
}

.zqBrainSpark{
  position:absolute;
  z-index:4;
  top:-7px;
  right:-7px;

  width:28px;
  height:28px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:10px;

  color:#ffd96c;

  background:
    linear-gradient(
      145deg,
      #3c245f,
      #241438
    );

  border:1px solid rgba(255,216,104,.35);

  box-shadow:
    0 5px 14px rgba(0,0,0,.35),
    0 0 12px rgba(255,206,82,.12);
}

.zqBrainSpark svg{
  width:18px;
  height:18px;
  filter:none;
}


/* ECONOMY */
.zqEconomyIcon{
  background:
    radial-gradient(
      circle at 24% 20%,
      rgba(80,200,255,.22),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      #263d75,
      #2b2465 55%,
      #21163f
    );

  border-color:rgba(97,193,255,.23);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 30px rgba(26,80,151,.22),
    0 0 22px rgba(65,160,255,.09);
}


/* LAW */
.zqLawIcon{
  background:
    radial-gradient(
      circle at 25% 18%,
      rgba(255,223,118,.18),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #5c4120,
      #382646 54%,
      #241735
    );

  border-color:rgba(244,198,91,.25);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 30px rgba(122,79,20,.18),
    0 0 20px rgba(238,181,60,.08);
}


/* HISTORY */
.zqHistoryIcon{
  background:
    radial-gradient(
      circle at 25% 18%,
      rgba(93,208,255,.20),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #234c78,
      #352467 56%,
      #21173e
    );

  border-color:rgba(103,192,255,.22);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 30px rgba(29,88,159,.20),
    0 0 22px rgba(77,155,255,.09);
}


/* العنصر الذي كان Emoji */
.zqIconUpgraded{
  background:none !important;
  font-size:0 !important;
}


/* ==========================================================
   PLAY BUTTON
   ========================================================== */

.zqPlayPro{
  width:38px;
  height:38px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border-radius:50%;

  filter:
    drop-shadow(0 5px 10px rgba(0,0,0,.20))
    drop-shadow(0 0 8px rgba(255,255,255,.10));
}

.zqPlayPro svg{
  width:100%;
  height:100%;
}

.zqPlayHolder{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
}

.zqProStartButton{
  position:relative;
  overflow:hidden;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 8px 20px rgba(132,51,214,.18);
}

.zqProStartButton::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:-45%;
  width:35%;

  pointer-events:none;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.13),
      transparent
    );

  transform:skewX(-18deg);

  animation:zqPlayShine 4.5s ease-in-out infinite;
}

@keyframes zqPlayShine{
  0%,70%{
    left:-45%;
  }
  88%,100%{
    left:125%;
  }
}


/* ==========================================================
   QUIZ NUMBER BADGE — 01 / 02 / 03
   ========================================================== */

.zqQuizItem [class*="number"],
.zqQuizItem [class*="index"],
.zqQuizCard [class*="number"],
.zqQuizCard [class*="index"]{
  position:relative;
  overflow:hidden;

  border:1px solid rgba(174,113,255,.18);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255,255,255,.12),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      rgba(102,54,174,.70),
      rgba(54,27,101,.86)
    ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 8px 18px rgba(48,17,94,.18);
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media(max-width:520px){

  .zqProIcon{
    width:54px;
    height:54px;
    border-radius:17px;
  }

  .zqGameIcon{
    width:74px;
    height:74px;
    border-radius:22px;
  }

  .zqPlayPro{
    width:36px;
    height:36px;
  }

}

/* =====================================================
   QUIZ ADMIN LAUNCHER — PREMIUM TOP POSITION
   ===================================================== */

#zqAdminLauncher.zqAdminLauncher{
  position:fixed !important;

  /* أعلى الصفحة بجانب هوية الأستاذ */
  top:108px !important;
  right:118px !important;
  left:auto !important;
  bottom:auto !important;

  width:auto !important;
  min-width:0 !important;
  height:48px !important;

  padding:0 15px !important;
  margin:0 !important;

  display:none;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;

  border-radius:16px !important;

  border:1px solid rgba(226,181,86,.48) !important;

  background:
    linear-gradient(
      135deg,
      rgba(31,42,60,.97),
      rgba(13,24,42,.98)
    ) !important;

  color:#f5d477 !important;

  font-family:inherit !important;
  font-size:13px !important;
  font-weight:800 !important;
  line-height:1 !important;

  box-shadow:
    0 8px 25px rgba(0,0,0,.30),
    0 0 18px rgba(218,168,65,.10),
    inset 0 1px 0 rgba(255,255,255,.09) !important;

  backdrop-filter:blur(16px) !important;
  -webkit-backdrop-filter:blur(16px) !important;

  cursor:pointer !important;

  z-index:9997 !important;

  transform:none !important;

  transition:
    transform .22s ease,
    border-color .22s ease,
    box-shadow .22s ease !important;
}

/* يظهر فقط عندما JS يضيف show */
#zqAdminLauncher.zqAdminLauncher.show{
  display:flex !important;
}

#zqAdminLauncher.zqAdminLauncher:hover{
  transform:translateY(-2px) !important;

  border-color:rgba(245,207,116,.78) !important;

  box-shadow:
    0 11px 30px rgba(0,0,0,.35),
    0 0 22px rgba(218,168,65,.17),
    inset 0 1px 0 rgba(255,255,255,.12) !important;
}

#zqAdminLauncher.zqAdminLauncher:active{
  transform:scale(.96) !important;
}

/* النقطة الصغيرة التي تدل على وضع المشرف */
#zqAdminLauncher.zqAdminLauncher::before{
  content:"";
  width:7px;
  height:7px;
  flex:0 0 7px;

  border-radius:50%;

  background:#69e59b;

  box-shadow:
    0 0 0 3px rgba(105,229,155,.10),
    0 0 10px rgba(105,229,155,.65);
}

/* هاتف صغير */
@media(max-width:600px){

  #zqAdminLauncher.zqAdminLauncher{
    top:105px !important;
    right:104px !important;

    height:44px !important;

    padding:0 12px !important;

    border-radius:14px !important;

    font-size:12px !important;
  }
}

/* شاشات ضيقة جداً */
@media(max-width:390px){

  #zqAdminLauncher.zqAdminLauncher{
    right:91px !important;
    padding:0 10px !important;
    font-size:11px !important;
  }
}


/* =========================================================
   STUDENT QUIZ BUTTON — UNDER INSTALL BUTTON
   ========================================================= */

.zqStudentTopPosition{
  position:fixed !important;

  right:auto !important;
  bottom:auto !important;

  z-index:950 !important;

  width:auto !important;
  min-width:128px !important;
  max-width:165px !important;

  padding:12px 16px !important;

  border-radius:20px !important;

  background:
    linear-gradient(
      145deg,
      rgba(34,28,58,.96),
      rgba(48,24,70,.96)
    ) !important;

  border:1px solid rgba(232,190,91,.48) !important;

  box-shadow:
    0 12px 30px rgba(0,0,0,.38),
    0 0 20px rgba(119,66,190,.18),
    inset 0 1px 0 rgba(255,255,255,.08) !important;

  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);

  transform:none !important;
  margin:0 !important;
}


/* النقطة الخضراء */

.zqStudentTopPosition::after{
  content:"";
  position:absolute;

  width:9px;
  height:9px;

  top:10px;
  right:10px;

  border-radius:50%;

  background:#57e6a3;

  box-shadow:
    0 0 0 4px rgba(87,230,163,.10),
    0 0 12px rgba(87,230,163,.8);

  animation:zqStudentOnline 1.8s ease-in-out infinite;
}


@keyframes zqStudentOnline{

  0%,100%{
    opacity:1;
    transform:scale(1);
  }

  50%{
    opacity:.55;
    transform:scale(.78);
  }

}


/* الهاتف */

@media(max-width:600px){

  .zqStudentTopPosition{
    min-width:118px !important;
    max-width:150px !important;

    padding:10px 14px !important;

    border-radius:18px !important;
  }

}

/* ===== FINAL STUDENT QUIZ POSITION UNDER INSTALL ===== */
.zqStudentTopPosition{
  position:fixed !important;
  z-index:9998 !important;
  width:72px !important;
  min-width:72px !important;
  height:58px !important;
  padding:7px 6px !important;
  border-radius:18px !important;

  background:
    radial-gradient(circle at 75% 20%,rgba(87,255,185,.18),transparent 30%),
    linear-gradient(145deg,#172236,#0d1727) !important;

  border:1px solid rgba(220,181,92,.65) !important;
  box-shadow:
    0 8px 25px rgba(0,0,0,.38),
    0 0 18px rgba(218,177,79,.10),
    inset 0 1px 0 rgba(255,255,255,.08) !important;

  color:#f3d27d !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1.15 !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:2px !important;
  margin:0 !important;
  transform:none !important;
}

.zqStudentTopPosition::after{
  content:"";
  position:absolute;
  top:8px;
  right:8px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#55e7a4;
  box-shadow:0 0 10px #55e7a4;
}

.zqStudentTopPosition:hover,
.zqStudentTopPosition:active{
  transform:scale(.97) !important;
}

/* لا نلمس زر المشرف */
#zqAdminLauncher{
  position:initial;
}


/* ===== CLEAN QUIZ UNDER INSTALL ===== */

.zqQuizUnderInstall{
  position:fixed !important;

  width:86px !important;
  min-width:86px !important;
  height:58px !important;

  margin:0 !important;
  padding:6px 8px !important;

  z-index:99999 !important;

  border-radius:18px !important;

  border:
    1px solid rgba(218,177,79,.65) !important;

  background:
    radial-gradient(
      circle at 82% 18%,
      rgba(63,255,174,.16),
      transparent 27%
    ),
    linear-gradient(
      145deg,
      #172438,
      #0c1728
    ) !important;

  box-shadow:
    0 10px 28px rgba(0,0,0,.45),
    0 0 16px rgba(218,177,79,.12),
    inset 0 1px 0 rgba(255,255,255,.08)
    !important;

  color:#f1d079 !important;

  font-size:13px !important;
  font-weight:900 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;

  transform:none !important;
}

.zqQuizUnderInstall::after{
  content:"";

  width:7px;
  height:7px;

  position:absolute;

  top:7px;
  right:7px;

  border-radius:50%;

  background:#4de5a0;

  box-shadow:
    0 0 9px #4de5a0;
}

/* حماية زر المشرف */
#zqAdminLauncher,
.zqAdminLauncher{
  transform:none;
}


/* =========================================================
   FINAL STUDENT QUIZ BUTTON
   تحت زر التثبيت
   ========================================================= */

#zqBtn.zqStudentInstallQuiz{
  position:fixed !important;

  width:142px !important;
  min-width:142px !important;
  height:64px !important;

  padding:8px 13px !important;

  z-index:9998 !important;

  border-radius:19px !important;

  border:1px solid rgba(218,177,83,.62) !important;

  background:
    radial-gradient(
      circle at 20% 18%,
      rgba(132,72,220,.32),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(28,21,51,.97),
      rgba(11,18,34,.98)
    ) !important;

  box-shadow:
    0 9px 28px rgba(0,0,0,.36),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 18px rgba(125,70,200,.13) !important;

  transform:none !important;
  margin:0 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  overflow:visible !important;
}

/* نقطة الحالة */
#zqBtn.zqStudentInstallQuiz::after{
  content:"";
  position:absolute;

  width:9px;
  height:9px;

  top:8px;
  left:9px;

  border-radius:50%;

  background:#49e79a;

  box-shadow:
    0 0 0 4px rgba(73,231,154,.10),
    0 0 11px rgba(73,231,154,.9);

  animation:zqStudentLivePulse 1.8s ease-in-out infinite;
}

@keyframes zqStudentLivePulse{
  0%,100%{
    opacity:1;
    transform:scale(1);
  }
  50%{
    opacity:.65;
    transform:scale(.78);
  }
}

/* منع أي CSS قديم من تغيير مكانه */
#zqBtn.zqStudentInstallQuiz.zqBtn{
  right:auto !important;
  bottom:auto !important;
}

/* الهاتف الصغير */
@media(max-width:430px){
  #zqBtn.zqStudentInstallQuiz{
    width:132px !important;
    min-width:132px !important;
    height:60px !important;
    border-radius:18px !important;
  }
}


/* =========================================================
   QUIZ BUTTON — COMPACT DOCK UNDER INSTALL
   ========================================================= */

#zqInstallQuizDock{
  position:absolute !important;

  /*
   * زر التثبيت هو أول زر في جهة اليسار.
   * البطاقة تظهر تحته مباشرة.
   */
  left:0 !important;
  top:calc(100% + 8px) !important;

  width:112px !important;
  height:48px !important;

  z-index:900 !important;

  pointer-events:none;
}

#zqBtn.zqDockedQuizBtn{
  position:relative !important;

  top:auto !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;

  width:112px !important;
  min-width:112px !important;
  max-width:112px !important;

  height:48px !important;
  min-height:48px !important;

  margin:0 !important;
  padding:5px 7px !important;

  border-radius:15px !important;

  border:1px solid rgba(221,180,84,.52) !important;

  background:
    radial-gradient(
      circle at 12% 15%,
      rgba(112,72,218,.25),
      transparent 40%
    ),
    linear-gradient(
      135deg,
      rgba(24,25,48,.98),
      rgba(10,18,34,.99)
    ) !important;

  box-shadow:
    0 7px 18px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 12px rgba(211,166,69,.08) !important;

  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:center !important;

  gap:7px !important;

  overflow:visible !important;

  transform:none !important;

  pointer-events:auto !important;

  color:#fff !important;

  cursor:pointer;
}

/* الأيقونة الجديدة */
.zqPremiumQuizIcon{
  width:31px;
  height:31px;

  flex:0 0 31px;

  display:flex;
  align-items:center;
  justify-content:center;

  filter:
    drop-shadow(0 3px 6px rgba(0,0,0,.35))
    drop-shadow(0 0 5px rgba(222,177,71,.18));
}

.zqPremiumQuizIcon svg{
  width:100%;
  height:100%;
  overflow:visible;
}

/* لمعان الأيقونة */
.zqQuizSpark{
  transform-origin:51px 9px;
  animation:zqQuizSpark 2.2s ease-in-out infinite;
}

@keyframes zqQuizSpark{
  0%,100%{
    opacity:.45;
    transform:scale(.75);
  }

  50%{
    opacity:1;
    transform:scale(1.15);
  }
}

/* النص */
.zqDockText{
  display:flex;
  flex-direction:column;

  align-items:flex-start;
  justify-content:center;

  line-height:1.05;
}

.zqDockText strong{
  font-size:13px !important;
  font-weight:900 !important;

  color:#fff5d2 !important;

  white-space:nowrap;
}

.zqDockText small{
  margin-top:4px;

  font-size:8px !important;
  font-weight:600 !important;

  color:rgba(218,224,238,.62) !important;

  white-space:nowrap;
}

/* النقطة الخضراء */
.zqDockStatus{
  position:absolute;

  width:7px;
  height:7px;

  top:5px;
  left:5px;

  border-radius:50%;

  background:#50e8a1;

  box-shadow:
    0 0 0 3px rgba(80,232,161,.10),
    0 0 8px rgba(80,232,161,.75);

  animation:zqDockPulse 1.8s ease-in-out infinite;
}

@keyframes zqDockPulse{
  50%{
    opacity:.55;
    transform:scale(.78);
  }
}

/* إلغاء النقطة القديمة */
#zqBtn.zqDockedQuizBtn::after,
#zqBtn.zqDockedQuizBtn::before{
  display:none !important;
  content:none !important;
}

/* ضغط الزر */
#zqBtn.zqDockedQuizBtn:active{
  transform:scale(.96) !important;
}

/* هاتف صغير */
@media(max-width:390px){

  #zqInstallQuizDock{
    width:104px !important;
  }

  #zqBtn.zqDockedQuizBtn{
    width:104px !important;
    min-width:104px !important;
  }

  .zqPremiumQuizIcon{
    width:28px;
    height:28px;
    flex-basis:28px;
  }

  .zqDockText strong{
    font-size:12px !important;
  }
}


/* خفض زر الكويزات قليلاً */
#zqInstallQuizDock{
  top:calc(100% + 16px) !important;
}


/* ===== QUIZ IMAGE + LIVE STATUS DOT ===== */

/* استعمال التصميم المرفوع كواجهة للزر */
#zqBtn{
  background-image:url("https://i.ibb.co/ZzvmT6VM/Polish.png") !important;
  background-size:100% 100% !important;
  background-position:center !important;
  background-repeat:no-repeat !important;

  color:transparent !important;
  overflow:visible !important;
}

/* إخفاء المحتوى القديم داخل الزر */
#zqBtn > *{
  opacity:0 !important;
  pointer-events:none !important;
}

/* النقطة */
#zqBtn::before{
  content:"" !important;

  position:absolute !important;
  top:8px !important;
  left:8px !important;

  width:11px !important;
  height:11px !important;
  border-radius:50% !important;

  z-index:20 !important;

  background:#ff334d !important;
  border:2px solid rgba(255,255,255,.92) !important;

  box-shadow:
    0 0 5px rgba(255,51,77,.95),
    0 0 12px rgba(255,51,77,.75),
    0 0 20px rgba(255,51,77,.40) !important;

  transition:
    background .25s ease,
    box-shadow .25s ease,
    transform .25s ease !important;
}

/* تشغيل */
#zqBtn.zqQuizOnline::before{
  background:#28f59a !important;

  box-shadow:
    0 0 5px rgba(40,245,154,1),
    0 0 12px rgba(40,245,154,.9),
    0 0 22px rgba(40,245,154,.55) !important;

  animation:zqStatusPulse 1.8s ease-in-out infinite;
}

/* إيقاف */
#zqBtn.zqQuizOffline::before{
  background:#ff334d !important;

  box-shadow:
    0 0 5px rgba(255,51,77,1),
    0 0 12px rgba(255,51,77,.85),
    0 0 22px rgba(255,51,77,.50) !important;
}

@keyframes zqStatusPulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.18)}
}


/* ===== QUIZ LOCAL PREMIUM BUTTON ===== */
#zqBtn{
  background-image:url("./assets/quiz-button.png") !important;
  background-size:100% 100% !important;
  background-position:center !important;
  background-repeat:no-repeat !important;

  width:192px !important;
  height:84px !important;

  padding:0 !important;
  border:0 !important;
  border-radius:22px !important;

  overflow:visible !important;
}

/* نخفي التصميم القديم فقط */
#zqBtn > *{
  opacity:0 !important;
  visibility:hidden !important;
}

/* نقطة الحالة */
#zqBtn::before{
  content:"" !important;
  position:absolute !important;

  top:9px !important;
  left:10px !important;

  width:12px !important;
  height:12px !important;

  border-radius:50% !important;
  z-index:999 !important;

  transition:.25s ease !important;
}

/* 🟢 الكويز مفتوح */
#zqBtn.zqQuizOnline::before{
  background:#27f59a !important;
  border:2px solid #c8ffe7 !important;

  box-shadow:
    0 0 5px #27f59a,
    0 0 11px #27f59a,
    0 0 19px rgba(39,245,154,.65) !important;

  animation:zqLivePulse 1.7s ease-in-out infinite !important;
}

/* 🔴 الكويز مغلق */
#zqBtn.zqQuizOffline::before{
  background:#ff304f !important;
  border:2px solid #ffd1d8 !important;

  box-shadow:
    0 0 5px #ff304f,
    0 0 11px #ff304f,
    0 0 19px rgba(255,48,79,.65) !important;

  animation:none !important;
}

@keyframes zqLivePulse{
  0%,100%{
    transform:scale(1);
    opacity:1;
  }
  50%{
    transform:scale(1.25);
    opacity:.78;
  }
}


/* ===== QUIZ BUTTON FINAL IMAGE FIX ===== */

#zqBtn.zqDockedQuizBtn{
  background-image:url("./assets/quiz-button.png") !important;
  background-size:100% 100% !important;
  background-position:center !important;
  background-repeat:no-repeat !important;

  width:112px !important;
  min-width:112px !important;
  height:48px !important;

  padding:0 !important;
  border:0 !important;
  box-shadow:none !important;

  color:transparent !important;
  overflow:visible !important;
}

/* إخفاء المحتوى القديم فقط */
#zqBtn.zqDockedQuizBtn > *{
  opacity:0 !important;
}

/* نقطة حالة الكويز */
#zqBtn.zqDockedQuizBtn::after{
  content:"" !important;
  position:absolute !important;

  top:7px !important;
  left:7px !important;

  width:8px !important;
  height:8px !important;
  border-radius:50% !important;

  background:#ff334d !important;
  box-shadow:
    0 0 5px #ff334d,
    0 0 10px rgba(255,51,77,.85) !important;

  z-index:9999 !important;
  opacity:1 !important;
}

/* عند تشغيل الكويز */
#zqBtn.zqDockedQuizBtn.zqQuizLive::after,
#zqBtn.zqDockedQuizBtn.quiz-enabled::after,
#zqBtn.zqDockedQuizBtn[data-enabled="true"]::after{
  background:#2cff91 !important;
  box-shadow:
    0 0 5px #2cff91,
    0 0 11px rgba(44,255,145,.9) !important;
}


/* ===== QUIZ LIVE DOT FINAL ===== */

#zqBtn.zqDockedQuizBtn{
  overflow:visible !important;
}

/* النقطة الافتراضية: الكويز متوقف */
#zqBtn.zqDockedQuizBtn::before{
  content:"" !important;
  display:block !important;
  position:absolute !important;

  top:5px !important;
  left:5px !important;

  width:9px !important;
  height:9px !important;
  border-radius:50% !important;

  background:#ff304f !important;

  box-shadow:
    0 0 4px #ff304f,
    0 0 9px #ff304f,
    0 0 15px rgba(255,48,79,.75) !important;

  opacity:1 !important;
  visibility:visible !important;
  z-index:99999 !important;

  pointer-events:none !important;
}

/* عند تشغيل الكويز */
#zqBtn.zqDockedQuizBtn.zqQuizLive::before,
#zqBtn.zqDockedQuizBtn.quiz-enabled::before,
#zqBtn.zqDockedQuizBtn[data-enabled="true"]::before,
#zqBtn.zqDockedQuizBtn[data-status="on"]::before{
  background:#24f58a !important;

  box-shadow:
    0 0 4px #24f58a,
    0 0 9px #24f58a,
    0 0 16px rgba(36,245,138,.9) !important;
}


/* ===== QUIZ BUTTON — HOME PAGE ONLY FINAL ===== */

/* افتراضياً مخفي */
#zqBtn,
#zqInstallQuizDock{
  display:none !important;
}

/* يظهر فقط عندما تكون الرئيسية هي الشاشة النشطة */
body:has(#home.screen.active) #zqBtn{
  display:flex !important;
}

body:has(#home.screen.active) #zqInstallQuizDock{
  display:block !important;
}

/* حماية إضافية: أي شاشة أخرى = إخفاء */
body:has(#subjects.screen.active) #zqBtn,
body:has(#chapters.screen.active) #zqBtn,
body:has(#sections.screen.active) #zqBtn,
body:has(#subsections.screen.active) #zqBtn,
body:has(#lessons.screen.active) #zqBtn,
body:has(#viewer.screen.active) #zqBtn,
body:has(#admin.screen.active) #zqBtn,
body:has(#subjects.screen.active) #zqInstallQuizDock,
body:has(#chapters.screen.active) #zqInstallQuizDock,
body:has(#sections.screen.active) #zqInstallQuizDock,
body:has(#subsections.screen.active) #zqInstallQuizDock,
body:has(#lessons.screen.active) #zqInstallQuizDock,
body:has(#viewer.screen.active) #zqInstallQuizDock,
body:has(#admin.screen.active) #zqInstallQuizDock{
  display:none !important;
}

/* ===== REMOVE ALL OLD STUDENT QUIZ LAUNCHERS ===== */

/* حذف كل أزرار الكويز القديمة المتكررة */
.zqStudentLauncher,
#zqStudentLauncher,
.zqLauncher,
.zqStudentTopPosition:not(#zqBtn),
.zqTopLauncher:not(#zqBtn),
.zqHeroLauncher:not(#zqBtn){
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}

/* زر المشرف العائم القديم ممنوع نهائياً */
#zqAdminLauncher{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}

/* زر الصورة الحقيقي: الرئيسية فقط */
#zqBtn{
  display:none !important;
}

body:has(#home.screen.active) #zqBtn{
  display:flex !important;
}

/* Dock كذلك لا يظهر إلا في الرئيسية */
#zqInstallQuizDock{
  display:none !important;
}

body:has(#home.screen.active) #zqInstallQuizDock{
  display:block !important;
}

/* ===== QUIZ STATUS DOT ONLY ===== */
#zqBtn::before{
  background:#ff3855 !important;
  box-shadow:0 0 8px #ff3855,0 0 16px rgba(255,56,85,.75) !important;
}

#zqBtn.zqQuizLive::before,
#zqBtn.zqQuizOnline::before,
#zqBtn[data-enabled="true"]::before,
#zqBtn[data-status="on"]::before{
  background:#35f59a !important;
  box-shadow:0 0 8px #35f59a,0 0 18px rgba(53,245,154,.85) !important;
}

/* ===== REAL QUIZ DOT ===== */
#zqBtn::before{
  background:var(--zq-dot,#ff3855) !important;
  border-color:var(--zq-dot,#ff3855) !important;
  box-shadow:
    0 0 8px var(--zq-dot,#ff3855),
    0 0 18px var(--zq-dot,#ff3855) !important;
}

/* ===== FINAL REAL QUIZ STATUS DOT ===== */
#zqBtn.zqDockedQuizBtn::after{
  background:#ff3655 !important;
  border-color:#fff !important;
  box-shadow:0 0 8px #ff3655,0 0 18px #ff3655 !important;
}

#zqBtn.zqDockedQuizBtn.zqQuizLive::after,
#zqBtn.zqDockedQuizBtn.zqQuizOnline::after,
#zqBtn.zqDockedQuizBtn.quiz-enabled::after,
#zqBtn.zqDockedQuizBtn[data-enabled="true"]::after,
#zqBtn.zqDockedQuizBtn[data-status="on"]::after{
  background:#36f59b !important;
  border-color:#fff !important;
  box-shadow:0 0 8px #36f59b,0 0 20px #36f59b !important;
}

/* ===== FINAL REAL QUIZ DOT COLOR ===== */
#zqBtn[data-real-quiz="on"]::before,
#zqBtn.zqREALON::before{
  background:#35e89a !important;
  border-color:#9affd0 !important;
  box-shadow:
    0 0 5px #35e89a,
    0 0 12px #35e89a,
    0 0 22px rgba(53,232,154,.9) !important;
}

#zqBtn[data-real-quiz="off"]::before,
#zqBtn.zqREALOFF::before{
  background:#ff365f !important;
  border-color:#ff9aad !important;
  box-shadow:
    0 0 5px #ff365f,
    0 0 12px #ff365f,
    0 0 22px rgba(255,54,95,.85) !important;
}


/* ===== QUIZ HOME STATUS DOT DISABLED ===== */
/* الحالة تُفحص عند فتح مركز الكويز، لذلك لا حاجة لمؤشر دائم */
#zqBtn::before,
#zqBtn::after,
#zqBtn.zqDockedQuizBtn::before,
#zqBtn.zqDockedQuizBtn::after{
  display:none !important;
  content:none !important;
  opacity:0 !important;
  box-shadow:none !important;
}


/* ===== QUIZ DOT PERMANENTLY DISABLED ===== */
#zqBtn.zqDockedQuizBtn::before,
#zqBtn.zqDockedQuizBtn::after{
  content:none !important;
  display:none !important;
}
