body,
html {
    height: 100%;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
}

iframe {
    background: white;
}

.lead {
    font-size: 18px;
    font-weight: 400;
}

/* 固定背景层（核心：只渲染一次，滚动不重绘） */
.bg-fixed-layer {
    position: fixed; /* 固定到视口，滚动不动 */
    top: 0;
    left: 0;
    width: 100vw; /* 视口宽度 */
    height: 100vh; /* 视口高度 */
    z-index: -1; /* 放到内容层下方 */
    background:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("/bing") no-repeat center center;
    background-size: cover;
    transform: translateZ(0);
}

@media only screen and (max-width: 600px) {
    .bg-fixed-layer {
        position: fixed;
        /* 替代 top/left/width/height，直接让元素铺满视口（现代写法，兼容性更好） */
        inset: 0;
        z-index: -1;
        background:
            linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
            url("/bg_m") no-repeat center center;
        /* 强制背景图铺满，且裁剪超出部分（解决拉伸/留白） */
        background-size: cover;
        /* 防止背景图在移动端滚动时位移 */
        background-attachment: fixed;
        /* 硬件加速 + 兼容性优化 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        /* 确保尺寸计算不被内边距/边框影响 */
        box-sizing: border-box;
    }
}

.intro-header {
    padding-top: 50px;
    /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */
    padding-bottom: 50px;
    color: #f8f8f8;
    text-align: center;
    padding-bottom: 0px;
    flex-grow: 1; /* 关键：替代main的flex-grow，填充body剩余高度 */
}

.common-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border-radius: 10px;
    color: white;
}

.intro-message {
    position: relative;
    padding-top: 10%;
    padding-bottom: 13%;
}

.intro-message > h1 {
    margin: 0;
    font-size: 5em;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}

.intro-divider {
    border-top: 1px solid #f8f8f8;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.intro-message > h3 {
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}

@media (max-width: 767px) {
    .intro-message {
        padding-bottom: 15%;
    }

    .intro-message > h1 {
        font-size: 3em;
    }

    ul.intro-social-buttons > li {
        display: block;
        margin-bottom: 20px;
        padding: 0;
    }

    ul.intro-social-buttons > li:last-child {
        margin-bottom: 0;
    }

    .intro-divider {
        width: 100%;
    }
}

.network-name {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
}

.content-section-a {
    background-color: #f8f8f8;
    padding: 50px 0;
}

.content-section-b {
    border-top: 1px solid #e7e7e7;
    border-bottom: 1px solid #e7e7e7;
    padding: 50px 0;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading-spacer {
    border-top: 3px solid #e7e7e7;
    width: 200px;
    float: left;
}

.banner {
    padding: 100px 0;
    color: #f8f8f8;
    background: url(../img/banner-bg.jpg) no-repeat center center;
    background-size: cover;
}

.banner h2 {
    margin: 0;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
    font-size: 3em;
}

.banner ul {
    margin-bottom: 0;
}

.banner-social-buttons {
    float: right;
    margin-top: 0;
}

@media (max-width: 1199px) {
    ul.banner-social-buttons {
        float: left;
        margin-top: 15px;
    }
}

@media (max-width: 767px) {
    .banner h2 {
        margin: 0;
        text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
        font-size: 3em;
    }

    ul.banner-social-buttons > li {
        display: block;
        margin-bottom: 20px;
        padding: 0;
    }

    ul.banner-social-buttons > li:last-child {
        margin-bottom: 0;
    }
}

footer {
    background-color: white;
    bottom: 0;
    width: 100%;
}

p.copyright {
    margin: 3px 0 0;
}

.hero-spacer {
    margin-top: 50px;
}

.hero-feature {
    margin-bottom: 30px;
}

.jumbotron {
    padding: 30px;
    margin-bottom: 30px;
    color: inherit;
    /* background-color: #eee; */
}

.intro-header a {
    color: #f8f8f8;
    text-decoration: underline;
}

.ahrefstyle {
    color: #f8f8f8;
    text-decoration: none;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}

.ahrefstyle:hover,
.ahrefstyle:focus {
    color: #f8f8f8;
}

/* hao123 end */

/* table start */
.mytable {
    font-size: 14px;
    border: 1px solid #ccc;
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    border-collapse: unset;
}

.mytable td {
    padding: 4px;
    margin: 3px;
    border: 1px solid #ccc;
}

.mytable th {
    background-color: #104e8b;
    color: #fff;
    font-weight: bold;
}

.mytable code {
    display: inline;
}

/* table end */

/* clipboard start*/
code {
    position: relative;
    padding: 0;
    display: inherit;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    background-image: linear-gradient(#fcfcfc, #eee);
    border: 1px solid #d5d5d5;
    border-radius: 3px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-appearance: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    color: #333;
    -webkit-transition: opacity 0.3s ease-in-out;
    -o-transition: opacity 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
    padding: 2px 6px;
    position: absolute;
    right: 5px;
    top: 5px;
    opacity: 0.5;
}

.btn-copy span {
    margin-left: 5px;
}

code:hover .btn-copy {
    opacity: 1;
}

.btn-copy:hover {
    opacity: 1;
}

pre {
    display: block;
    padding: 9.5px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.428571429;
    color: #333;
    word-break: break-all;
    word-wrap: break-word;
    background-color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    position: relative;
    padding-right: 0px;
}

.code-shower {
    position: relative;
    padding-right: 0px;
}
/* clipboard end */

/* highlight start */
pre code.hljs {
    display: block;
    overflow-x: auto;
    padding: 1em;
}

code.hljs {
    padding: 3px 5px;
}

.hljs {
    color: #abb2bf;
    background: #282c34;
}

.hljs-comment,
.hljs-quote {
    color: #5c6370;
    font-style: italic;
}

.hljs-doctag,
.hljs-formula,
.hljs-keyword {
    color: #c678dd;
}

.hljs-deletion,
.hljs-name,
.hljs-section,
.hljs-selector-tag,
.hljs-subst {
    color: #e06c75;
}

.hljs-literal {
    color: #56b6c2;
}

.hljs-addition,
.hljs-attribute,
.hljs-meta .hljs-string,
.hljs-regexp,
.hljs-string {
    color: #98c379;
}

.hljs-attr,
.hljs-number,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-pseudo,
.hljs-template-variable,
.hljs-type,
.hljs-variable {
    color: #d19a66;
}

.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-symbol,
.hljs-title {
    color: #61aeee;
}

.hljs-built_in,
.hljs-class .hljs-title,
.hljs-title.class_ {
    color: #e6c07b;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: 700;
}

.hljs-link {
    text-decoration: underline;
}

/* highlight end */

.auto-wrap {
    word-wrap: break-word; /* 允许长单词换行到下一行 */
    overflow-wrap: break-word; /* 类似word-wrap，CSS3新属性 */
    word-break: break-all; /* 允许在单词内换行 */
}

/* mermaid start */
/* 渲染区基础样式 */
.render-area {
    position: relative;
    background-color: white;
}

/* 悬浮图标按钮组 (动态创建) */
.float-btn-group {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.float-btn-group.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 图标按钮通用样式 */
.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.icon-btn:hover {
    background-color: #0056b3;
}

.icon-btn.active {
    background-color: #28a745;
}

/* 缩放百分比显示 */
.scale-info {
    font-size: 14px;
    color: #333;
    padding: 0 6px;
}
