* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 10px;
    align-items: center;
}

.canvas-container {
    /* 保持原有样式 */
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

canvas {
    position: absolute;
    image-rendering: crisp-edges;
    /* 移除transform定位 */
    touch-action: none;
    /* 添加过渡动画 */
    transition: all 0.3s ease;
}

.toolbar {
    padding: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    margin-top: 10px;
}

.colors {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
}

.color.active {
    border-color: #000;
    transform: scale(1.2);
}

input, button {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background: #007bff;
    color: white;
    cursor: pointer;
}
.hidden {
    display: none !important;
}
/* 添加新的CSS样式 */
.custom-color {
    position: relative;
    width: 30px;
    height: 30px;
}

.color-preview {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: transform 0.2s;
}

input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-color:hover .color-preview {
    transform: scale(1.1);
}

/* 更新颜色选择激活状态 */
.color.active, .color-preview.active {
    border-color: #000 !important;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* style.css新增内容 */


.inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 10;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/*.art-text-inputs {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 10;
    background: rgba(255,255,255,0.8);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}*/

.input-group {
    /*position: relative;*/
    margin: 8px 0;
}

.inputs input {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.5em;
    border: none;
    background: transparent;
    color: #6b4e3d;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.inputs input::placeholder {
    color: #a0a0a0;
    opacity: 0.8;
}

.char-counter {
    position: absolute;
    right: 5px;
    bottom: 2px;
    font-size: 0.8em;
    color: #999;
    font-family: Arial, sans-serif;
}

/* 移动端适配 */
@media (max-width: 1080px) {
    /*.inputs {
        left: 10px;
        bottom: 10px;
        padding: 5px;
    }*/
    
    .inputs input {
        /*width: 150px;*/
        font-size: 1.2em;
    }
}
.inputs input:focus {
    outline: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 0 5px rgba(107,78,61,0.3);
}