/* code.css */
/* code.html */

body {
    font-family: sans-serif;
    background-color: white;
    margin: 0;
    padding: 0;
    margin-left: 20px;
    margin-right: 20px;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

h1 {
    color: #4CAF50;
}

h3 {
    margin-bottom: -15px;
}

h5 {
    margin-bottom: -15px;
    margin-left: 10px;
}

.line-container {
    display: flex;
    align-items: center;
    margin: 10px 0;
    gap: 10px;
    justify-content: left;
}

.icon-image {
    height: 35px;
    width: auto;
    vertical-align: middle;
    cursor: pointer;
}

pre {
    position: relative;
    /* 为了让按钮定位到代码块内部 */
}

code {
    background: #ebebeb;
    color: #3b3b3b;
    font-family: Consolas;
    font-size: 14px;
    scrollbar-width: thin;
    border-radius: 10px;
    transition: background-color 0.5s,
        color 0.5s;
}

/* 复制按钮样式 */
.copy-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.copy-btn:active {
    background-color: #45a049;
}

body.dark-mode {
    background-color: #333;
    color: #ffffffd6;
}

body.dark-mode code {
    background: #1A1B26;
    color: #ffffffd6;
}

@media (hover: hover) {
    .copy-btn:hover {
        background-color: #45a049;
    }
}