.floating-ad-top {
  position: fixed;
  top: 80px;              /* adjust if header height is different */
  right: 20px;            /* anchored to right side */
  left: auto !important;  /* ensures it never floats left */
  z-index: 99999;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  overflow: hidden;
  width: 468px;
  height: 70px;
  padding: 5px;
  text-align: center;
  backdrop-filter: blur(6px);
  animation: fadeInAd 0.5s ease-out;
  transition: all 0.3s ease;
  max-width: calc(100vw - 40px);
}

/* ✅ Close Button */
.close-ad {
  position: absolute;
  top: 4px;
  right: 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 20px;
  transition: background 0.2s ease;
  z-index: 10;
}
.close-ad:hover {
  background: rgba(0,0,0,0.9);
}

/* ✅ Smooth Animation */
@keyframes fadeInAd {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ✅ Tablet View */
@media (max-width: 992px) {
  .floating-ad-top {
    top: 70px;
    right: 10px;
    width: 380px;
    height: 60px;
  }
}

/* ✅ Mobile View */
@media (max-width: 600px) {
  .floating-ad-top {
    top: 70px;
    right: 10px;
    left: auto !important;
    width: 90%;
    height: 60px;
    border-radius: 10px;
  }
  .close-ad {
    top: -10px;
    right: 8px;
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}