/* 文章内链接悬停放大 */
.post-content a {
    display: inline-block !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;  /* 统一去掉下划线，而不是只在悬停时 */
}

.post-content a:hover {
    text-shadow: 0 0 10px rgba(48,169,222,0.2);
}

.highlight {
  position: relative;           /* 让伪元素相对于此定位 */
  /* background: #21252b; */
  border-radius: 5px;
  box-shadow: 0 10px 30px 0 rgba(0,0,0,0.4);
  padding-top: 30px;
  overflow: hidden;             /* 防止圆点溢出 */
}

/* ===== 分割线：渐变细线 + 左对齐图标 ===== */

.post-content hr,
.markdown-body hr {
    border: none;
    height: 2px;
    margin: 2rem 0 2rem 0;
    background: linear-gradient(90deg, transparent 1.5rem, var(--line-color) 1.5rem, var(--line-color) 40%, transparent);
    position: relative;
    opacity: 0.7;
    overflow: visible;
}

.post-content hr::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 0;                     /* 改为左对齐 */
    transform: translateY(-50%); /* 只保留垂直居中 */
    background: transparent;
    padding-right: 1rem;       /* 右侧留白，与线段隔开 */
    color: var(--sec-text-color);
    font-size: 0.9rem;
    opacity: 1.0;
    transition: all 0.3s ease;  /* 添加过渡 */
}

.post-content hr:hover::after {
    transform: translateY(-50%) translateX(8px);   /* 向右移动 */
}

/* 暗色模式适配 */

html {
    scroll-behavior: smooth;
}

/* ===== 选中文字样式 ===== */
::selection {
  background: rgba(48, 169, 222, 0.2);
  color: inherit;
}

/* ===== SVG 图标对齐 ===== */
.icon {
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}

/* 禁止选中 */
.katex,
.fold-arrow {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* ===== 行内代码样式 ===== */

/* 行内代码（非代码块内的 code） */
.post-content code:not([class]) {
    /* 背景色：极淡蓝灰 */
    background-color: transparent;
    border: 1px solid rgba(48, 94, 222, 0.3);
    color: rgba(48, 150, 222, 0.9);
    display: inline-block;
}

/* ===== 脚注返回按钮：符号替换 + 美化 ===== */

/* 方法一：替换为其他 Unicode 符号 */
.footnote-backref {
    /* 替换符号：用 content 覆盖原有文字 */
    font-size: 0;                      /* 隐藏原有文字 */
}
.footnote-backref::before {
    content: "↩︎";                      /* 替换为 ↑ */
    font-size: 1rem;                   /* 恢复字号 */
    display: inline-block;
    transition: all 0.25s ease;
}

/* 悬停效果 */
.footnote-backref:hover::before {
    transform: translateX(3px);        /* 向右滑动 */
}