/* Footnote highlight effect */
.footnote-highlight {
  animation: highlight 1.5s ease-in-out;
}

@keyframes highlight {
  0% {
    background-color: transparent;
  }
  20% {
    background-color: rgba(255, 230, 0, 0.4);
  }
  80% {
    background-color: rgba(255, 230, 0, 0.4);
  }
  100% {
    background-color: transparent;
  }
}

/* Footnote reference style (the superscript number in the text) */
.footnote-ref {
  font-size: 0.8em;
  vertical-align: super;
  line-height: 0;
}

.footnote-ref a {
  text-decoration: none;
  padding: 0 2px;
  color: inherit;
  font-weight: bold;
}

/* Footnote list styles (the section at the bottom) */
.footnotes {
  margin-top: 3rem;
  border-top: 1px solid rgba(128, 128, 128, 0.3);
  padding-top: 1rem;
}

.footnotes ol {
  padding-left: 2em;
}

.footnotes li {
  font-size: 0.9em;
  margin-bottom: 0.8em;
  color: rgba(0, 0, 0, 0.7);
}

.footnotes li p {
  display: inline;
  margin: 0;
}

/* Back reference style (the arrow linking back to the reference) */
.footnote-backref {
  text-decoration: none;
  margin-left: 0.5em;
  font-weight: bold;
}

/* Make sure footnotes are clearly visible in both light and dark modes */
[data-theme="dark"] .footnotes {
  border-top-color: rgba(200, 200, 200, 0.3);
}

[data-theme="dark"] .footnotes li {
  color: rgba(255, 255, 255, 0.7);
}