.ad-container {
  position: fixed;
  top: 2.5rem;
  right: 10%;
  width: 10.8rem;
  height: 9.375rem;
  cursor: move;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  will-change: transform;
  max-width: 90%;
}

@media (max-width: 768px) {
  .ad-container {
    width: 8.4rem;
    height: 7.2rem;
    top: auto;
    bottom: 1rem;
    right: 50%;
    transform: translateX(50%);
  }
}

.ad-item {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.ad-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-item.active { opacity: 1; }

/* 轮播指示器样式 */
.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s ease;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1);
}

.indicator:hover {
  transform: scale(1.2);
}

.indicator.active {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
  .ad-container {
    touch-action: pan-y;
  }
}
/* 保证链接填充容器 */
a {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-container:hover {
  transform: translateY(-5px);
}

.ad-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}

.ad-close:hover {
  background: rgba(0,0,0,0.8);
}