/* Butterfly theme custom overrides for ksenr's blog */

/* Smooth math display scrolling */
.math-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0;
}

/* MathJax container responsive */
mjx-container[display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

mjx-container svg {
  max-width: none;
}

/* Math inline spacing */
.math-inline, span.mathjax, span.katex {
  margin: 0 0.2em;
}

/* Article body line height for better readability */
#article-container p {
  line-height: 1.9;
}

/* Footer: replace solid blue with dark gradient */
#footer {
  background-color: #1a1a2e !important;
  background-image: linear-gradient(135deg, #16213e 0%, #0f3460 100%) !important;
  background-attachment: scroll !important;
}

#footer-wrap {
  color: rgba(255, 255, 255, 0.85);
}

#footer-wrap a {
  color: rgba(255, 255, 255, 0.7);
}

/* Remove avatar hover rotation */
.avatar-img img:hover {
  transform: none !important;
}

/* Remove card-author description empty space */
.card-info .author-info__description {
  display: none;
}

/* Global floating playlist */
.aplayer.aplayer-fixed {
  z-index: 1000;
  max-width: calc(100vw - 16px);
}

.aplayer.aplayer-fixed .aplayer-list {
  max-height: min(340px, 55vh) !important;
}

.aplayer .aplayer-lrc p.music-placeholder-hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .aplayer.aplayer-fixed.aplayer-narrow {
    max-width: 66px;
  }

  .aplayer.aplayer-fixed:not(.aplayer-narrow) {
    width: calc(100vw - 16px);
  }
}
