/* popup.css */
#exit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

#exit-overlay.open {
  opacity: 1;
  visibility: visible;
}

#exit-popup {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 400px);
  padding: 2em;
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  transition: top 0.6s cubic-bezier(.25,.8,.25,1);
  z-index: 1001;
}

/* Фрактальный фон */
#exit-popup::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/fractal-pattern-transparent.png") center center / cover no-repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

/* Градиент-оверлей */
#exit-popup::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(224,240,248,0.4), rgba(255,255,224,0.4));
  mix-blend-mode: overlay;
  animation: popupGradient 8s ease infinite alternate;
  pointer-events: none;
  z-index: 1;
}

@keyframes popupGradient {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

#exit-popup.open {
  top: 20%;
}

#exit-popup h3 {
  margin-bottom: 0.5em;
  font-family: 'Lora', serif;
  position: relative;
  z-index: 2;
}

#exit-popup p {
  margin-bottom: 1em;
  color: var(--text-light);
  position: relative;
  z-index: 2;
}

#exit-popup .btn-group {
  display: flex;
  justify-content: center;
  gap: 1em;
  position: relative;
  z-index: 2;
}

#exit-popup .btn-group .btn {
  padding: 0.8em 1.6em;
  background: var(--color-accent);
  color: #000;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.3s, background 0.3s;
}
#exit-popup .btn-group .btn:hover {
  transform: scale(1.05);
  background: transparent;
  border: 2px solid #000;
}
