/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings{
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 尺寸选择区样式 */
.size-selection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.size-selection label {
    font-weight: bold;
    min-width: 70px;
}

.size-selection select, .size-selection input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 60px;
}

#applySizeBtn {
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    min-width: 80px;
}

#applySizeBtn:hover {
    background-color: #45a049;
}

/* 画板区样式 */
.canvas-area {
    display: flex;
    justify-content: center;
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 100%;
}

#drawingCanvas {
    border: 1px solid #ddd;
    background-color: white;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
    display: block;
}

/* 操作控制区样式 */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.controls button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    flex: 1;
    min-width: 120px;
}

#saveBtn {
    background-color: #4CAF50;
    color: white;
}

#resetBtn {
    background-color: #f44336;
    color: white;
}

#clearGalleryBtn {
    background-color: #2196F3;
    color: white;
}

.controls button:hover {
    opacity: 0.9;
}

/* 图片夹区样式 */
.image-gallery {
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-gallery h3 {
    margin-bottom: 10px;
}

#galleryContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    justify-content: center;
}

.gallery-item {
    width: 70px;
    height: 70px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

.gallery-item canvas {
    max-width: 100%;
    max-height: 100%;
}

/* 导出区样式 */
.export-section {
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.export-section h3 {
    margin-bottom: 10px;
}

.export-options {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#exportBtn {
    padding: 10px 15px;
    background-color: #9C27B0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    width: 100%;
    max-width: 200px;
}

#exportBtn:hover {
    background-color: #7B1FA2;
}

/* 画笔设置区样式 */
.brush-settings {
    margin-top: 10px;
}

.brush-settings h3 {
    margin-bottom: 10px;
}

.brush-thickness {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.brush-thickness input[type="range"] {
    width: 100%;
    max-width: 200px;
    flex: 1;
}

.brush-thickness span {
    width: 30px;
    text-align: center;
    font-weight: bold;
}

.brush-speed {
    margin-top: 10px;
}

.brush-speed label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* TXT导出选项样式 */
.txt-export-options {
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice{
    background-color: white;
    padding: 10px;
    padding-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    font-size: 16px;
}

.notice h1,p{
    margin-left: 10px;
    font-size: 1em;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .settings {
        padding: 10px;
    }
    
    .size-selection, .brush-thickness {
        flex-direction: column;
        align-items: stretch;
    }
    
    .size-selection label, .brush-thickness label {
        margin-bottom: 5px;
        min-width: auto;
    }
    
    .export-options {
        flex-direction: column;
        align-items: flex-start;
    }
}