/* ===========================================
   Lovel AI - Popup
   =========================================== */

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
}

.popup-overlay.active {
  display: flex;
  animation: popupOverlayIn 0.3s var(--ease);
}

@keyframes popupOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup-container {
  background:
    linear-gradient(180deg, rgba(255, 45, 155, 0.1), transparent 60%),
    var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 44px 38px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 45, 155, 0.12) inset,
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(255, 45, 155, 0.2);
  animation: popupIn 0.45s var(--ease-out);
  overflow: hidden;
}

.popup-container::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: var(--gradient-glow);
  pointer-events: none;
  opacity: 0.7;
}

.popup-container > * { position: relative; z-index: 1; }

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 45, 155, 0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2;
}

.popup-close:hover {
  background: rgba(255, 45, 155, 0.18);
  color: var(--text);
  transform: rotate(90deg);
}

.popup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border-radius: 18px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 45, 155, 0.5);
}

.popup-container h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.popup-container .popup-text {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 6px 20px rgba(255, 45, 155, 0.5);
  width: 100%;
  max-width: 320px;
}

.popup-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 10px 30px rgba(255, 45, 155, 0.65);
}

.popup-secondary {
  display: block;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.popup-secondary:hover { color: var(--text-secondary); }

@media (max-width: 480px) {
  .popup-container { padding: 36px 24px; }
  .popup-container h2 { font-size: 1.25rem; }
  .popup-icon { width: 56px; height: 56px; font-size: 1.4rem; }
}
