html,
body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    -webkit-user-select: none;
    user-select: none;
}

* {
    -webkit-user-select: none;
    user-select: none;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    touch-action: none;
}

.eraser {
    border-radius: 100%;
    width: 60px;
    height: 60px;
    border: 2px #d3d3d3 solid;
    background: rgba(207, 207, 207, 0.2);
    opacity: 0.7;
    display: none;
    position: fixed;
    pointer-events: none;
    z-index: 10;
    box-sizing: border-box;
}

/* Top-left back to toolbox */
.baiban-back {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 12px 0 8px;
    border-radius: 999px;
    background: rgba(21, 25, 32, 0.88);
    border: 1px solid rgba(232, 201, 106, 0.4);
    color: #f0e0a8 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.baiban-back:hover {
    background: rgba(27, 33, 43, 0.95);
    border-color: rgba(247, 229, 163, 0.7);
    color: #fff8e8 !important;
}
.baiban-back .layui-icon {
    font-size: 16px;
}
body.night .baiban-back {
    background: rgba(12, 14, 18, 0.92);
}

.toolbar {
    height: 50px;
    position: fixed;
    bottom: 0px;
    left: 0%;
    z-index: 12;
    box-shadow: 0 0 10px 0px rgba(0, 0, 0, 0.2);
    user-select: none;
    background: #fff;
}

.toolbar-back {
    height: 50px;
    width: 50px;
    line-height: 50px;
    text-align: center;
    display: inline-block;
    float: left;
    cursor: pointer;
    color: #444 !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease-out;
}
.toolbar-back:hover {
    background: #f1f1f2;
}
.toolbar-back .layui-icon {
    font-size: 18px;
}
body.night .toolbar-back {
    color: #ddd !important;
}
body.night .toolbar-back:hover {
    background: #333;
}

[class^="toolbar-"] {
    height: 50px;
    width: 50px;
    line-height: 50px;
    text-align: center;
    display: inline-block;
    float: left;
    cursor: pointer;
    transition: background-color 0.2s ease-out;
}

[class^="toolbar-"]:hover {
    background: #f1f1f2;
}

[class^="toolbar-"].active {
    background: #f1f1f2;
}

