﻿.code-container {
    position: relative; /* 確保內部元素能相對定位 */
    width: 100%;
    margin-bottom: 20px; /* 給每個程式碼區塊下方留出空間 */
}

.copy-container {
    position: sticky;
    top: 65px;
    z-index: 100; /* 確保這個值高於上層菜單 */
    width: 100%; /* copy-container 寬度 100% */
    background-color: #282c34; /* 背景色 */
    text-align: right; /* 按鈕靠右對齊 */
    display: flex; /* 使用 flex 來水平排列 language-label 和按鈕 */
    justify-content: space-between; /* 讓標籤和按鈕左右對齊 */
    align-items: center; /* 垂直居中 */
}

.language-label {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
    font-family: 'Courier New', Courier, monospace;
    margin-left: 10px; /* 給標籤一些左邊距 */
}

.copy-button {
    padding: 6px 12px;
    background-color: #282c34; /* 保持按鈕背景色為黑色 */
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px; /* 添加圓角，讓按鈕看起來更柔和 */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.1s ease;
}

    .copy-button:hover {
        background-color: #3a3f47; /* 比黑色更亮的灰色 */
        color: #ffffff;
    }

    .copy-button:active {
        background-color: rgba(240, 240, 240, 1); /* 點擊時稍微變灰 */
        color: #000; /* 點擊時文字變為黑色 */
        transform: scale(0.98); /* 點擊時按鈕稍微縮小 */
    }

pre {
    background-color: #f5f5f5;
    overflow: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}
