/* 代码块容器样式 */
.code-block-container {
    position: relative;
    border-radius: 5px;
    margin: 15px 0;
    background: #1e1e1e;
    overflow: hidden;
}

/* 代码块工具栏 */
.code-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: #2d3748;
    border-bottom: 1px solid #444;
    color: #e2e8f0;
    font-size: 14px;
}

.code-language {
    font-weight: bold;
}

.copy-code-btn {
    background: #4a5568;
    color: white;
    border: none;
    padding: 1px 3px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-code-btn:hover {
    background: #718096 !important;
}

.copy-code-btn.copied {
    background: #38a169 !important;
}

.copy-code-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* 代码块样式 */
.code-block {
    padding: 0;
    margin: 0;
    overflow-x: auto;
    color: #abb2bf;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

/* 行号容器样式 */
.line-numbers {
    counter-reset: line;
    padding-left: 0;
    margin: 0;
}

.line-numbers .line {
    display: flex;
    padding: 2px 0;
    border-left: 3px solid transparent;
    transition: background-color 0.1s;
}

.line-numbers .line:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.line-numbers .line-number {
    display: inline-block;
    width: 50px;
    text-align: center;
    color: #FFF;
    user-select: none;
    border-right: 1px solid #444;
    margin-right: 15px;
    flex-shrink: 0;
}

.line-numbers .line-code {
    flex: 1;
    white-space: pre;
    padding-right: 15px;
}

/* 高亮样式覆盖 */
.hljs {
    background: transparent !important;
    padding: 0 !important;
}

/* 滚动条样式 */
.code-block::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.code-block::-webkit-scrollbar-track {
    background: #2d3748;
}

.code-block::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background: #718096;
}
