* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.container { /* 容器样式 */
    background: white;
    border-radius: 20px;
    padding: 30px; /* 调整容器内边距 */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px; /* 调整容器最大宽度 */
    width: 100%;
}
h1 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px; /* 调整字体大小 */
    font-weight: 600;
}
.canvas-container {
    margin: 20px 0; /* 调整画布容器上下外边距 */
    display: inline-block;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 8px; /* 调整画布容器内边距 */
    background: rgba(0, 0, 0, 0.02);
    max-width: 100%;
}
#canvas {
    border: 1px solid #eee;
    border-radius: 8px;
    background: transparent;
}
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 30px 15px; /* 调整内边距 */
    margin: 15px 0; /* 调整外边距 */
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}
.upload-area:hover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.05);
}
.upload-area.dragover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.1);
    transform: scale(1.02);
}
.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}
.upload-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
}
.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}
.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}
.download-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-top: 20px;
    display: none;
}
.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(17, 153, 142, 0.3);
}
#fileInput {
    display: none;
}
.info {
    color: #888;
    font-size: 13px;
    margin-top: 15px;
    line-height: 1.5;
}
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    display: none;
}
.footer {  /* 页脚样式 */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}
.footer p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}
.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}
.copyright {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    color: #999;
    font-size: 12px;
}