/* Full-screen overlay */
#ad-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  /* hidden initially */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.5s ease forwards;
}

/* Popup card */
#ad-popup {
  width: 400px;
  max-width: 90%;
  background: #fff;
  border-radius: 15px;
  padding: 25px 20px;
  margin-bottom: -20%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  font-family: "Arial", sans-serif;
  text-align: center;
  animation: slideUp 0.5s ease forwards;
}

/* Ad content */
#ad-popup h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #333;
}

#ad-popup p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 15px;
}

/* Timer */
#ad-timer {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff4b2b;
  margin-bottom: 15px;
}

/* Close button */
#ad-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 22px;
  background: #ff4b2b;
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  display: none;
  transition: background 0.3s ease;
}

#ad-close:hover {
  background: #ff0000;
}

/* Interactive button */
#ad-click-btn {
  display: none;
  padding: 10px 20px;
  font-size: 1rem;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}

#ad-click-btn:hover {
  background: #218838;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 480px) {
  #ad-popup {
    width: 90%;
    padding: 20px;
  }

  #ad-popup h2 {
    font-size: 1.2rem;
  }

  #ad-popup p {
    font-size: 0.9rem;
  }

  #ad-click-btn {
    font-size: 0.9rem;
    padding: 8px 15px;
  }
}

.popup-close-x {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}
