 /* 并列图 */
.img-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;

}

.img-grid img {
    width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: transform 0.3s ease;
    transform-origin: center center;
    background: #f5f5f5;
}

@media (max-width: 768px) {
  .img-grid {
    grid-template-columns: 1fr;  /* 单列 */
    gap: 1rem;
  }
}

.lightbox-trigger:hover img {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    text-align: center;
    animation: lightboxFade 0.3s;
}

@keyframes lightboxFade {  
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox:target {
    display: block;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    text-decoration: none;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}


@media (max-width: 768px) {
    .lightbox img {
        max-width: 95%;
    }
    
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
    
    .lightbox-trigger:hover img {
        transform: none; /* 移动端禁用缩放效果 */
    }

    .wy-nav-content {
        overflow-x: hidden !important;  /* 新增 */
    }
}

 /* 单张图 */
.single-img-container {
    display: inline-block;
    max-width: 900px;
    margin: 2rem auto;
    text-align: center;
}

.single-img-container img {
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: 1px solid #dee2e6;

    display: block; 
    margin: 0 auto; 

    max-width: 100%; 
    height: auto; 
}

.single-img-container img.loaded {  
    opacity: 1;
}

.single-img-container:hover img {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .single-img-container {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .single-img-container:hover img {
        transform: none;
    }
}


.wy-nav-content {
    max-width: 100% !important;  
    padding: 2rem 5% !important;
    margin: 0 auto;
}

.wy-nav-content-wrap {
    margin-left: 300px !important;  
    background: white;

    transition: margin-left 0.3s ease;
}

.wy-nav-side {
    box-shadow: none;
    border-right: 1px solid #e1e4e5;
}

@media (max-width: 768px) {
    .wy-nav-content {
        overflow-x: auto !important;  
    }
    
    .wy-nav-content-wrap {
        margin-left: 0 !important;
    }
}


.md-typeset pre > code,
.md-typeset .highlighttable pre,
.md-typeset .highlight pre {
  font-size: 0.80rem !important;  
}

.md-typeset .highlighttable .linenos,
.md-typeset .highlighttable .lineno {
  display: none !important;
}

.highlight pre code .hljs-ln {
  padding-right: 1em;
}
.hljs-ln-numbers {
  color: #999;
  border-right: 1px solid #444;
}
/* 高亮特定行 */
.highlight-line {
  background-color: rgba(255, 225, 0, 0.1);
}


.md-typeset h1 {
    color: #000 !important;
}


.md-header__button.md-logo img {
  width: 60px;       /* 自定义宽度（默认约40px）*/
  height: auto;      /* 保持原始比例 */
  transform: scale(1.2); /* 缩放比例（可选）*/
  margin-top: 5px;  
}

/* 移动端适配（可选） */
@media (max-width: 768px) {
  .md-header__button.md-logo img {
    width: 50px;     /* 小屏幕缩小尺寸 */
  }
}