/* Here is your custom css styles. */
.toc-widget {
    max-height: 70vh;
    overflow-y: auto;
}
.katex {
    font-size: 1em !important;
}

.katex-display {
    margin: 1em 0;
    overflow-x: auto;
}
/* Monokai Theme */

pre[class*="language-"] {
    background: #272822 !important;
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
    overflow-x: auto;
}

code[class*="language-"] {
    font-family: "Fira Code", monospace;
    font-size: 14px;
    color: #f8f8f2;
}

/* Monokai 语法色 */

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #75715e;
}

.token.keyword {
    color: #f92672;
}

.token.string {
    color: #e6db74;
}

.token.function {
    color: #a6e22e;
}
    
.token.number {
    color: #ae81ff;
}

.token.boolean {
    color: #ae81ff;
}

.token.operator {
    color: #f8f8f2;
}

.token.punctuation {
    color: #f8f8f2;
}

.token.class-name {
    color: #a6e22e;
}

.token.constant {
    color: #ae81ff;
}

/* ===== Matery 首页 Banner 纯暗色遮罩（无渐变） ===== */

.bg-cover {
    position: relative;
  }
  
  /* 纯黑半透明遮罩 */
  .bg-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(58, 11, 146, 0.55);  /* 这里控制暗度 */
    z-index: 1;
    pointer-events: none;
  }
  
  /* 保证文字在上层 */
  .bg-cover > * {
    position: relative;
    z-index: 2;
  }
.bg-cover::after {
    background: none !important;
}

/* ===== Banner 头像（绝对定位居中） ===== */

.bg-cover {
    position: relative;
}

.banner-avatar {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.banner-avatar img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.subtitle,
.description {
    margin-top: -200px !important;
}

/* 下移 Matery 首页打字副标题 */
.index-cover .description.center-align {
    transform: translateY(220px) !important;
}

/* 隐藏首页 banner 按钮 */
.index-cover .cover-btns {
    display: none !important;
}

/* 修改 Hexo 全局 subtitle（首页大标题那一行） */
.index-cover .title.center-align {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: 60px !important;
    font-weight: 600 !important;
    letter-spacing: 3px;
}

/* 首页标题：强制一行 + 完美居中 */
.index-cover .title.center-align {
    white-space: nowrap !important;
    display: inline-block !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;

    display: flex;
    flex-direction: column;
    align-items: center;

    font-size: 30px;
    color: #ffffff;

    animation: bounce 3s infinite;
}

/* 关键：左右拉伸 */
.scroll-down-btn i {
    transform: scaleX(1.8);   /* 数值越大越宽 */
}

/* 整体上下浮动 */
@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(12px);
    }
}


.post-card-link{
  display:inline-block;
  text-decoration:none;
}

.post-card{
  position:relative;
  width:320px;
  height:160px;
  border-radius:14px;
  overflow:hidden;
}

.post-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;   /* 关键 */
}

.post-card-title{
  position:absolute;
  left:14px;
  bottom:10px;
  color:white;
  font-size:18px;
  font-weight:600;

  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000,
     0px  2px 6px rgba(0,0,0,0.8);
}
.post-card img{
  transition:0.4s;
}

.post-card:hover img{
  transform:scale(1.08);
}

.post-card img{
  display:block !important;
  position:absolute !important;
  top:0 !important;
  left:0 !important;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  margin:0 !important;
  padding:0 !important;
}

.post-card{
  position:relative !important;
  overflow:hidden !important;
  border-radius:14px !important;
}

.post-card img{
  pointer-events:none;
}

/* 顶栏整体透明（所有状态） */
#header,
#header nav,
#header .nav-wrapper,
.navbar-fixed,
.navbar-fixed nav,
.navbar-fixed.nav-color nav,
.navbar-fixed.nav-transparent nav {
    background: transparent !important;
}

/* 顶栏文字描边（抗背景干扰） */
nav a,
nav .brand-logo {
    color: #fff !important;
    text-shadow:
        -1px -1px 2px rgba(0,0,0,0.8),
         1px -1px 2px rgba(0,0,0,0.8),
        -1px  1px 2px rgba(0,0,0,0.8),
         1px  1px 2px rgba(0,0,0,0.8);
}

/* ===== 强制顶栏毛玻璃（无视 Matery 结构） ===== */

/* 所有可能的顶栏容器 */
#header,
#header *:not(a):not(i),
header,
header *,
nav,
nav * {
    background: transparent !important;
}

/* 真正叠一层毛玻璃 */
#header::before,
header::before,
nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

/* 修复 logo 区域被毛玻璃覆盖 */
.logo-span,
.logo-span * {
    background: transparent !important;
    box-shadow: none !important;
}

/* 防止伪元素叠到 logo 上 */
.logo-span::before {
    display: none !important;
}