/* اختبار الثقافة العامة — واجهة منفصلة عن باقي الموقع */
.gcq-root {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: "Droid Arabic Kufi", "Segoe UI", Tahoma, sans-serif;
  direction: rtl;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.gcq-root.gcq-open {
  visibility: visible;
  opacity: 1;
}

.gcq-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.88));
  backdrop-filter: blur(8px);
}

.gcq-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 720px);
  overflow: auto;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(109, 69, 188, 0.25),
    0 24px 48px rgba(0, 0, 0, 0.45);
  color: #e2e8f0;
}

.gcq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gcq-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.gcq-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gcq-close:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.gcq-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.gcq-timer-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gcq-timer-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.gcq-timer-ring svg {
  transform: rotate(-90deg);
  width: 52px;
  height: 52px;
}

.gcq-timer-ring circle {
  fill: none;
  stroke-width: 4;
}

.gcq-timer-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.gcq-timer-fg {
  stroke: url(#gcqGrad);
  stroke-linecap: round;
  stroke-dasharray: 138;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
}

.gcq-timer-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #a5b4fc;
}

.gcq-timer-num.gcq-urgent {
  color: #fca5a5;
  animation: gcq-pulse 0.5s ease infinite alternate;
}

@keyframes gcq-pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

.gcq-progress-text {
  font-size: 0.9rem;
  color: #94a3b8;
}

.gcq-body {
  padding: 8px 20px 22px;
}

.gcq-question {
  margin: 0 0 20px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #f1f5f9;
  min-height: 3.2em;
}

.gcq-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gcq-option {
  display: block;
  width: 100%;
  text-align: right;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.98rem;
  line-height: 1.5;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
}

.gcq-option:hover:not(:disabled) {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(109, 69, 188, 0.18);
  transform: translateY(-1px);
}

.gcq-option:disabled {
  cursor: default;
}

.gcq-option.gcq-correct {
  border-color: #4ade80;
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

.gcq-option.gcq-wrong {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

.gcq-option.gcq-dim {
  opacity: 0.45;
}

.gcq-intro,
.gcq-result {
  text-align: center;
  padding: 12px 8px 8px;
}

.gcq-intro p,
.gcq-result p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.7;
}

.gcq-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  padding: 14px 28px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #6d45bc);
  color: #fff;
  box-shadow: 0 8px 24px rgba(109, 69, 188, 0.4);
  transition: transform 0.15s, box-shadow 0.2s;
}

.gcq-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(109, 69, 188, 0.5);
}

.gcq-score {
  font-size: 2rem;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 8px;
}

.gcq-hidden {
  display: none !important;
}

body.gcq-scroll-lock {
  overflow: hidden;
}

/* وضع الصفحة الكاملة (سيو) — بدون طبقة تغطية ملء الشاشة */
.gcq-root--page {
  position: relative;
  inset: auto;
  z-index: 1;
  display: block;
  padding: 0;
  visibility: visible;
  opacity: 1;
  min-height: 280px;
}

.gcq-root--page .gcq-backdrop {
  display: none;
}

.gcq-root--page .gcq-panel {
  max-width: 640px;
  margin: 0 auto;
  max-height: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.gcq-root--page .gcq-close {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
