/* 全屏显示样式 - 保留侧边栏，内容区域全屏 */
@media screen and (min-width: 1025px) {
    /* 侧边栏保持显示 */
    .wy-nav-side {
        display: block !important; /* 保留侧边栏 */
    }

    /* 内容区域占满剩余空间 */
    .wy-nav-content-wrap {
        margin-left: 300px !important; /* 保留侧边栏空间 */
    }

    .wy-nav-content {
        max-width: none !important; /* 移除最大宽度限制 */
        width: 100% !important; /* 占满整个可用宽度 */
        padding: 0 40px !important; /* 调整左右内边距 */
    }

    .rst-content {
        max-width: none !important; /* 移除最大宽度限制 */
        width: 100% !important;
    }

    .rst-content .document {
        max-width: none !important; /* 移除最大宽度限制 */
        width: 100% !important;
    }

    /* 确保内容区域在侧边栏存在时也能充分利用空间 */
    .wy-body-for-nav .wy-nav-content {
        max-width: none !important; /* 移除最大宽度限制 */
        width: 100% !important;
    }

    /* 确保内容区域的内层容器也占满宽度 */
    .rst-content .section,
    .rst-content .section ul,
    .rst-content .section ol {
        max-width: none !important;
    }

    /* 确保代码块也能全屏显示 */
    .rst-content pre {
        max-width: 100%;
        overflow-x: auto;
    }

    /* 表格全屏显示 */
    .rst-content table {
        width: 100%;
        max-width: 100%;
    }
}

/* 移动端：展开目录时隐藏正文内容 */
@media screen and (max-width: 1024px) {
    .wy-nav-content-wrap.shift .wy-nav-content {
        display: none;
    }
}

/* ============================================
   代码块绿色背景样式
   ============================================ */

/* 代码块背景色 - 浅绿色 */
.highlight {
    background-color: #c8e6c9 !important;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 0.5em;
    margin: 1em 0;
}

/* 代码块内容区域 */
.highlight pre {
    background-color: #c8e6c9 !important;
    border: none;
    padding: 0;
    margin: 0;
}

/* 行号背景 */
.highlight .linenos {
    background-color: #a5d6a7 !important;
    border-right: 1px solid #81c784;
}

/* 代码块内的代码 */
.highlight code {
    background-color: #c8e6c9 !important;
}

/* 行内代码 */
code {
    background-color: #c8e6c9 !important;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.9em;
}

/* 确保代码块容器也有背景 */
div[class*="highlight"] {
    background-color: #c8e6c9 !important;
}

/* Pygments 代码块 */
pre {
    background-color: #c8e6c9 !important;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 0.5em;
}

/* 代码块内的文本 */
pre code {
    background-color: transparent !important;
    padding: 0;
}

/* 确保所有代码相关元素都有绿色背景 */
.highlight-default,
.highlight-python,
.highlight-cpp,
.highlight-javascript,
.highlight-html,
.highlight-css,
.highlight-bash,
.highlight-shell,
.highlight-text,
.highlight-go,
.highlight-rust,
.highlight-java,
.highlight-nodejs {
    background-color: #c8e6c9 !important;
}

/* 代码块表格（带行号的代码块） */
.highlighttable {
    background-color: #c8e6c9 !important;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
}

.highlighttable tbody {
    background-color: #c8e6c9 !important;
}

.highlighttable td {
    background-color: #c8e6c9 !important;
}

/* 行号列 */
.highlighttable .linenos {
    background-color: #a5d6a7 !important;
    border-right: 1px solid #81c784;
    padding: 0.5em;
}

/* 代码列 */
.highlighttable .code {
    background-color: #c8e6c9 !important;
    padding: 0.5em;
}

/* ============================================
   代码块复制按钮样式
   ============================================ */

/* 代码块容器相对定位 */
.highlight,
.highlighttable,
div[class*="highlight"] {
    position: relative;
}

/* 复制按钮 */
.copy-button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(129, 199, 132, 0.2);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(4px);
}

/* 鼠标悬停时显示按钮 */
.highlight:hover .copy-button,
.highlighttable:hover .copy-button,
div[class*="highlight"]:hover .copy-button {
    opacity: 1;
}

/* 按钮悬停效果 */
.copy-button:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: #81c784;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* 按钮点击效果 */
.copy-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 复制图标SVG样式 */
.copy-button svg {
    width: 12px;
    height: 12px;
    stroke: rgba(74, 85, 104, 0.6);
    fill: none;
    transition: stroke 0.2s;
    display: block;
    margin: 0 auto;
}

.copy-button:hover svg {
    stroke: rgba(74, 85, 104, 0.9);
}

/* 复制成功提示 */
.copy-button.copied {
    background-color: #4caf50;
    border-color: #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.copy-button.copied svg {
    stroke: white;
    fill: none;
}

