pre {
    position: relative;
    padding-right: 4rem; /* Space for the button */
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2c2c2c; /* Dark button background */
    border: none;
    color: #D3D3D3;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #3c3c3c;
}

.copy-btn svg {
    margin-right: 6px;
}

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

.copy-btn .tooltip {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    visibility: hidden;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.copy-btn:hover .tooltip {
    visibility: visible;
    opacity: 1;
}