[class^="toolbar-"] svg {
    transform: translateY(12px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[class^="toolbar-"].active svg {
    transform: translateY(3px);
}

.toolbar-pen {
    position: relative;
}

.toolbar-pen span {
    opacity: 0;
    transition: opacity 0.1s ease-out;
}

.toolbar-pen.active span {
    opacity: 1;
    position: absolute;
    background: #000;
    top: 3px;
    right: 3px;
    border-radius: 100%;
}

.toolbar-pen-viewer-1 {
    width: 3px;
    height: 3px;
}
.toolbar-pen-viewer-2 {
    width: 5px;
    height: 5px;
}
.toolbar-pen-viewer-3 {
    width: 7px;
    height: 7px;
}
.toolbar-pen-viewer-4 {
    width: 9px;
    height: 9px;
}

.toolbar-eraser {

}

.toolbar-penonly .status {
    width: 7px;
    height: 7px;
    background-color: #13a559;
    position: absolute;
    top: 3px;
    right: 3px;
    border-radius: 100%;
}
.toolbar-penonly.enabled .status {
    background-color: #e31328;
}

.toolbarmenu {
    height: 50px;
    width: 100px;
    position: fixed;
    bottom: 50px;
    left: 50px;
    transform: translateX(-50%);
    user-select: none;
    z-index: 11;
}

[class^="toolbarmenu-"] {
    height: auto;
    width: 160px;
    background: #fff;
    box-shadow: 0 0 10px 0px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

[class^="toolbarmenu-"].active {
    pointer-events: initial;
}

.toolbarmenu-pen {
    opacity: 0;
    width: 260px;
    transition: opacity 0.2s linear;
    pointer-events: none;
    animation-fill-mode: forwards;
    animation: fadelogOut 0.4s;
    position: fixed;
    bottom: 5px;
    padding: 5px 5px 5px 0;
}

.width-viewer {
    height: 200px;
    width: 50px;
    float: left;
}

.switcher-container {
    height: 200px;
    float: left;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.switcher-container[type="width"] {
    width: 50px;
}

.switcher-container [class^="width-switcher-"] {
    height: 25px;
    width: 25px;
    border-radius: 100%;
    border: 2px solid rgba(179, 179, 179, 0.8);
    box-shadow: 0 0 0px 3px transparent;
    transition: box-shadow 0.1s ease-out;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.switcher-container [class^="width-switcher-"]:hover {
    box-shadow: 0 0 0px 3px rgba(221, 221, 221, 0.8);
}

.switcher-container [class^="width-switcher-"].active {
    box-shadow: 0 0 0px 3px rgba(221, 221, 221, 0.8);
}

.switcher-container [class^="width-switcher-"] span {
    background: #000;
    display: block;
    border-radius: 100%;
}

.switcher-container .width-switcher-4 span {
    height: 13px;
    width: 13px;
}

.switcher-container .width-switcher-3 span {
    height: 11px;
    width: 11px;
}

.switcher-container .width-switcher-2 span {
    height: 9px;
    width: 9px;
}

.switcher-container .width-switcher-1 span {
    height: 5px;
    width: 5px;
}

.switcher-container[type="color"] {
    width: 150px;
    flex-flow: column wrap;
}

.switcher-container .color-switcher {
    height: 25px;
    width: 25px;
    border-radius: 100%;
    border: 2px solid rgba(179, 179, 179, 0.8);
    box-shadow: 0 0 0px 3px transparent;
    transition: box-shadow 0.1s ease-out;
    cursor: pointer;
    flex-shrink: 0;
    background-color: white;
    margin: 10px 10px;
}

.switcher-container .color-switcher:hover {
    box-shadow: 0 0 0px 3px rgba(221, 221, 221, 0.8);
}

.switcher-container .color-switcher.active {
    box-shadow: 0 0 0px 3px rgba(221, 221, 221, 0.8);
}

.toolbarmenu-pen.active {
    pointer-events: all;
    opacity: 1;
    animation-fill-mode: forwards;
    animation: fadelogIn 0.3s;
}

.toolbarmenu-eraser {
    opacity: 0;
    transition: opacity 0.2s linear;
    pointer-events: none;
    animation-fill-mode: forwards;
    animation: fadelogOut 0.4s;
    margin-left: 50px;
}

.toolbarmenu-eraser.active {
    pointer-events: all;
    opacity: 1;
    animation-fill-mode: forwards;
    animation: fadelogIn 0.3s;
}

.toolbarmenu-eraser p {
    cursor: pointer;
    height: 45px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    background: #fff;
    transition: background-color 0.1s ease-out;
}

.toolbarmenu-eraser p img {
    float: left;
    margin-right: 7px;
    margin-left: 10px;
    transform: scale(0.8);
}

@keyframes fadelogIn {
    0% {
        transform: translate3d(0, 80px, 0) scale(0.7);
    }
    100% {
        transform: none;
    }
}

@keyframes fadelogOut {
    0% {
        transform: none;
    }
    100% {
        transform: translate3d(0, 80px, 0) scale(0.7);
    }
}

#toolbar-container {
    transition: opacity 0.2s ease-out;
}

.untouchable {
    pointer-events: none;
    opacity: 0.7;
}

.untouchable .active {
    pointer-events: none !important;
}

.toolbar-icon{

}

.toolbar-icon span{
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
}

.toolbar-icon span i{
    font-size: 24px;
} 

.night canvas{
    background-color: #222;
}

.night .toolbar{
    background-color: #333;
}

.night [class^="toolbar-"].active {
    background: #000;
}

.night .toolbarmenu-pen.active{
    background-color: #444;
}

.night .toolbarmenu-eraser p{
    background-color: #444;
    color: #eee;
}

.night .toolbar-icon span {
    background-color: #444;
    color: #eee;
}

.keyus{
    padding: 10px;
    border: 1px solid #f5f5f5;
    margin: 10px;
}

.keyus p{
    font-size: 12px;
    line-height: 24px;
    color: #444;
}

.night .layui-layer {
    background: #333;
    border: 1px solid #222;
}
.night .layui-layer-title {
    color: #ddd;
    border-bottom: 1px solid #444;
}

.night .layui-layer-setwin .layui-layer-close {
    color: #ddd;
}

.night .keyus{
    border: 1px solid #444;
}

.night .keyus p{
    color: #aaa;
}

.night .helpss{
    color: #aaa;
}