pre.shiki {
  margin-block: 1.618rem;
}

:where(p, li):has(> code) code {
  padding-inline: 0.272rem;
  border-radius: 0.272rem;
  color: hsl(var(--blue) 100% 69%);
  background-color: hsl(var(--blue) 85% 35% / 0.1);
}

.shiki,
.shiki span {
  color: var(--shiki-light);
  background-color: var(--shiki-light-bg);
}

html.dark .shiki,
html.dark .shiki span {
  color: var(--shiki-dark);
  background-color: var(--shiki-dark-bg);
}

pre {
  padding: 1rem;
  border-radius: 0.618rem;
  overflow: hidden;
  text-wrap: wrap;

  & .copy-button {
    all: unset;
    width: 2rem;
    height: 2rem;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.618rem;
    font-weight: 500;
    border-radius: 0.272rem;
    padding: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--blue) 100% 69%);
    background-color: hsl(var(--blue) 85% 35% / 0.1);
    cursor: pointer;
    transition: color 0.25s;
    z-index: 10;

    &:hover {
      color: hsl(var(--blue) 100% 75%);
    }

    &.copied {
      animation: pulseGreen 0.5s cubic-bezier(0, 1, 0.6, 1);
    }
  }
}
