/* تنبيه عند محاولة إغلاق الصفحة دون الحفظ عبر السحابة */
.leave-challenge-unsaved-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(15, 8, 35, 0.82);
  backdrop-filter: blur(8px);
}

.leave-challenge-unsaved-overlay.is-visible {
  display: flex;
}

.leave-challenge-unsaved-box {
  max-width: 420px;
  width: 100%;
  background: linear-gradient(160deg, rgba(46, 16, 101, 0.98), rgba(30, 10, 60, 0.99));
  border: 1.5px solid rgba(168, 85, 247, 0.45);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  font-family: 'Cairo', sans-serif;
  color: #f3e8ff;
}

.leave-challenge-unsaved-box h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.leave-challenge-unsaved-box p {
  margin: 0 0 18px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(237, 233, 254, 0.92);
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  user-select: auto;
  text-shadow: none;
}

.leave-challenge-unsaved-box strong {
  color: inherit;
  font-weight: 800;
}

.leave-challenge-unsaved-dismiss {
  margin-top: 8px;
  padding: 11px 28px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.leave-challenge-unsaved-dismiss:hover {
  filter: brightness(1.08);
}
