/* 代码容器样式 */
.code-container {
    position: relative;
    background: #f5f7fa; /* 更改为好看的浅灰色背景 */
    border-radius: 6px; /* 略微增加圆角 */
    box-shadow: 0 2px 6px rgba(10, 10, 10, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #e8eaed;
}

.code-container pre {
    background-color: #f5f7fa; /* 匹配容器背景色 */
    padding: 1.5em;
    border-radius: 4px;
    margin-bottom: 0;
}

/* 确保代码标签没有背景色 */
.code-container pre code {
    background-color: transparent !important; /* 覆盖任何默认背景色 */
    padding: 0; /* 移除可能的内边距 */
    border-radius: 0; /* 移除可能的圆角 */
}

/* highlight.js 可能会添加背景，也需要覆盖 */
.code-container pre .hljs {
    background-color: transparent !important;
}

/* 复制按钮样式 */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: 1px solid #e1e4e8;
    background-color: #fff;
    color: #3273dc; /* 默认蓝色 */
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-button .icon {
    margin-right: 4px;
}

.copy-button .text {
    font-weight: 500;
}

.copy-button:hover {
    color: #2160c4; /* 深蓝色 */
    background-color: #f0f4ff;
    box-shadow: 0 2px 4px rgba(50, 115, 220, 0.1);
}

.copy-button:active {
    transform: scale(0.97);
}

.copy-success {
    color: #48c774 !important;
    background-color: #f0fff4 !important;
    border-color: #c2e6c9 !important;
}