﻿/* ------------------------- */
/* 代码块容器样式 */
/* ------------------------- */
.markdown-body {

    pre {
        position: relative;
        background: #1e1e2f; /* 深色背景 */
        border-radius: 12px;
        padding: 2.5em 1em 1em 1em; /* 上方留给语言和按钮 */
        overflow: auto;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
        font-family: 'Fira Code', 'Consolas', monospace;
        color: #f8f8f2;
        margin: 1em 0;
        /* 左上角语言标签 */
        .lang-label {
            position: absolute;
            top: 0.5em;
            left: 1em;
            font-size: 0.85em;
            font-weight: bold;
            color: #b9a9ec;
            background: rgba(0,0,0,0.2);
            padding: 0.15em 0.5em;
            border-radius: 6px;
            pointer-events: none;
        }
        /* 右上角复制按钮 */
        .copy-btn {
            position: absolute;
            top: 0.5em;
            right: 1em;
            font-size: 0.8em;
            padding: 0.2em 0.5em;
            border: none;
            border-radius: 6px;
            background: #282a36;
            color: #f8f8f2;
            cursor: pointer;
            transition: background 0.2s;

            :hover {
                background: #44475a;
            }
        }
        /* 内部 code 样式 */
        code {
            display: block;
            white-space: pre;
            font-size: 0.9em;
        }
            /* 滚动条美化 */
            code::-webkit-scrollbar {
                height: 8px;
                width: 8px;
            }

            code::-webkit-scrollbar-thumb {
                background: #555;
                -webkit-box-shadow: inset 0 0 6px #512bd4AA;
                border-radius: 4px;
            }

            code::-webkit-scrollbar-track {
                background: #1e1e2f;
                border-radius: 4px;
            }
    }
}
