/* 고품격 코드 뷰어 스타일 */
.code-viewer-container {
    position: relative;
    border-radius: 8px;
    background-color: #1e1e1e; /* VS Code 스타일 다크 */
    border: 1px solid #2d2d2d;
    margin: 14px 0;
    font-family: 'Fira Code', 'Consolas', 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
}

.code-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #1e1e1e;
    color: #b5b5b5;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    
    /* 브라우저 스크롤 시 코드 뷰어 영역 내에서 상단 고정 */
    position: sticky;
    top: 0;
    z-index: 5;
    user-select: none;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}

.code-viewer-lang {
    letter-spacing: 0.5px;
}

.code-viewer-container pre {
    margin: 0 !important;
    padding: 14px 16px !important;
    overflow: auto;
    max-height: 400px;
    background-color: transparent !important;
}

.code-viewer-container pre code {
    background-color: transparent !important;
    padding: 0 !important;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    display: block;
    color: #e3e3e3;
}

/* 복사 버튼 스타일 */
.code-viewer-copy-btn {
    background: none;
    border: none;
    color: #9aa0a6;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
    
    /* 마우스를 올릴 때만 투명도 해제하여 보임 */
    opacity: 0;
}

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

.code-viewer-copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e3e3e3;
}

.code-viewer-copy-btn svg {
    display: block;
}
