.Card {
  display: block;
  text-decoration: none;
  color: inherit;
  will-change: opacity;
}

.Card-bg {
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: transform 0.2s ease;
  isolation: isolate;
  transform: translateY(0);
  will-change: transform;
  display: inline-block;
  width: 100%;
}

.Card-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background-color: var(--bg-color);
  border: 1.5px solid color-mix(in srgb, var(--accent-color) 15%, rgba(0, 0, 0, 0.08));
  filter: var(--user-content-filter);
  z-index: -2;
  pointer-events: none;
}

.Card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1.5px solid var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  filter: var(--user-content-filter);
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: opacity;
  z-index: -1;
  pointer-events: none;
}

@media (hover: hover) {
  .Card:hover .Card-bg {
    transform: translateY(-2px);
  }

  .Card:hover .Card-bg::after {
    opacity: 1;
  }

  .Card-bg--pending {
    transform: translateY(-2px);
  }
}

.Card:active .Card-bg {
  transform: scale(0.99);
}

.Card-bg--pending::after {
  opacity: 1;
  animation: card-glow 1.5s ease-in-out infinite;
  animation-delay: 400ms;
}

@keyframes card-glow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
