.card-widget.card-ads {
  margin: 1rem 0;
  padding: 0 !important;
}

.card-widget.card-ads .ads-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-widget.card-ads .ads-container a {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  transition: all 0.3s ease;
  padding: 12px;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 5s ease infinite;
  border-radius: 10px;
}

.card-widget.card-ads .ads-container a::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    225deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translate(-100%, 100%);
  animation: lightBeam 3s 6s infinite;
  z-index: 2;
  pointer-events: none;
}

.card-widget.card-ads .ads-container img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  position: relative;
  z-index: 1;
  margin: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes lightBeam {
  0% {
    transform: translate(-100%, 100%) rotate(45deg);
  }
  100% {
    transform: translate(50%, -50%) rotate(45deg);
  }
}

@keyframes douyinShake {
  0% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-2deg);
  }
  50% {
    transform: scale(1.05) rotate(2deg);
  }
  75% {
    transform: scale(1.1) rotate(-2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.card-widget.card-ads .ads-container a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.card-widget.card-ads .ads-container a:hover img {
  animation: douyinShake 0.8s ease-in-out;
  filter: brightness(1.1) contrast(1.1);
}

.card-widget.card-ads .ads-container a:hover::before {
  animation-duration: 1s;
}

/* 暗色模式适配 */
[data-theme="dark"] .card-widget.card-ads .ads-container a:hover {
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card-widget.card-ads .ads-container img {
  background: #121212;
}