:root {
  --icon-color: #333333; 
}

@media (prefers-color-scheme: dark) {
  :root {
    --icon-color: #ffffff; 
  }
}


.md-text {
  position: relative;
  overflow: visible;
}

.hint {
  position: relative;
  padding: 0rem 1.2rem 0rem .3rem;
  display: inline-block;
  cursor: pointer;
  text-decoration: underline dashed var(--theme-link);
  text-underline-offset: 4px
}

.hint-content {
  visibility: hidden;
  width: 300px;
  background-color: #555;
  color: #fff;
  font-size: 0.9rem;
  text-align: justify;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  /*margin-left: -100px;*/
  transform: translateX(-30%);
  opacity: 0;
  transition: opacity 0.3s, visibility 0s 0.3s;
}

.hint:hover .hint-content {
  visibility: visible;
  opacity: 1;
}

.hint-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 40%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.hint-icon {
  position: absolute;
  top: 0px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
  background-size: cover;
  opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
  .hint-icon {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
  }
}


.hint:hover .hint-icon {
  opacity: 1;
}

/* 延迟消失效果 */
.hint .hint-content {
  transition-delay: 0s;
}

.hint:hover .hint-content {
  transition-delay: 0s;
}

.hint:not(:hover) .hint-content {
  transition-delay: 0.5s; /* 延迟时间 */
}

@media (max-width: 600px) {
  .hint-content {
    width: 200px; /* 在小屏幕上减小宽度 */
  }
}

/* JavaScript will add these classes as needed */
.hint-content.adjust-left {
  left: 0;
  transform: translateX(0);
}

.hint-content.adjust-right {
  left: auto;
  right: 0;
  transform: translateX(0);
}

.hint-content.adjust-left::after,
.hint-content.adjust-right::after {
  left: 10px;
}

.hint-content.adjust-right::after {
  left: auto;
  right: 10px;
}

.hint-content del {
  color: rgb(218, 218, 218);
  text-decoration: line-through rgb(218, 218, 218);

}

.hint-content s {
  color: rgb(218, 218, 218);
  /*text-decoration: line-through rgb(218, 218, 218);*/
}
