ul, ol { list-style: none; }
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 手机防滑屏核心，以及屏幕居中 */
body {
    margin: 0;
    padding: 20px;
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    background: #ffffff; /* 原来是 #f0f0f0，改成纯白 */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
}

.icon {
    width: 1.5em; height: 1.5em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
}

/* 画布：竖屏比例，带边框和阴影 */
/* 画布 */
#xxx {
    display: block;
    background: #ffffff !important; /* 强制纯白，不透明 */
    position: relative;
    z-index: 1;
    image-rendering: pixelated;
    
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    
    max-width: 100%;
    max-height: 100%;
}

/* 画板标题 */
.board-title {
    position: fixed;
    top: 50px;
    left: 20px;
    z-index: 99999;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    letter-spacing: 2px;
    pointer-events: none;
    white-space: nowrap;
}

/* 工具栏、颜色、粗细：统一提高层级，防止被画布挡住 */
.actions, .colors, .sizes {
    position: fixed !important;
    z-index: 99999 !important;
}

.actions {
    top: 0;
    left: 0;
    padding: 20px;
}

.actions svg {
    transition: all 0.3s;
    margin: 0 10px;
    cursor: pointer;
}
.actions svg.active {
    fill: red;
    transform: scale(1.2);
}

/* 颜色按钮：竖排显示 */
.colors {
    top: 70px;
    left: 28px;
}
.colors > li {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(0,0,0,0.25);
    margin: 18px 0;
    cursor: pointer;
    position: relative;
    z-index: 100000 !important;
    display: block;
}
.colors > li.red { background: red; }
.colors > li.green { background: green; }
.colors > li.blue { background: blue; }
.colors > li.black { background: black; }
.colors > li.active {
    box-shadow: 0 0 5px rgba(0,0,0,0.95);
    transform: scale(1.2);
}

/* 粗细按钮 */
.sizes {
    right: 20px;
    top: 10px;
}
.sizes > .thin {
    margin: 20px 0px 7px 0px;
    height: 10px;
    width: 30px;
    border-top: 3px solid black;
    cursor: pointer;
    position: relative;
    z-index: 100000 !important;
}
.sizes > .thick {
    margin: 3px 0px 7px 0px;
    height: 10px;
    width: 30px;
    border-top: 6px solid black;
    cursor: pointer;
    position: relative;
    z-index: 100000 !important;
}
.sizes > .suthick {
    margin: 3px 0px 7px 0px;
    height: 10px;
    width: 30px;
    border-top: 10px solid black;
    cursor: pointer;
    position: relative;
    z-index: 100000 !important;
}
.sizes > li.active {
    border-top: 3px solid #311e62 !important;
    transform: scale(1.2);
    transition: all 0.3s;
}

/* 超粗画笔样式 */
.sizes > .superthick {
    margin: 10px 0px 7px 0px;
    height: 20px;
    width: 20px;
    background: black; /* 填充成实心圆点 */
    border-radius: 50%; /* 变成圆形 */
    cursor: pointer;
    position: relative;
    z-index: 100000 !important;
}

/* 超粗画笔被选中时的效果 */
.sizes > .superthick.active {
    background: red; /* 选中时变成红色 */
    transform: scale(1.2);
    border-top: none !important; /* 去掉原来的边框样式 */
}

