/* ===== Ads Modal — Modern Style ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: overlayFadeIn 0.25s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ads-modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 26px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* subtle top accent bar */
.ads-modal-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.modal-close:hover {
  background: #e5e7eb;
  color: #111827;
  transform: rotate(90deg);
}

.ads-modal-content {
  text-align: center;
}

.ads-modal-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin: 6px 0 6px;
  letter-spacing: -0.01em;
}

.ads-modal-subtext {
  font-size: 0.92rem;
  color: #6b7280;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Ad slot */
.ad-placeholder {
  background: repeating-linear-gradient(
    45deg,
    #f9fafb,
    #f9fafb 10px,
    #f3f4f6 10px,
    #f3f4f6 20px
  );
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.ads-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-upgrade {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-upgrade:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

.btn-continue {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-continue:hover {
  background: #e5e7eb;
  color: #111827;
}




.promo-card {
  display: block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  padding: 20px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  margin: 4px 0 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-card::after {
  content: "Ad";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
}

.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.4);
}

.promo-icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.promo-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.promo-text {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.promo-tags {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.promo-tag {
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #fff;
}

.promo-cta {
  display: inline-block;
  background: #fff;
  color: #764ba2;
  padding: 9px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}


/* Mobile tweaks */
@media (max-width: 480px) {
  .ads-modal-box {
    padding: 24px 18px 20px;
    border-radius: 16px;
  }
  .ad-placeholder {
    min-height: 130px;
  }
}