/* تعريف الخط Beiruti */
@font-face {
  font-family: 'Beiruti';
  src: url('Beiruti-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

/* شريط البحث */
.dssp-wrap,
.q-card,
.dssp-suggestions-list {
  font-family: 'Beiruti', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.dssp-wrap {
  margin: 12px 0 18px;
  background: #0a2531;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 8px
}

.dssp-row {
  display: flex;
  gap: 8px;
  align-items: center
}

.dssp-nowrap {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin
}

.dssp-scope,
.dssp-parent {
  flex: 0 0 120px;
  max-width: 160px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: #0c2a36;
  color: #eaf4f8;
  white-space: nowrap
}

.dssp-q {
  flex: 1 1 auto;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: #0c2a36;
  color: #eaf4f8;
  outline: none
}

.dssp-q::placeholder {
  color: #93b6c1
}

.dssp-btn {
  flex: 0 0 74px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #1abc9c;
  color: #05242d;
  font-weight: 800;
  cursor: pointer
}

.dssp-btn:active {
  transform: translateY(1px)
}

@media(max-width:480px) {

  .dssp-scope,
  .dssp-parent {
    flex-basis: 110px;
    max-width: 130px
  }

  .dssp-q {
    min-width: 140px
  }
}

/* الملخص (إجمالي النتائج) */
.dssp-summary {
  margin: 8px 2px 2px;
  color: #cfe9ef;
  font-size: 14px;
  display: none
}

.dssp-summary .dssp-total {
  font-weight: 800;
  color: #21c8ff
}

.dssp-summary .dssp-term {
  color: #bfeaf2
}

/* النتائج */
.dssp-results {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px
}

@media(min-width:680px) {
  .dssp-results {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(min-width:1024px) {
  .dssp-results {
    grid-template-columns: repeat(3, 1fr)
  }
}

/* بطاقة النتيجة - محسّنة لعرض القسم والرقم */
.dssp-item {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: #0c2a36;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  transition: border-color 0.2s ease
}

.dssp-item:hover {
  border-color: rgba(33, 200, 255, .3)
}

.dssp-idx {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #08212b;
  border: 1px solid rgba(255, 255, 255, .10);
  font-weight: 900;
  font-size: 14px;
  color: #21c8ff
}

.dssp-content {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.dssp-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  line-height: 1.3
}

.dssp-type-label {
  color: #7fb3c0;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px
}

.dssp-separator {
  color: rgba(255, 255, 255, .25);
  font-size: 10px
}

.dssp-section {
  color: #bfeaf2;
  font-weight: 700;
  font-size: 11px
}

.dssp-num-label {
  color: #9cc7d1;
  font-size: 10px
}

.dssp-link {
  color: #eaf4f8;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.5
}

.dssp-link:hover {
  color: #21c8ff
}

/* Legacy support - hide old type display */
.dssp-type {
  display: none
}

/* زر عرض المزيد أسفل الشبكة فقط عند الحاجة */
.dssp-more-wrap {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 4px
}

.dssp-more {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #103543;
  color: #eaf4f8;
  font-weight: 800
}

.dssp-more:active {
  transform: translateY(1px)
}

/* تمييز داخل الصفحة الهدف */
.dssp-hl {
  background: yellow;
  color: #111;
  padding: 0 .15em;
  border-radius: 3px
}

/* صندوق للأعضاء فقط */
.dssp-locked {
  background: #102c38;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 12px
}

.dssp-locked a {
  color: #bfeaf2
}

/* عرض سؤال MCQ داخل الصفحة */
.q-card {
  background: #0a2531;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0 18px
}

/* فرض نفس الخط على كل النصوص داخل البطاقة */
.q-card,
.q-card * {
  font-family: inherit !important;
}

/* عنوان السؤال - نفس ستايل الخيارات */
.q-text {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.7;
  color: #eaf4f8;
  margin-bottom: 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.options .option {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #0c2a36;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.options .option:hover {
  border-color: rgba(33, 200, 255, .2);
  transform: translateX(4px);
}

.options .option .key {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #08212b;
  border: 1px solid rgba(255, 255, 255, .08);
  font-weight: 800;
  flex-shrink: 0;
  font-size: 14px;
  color: #eaf4f8;
}

.options .option .opt-txt {
  flex: 1;
  word-wrap: break-word;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.7;
  color: #eaf4f8;
}

.options .option.picked {
  outline: 2px solid rgba(33, 200, 255, .45);
  background: rgba(33, 200, 255, .08);
}

.options .option.correct {
  background: rgba(46, 204, 113, .18);
  border-color: rgba(46, 204, 113, .5)
}

.options .option.correct .key {
  background: rgba(46, 204, 113, .3);
  border-color: rgba(46, 204, 113, .6);
}

.options .option.wrong {
  background: rgba(231, 76, 60, .18);
  border-color: rgba(231, 76, 60, .5)
}

.options .option.wrong .key {
  background: rgba(231, 76, 60, .3);
  border-color: rgba(231, 76, 60, .6);
}

/* الشرح */
.expl {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: #c7dce3;
  background: #07202a;
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 10px 12px;
  border-radius: 12px;
  display: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.expl.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* زر التحقق */
.dssp-check {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #1abc9c;
  color: #05242d;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dssp-check:hover {
  background: #16a085;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 188, 156, .3);
}

.dssp-check:active {
  transform: translateY(1px)
}

.dssp-check:disabled {
  background: #7fb3c0;
  cursor: not-allowed;
  transform: none;
  opacity: 0.7;
}

/* تحسين العنوان في صفحة السؤال المنفردة */
.dssp-single .entry-title,
.single-mcq_question .entry-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  color: #21c8ff;
  margin-bottom: 12px;
}

/* تحسين الاستجابة على الموبايل */
@media (max-width: 768px) {

  .q-text,
  .options .option .opt-txt,
  .expl {
    font-size: 15px;
    line-height: 1.65;
  }

  .dssp-single .entry-title {
    font-size: 17px;
  }
}

/* الحل النهائي - أعلى أولوية ممكنة */
html body .hero-title,
html body h1.hero-title,
html body .single-mcq_question .hero-title,
html body [class*="hero-title"] {
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  margin: 10px 0 !important;
}

/* توحيد الخط لكل البطاقة */
.q-card,
.q-card *,
.hero-title,
h1.hero-title {
  font-family: 'Beiruti', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* تلوين البطاقة المضغوطة / المزارة */
.dssp-item.dssp-visited {
  background: rgba(33, 200, 255, .08);
  border-color: rgba(33, 200, 255, .3);
}

.dssp-item.dssp-visited .dssp-idx {
  background: rgba(33, 200, 255, .15);
  border-color: rgba(33, 200, 255, .4);
  color: #21c8ff;
}

/* === تحسينات الخطوط النهائية (متجاوبة) === */

/* 1. العنوان: أكبر قليلاً من الخيارات */
.q-card .q-text,
.single-mcq_question .entry-title,
.dssp-single .entry-title {
  font-size: 24px !important;
  line-height: 1.5 !important;
  font-family: 'Beiruti', 'Segoe UI', Tahoma, sans-serif !important;
}

/* 2. الخيارات: أصغر قليلاً لتناسق بصري */
.q-card .options .option,
.q-card .options .option>*,
.q-card .options .option .opt-txt {
  font-size: 21px !important;
  line-height: 1.6 !important;
  font-family: 'Beiruti', 'Segoe UI', Tahoma, sans-serif !important;
}

/* 3. الموبايل: تصغير متناسق */
@media (max-width: 768px) {

  .q-card .q-text,
  .single-mcq_question .entry-title,
  .dssp-single .entry-title {
    font-size: 20px !important;
  }

  .q-card .options .option,
  .q-card .options .option>*,
  .q-card .options .option .opt-txt {
    font-size: 18px !important;
  }
}