:root { 
    --primary: #0070f3; 
    --bg: #f5f5f5; 
    --border: #ddd; 
}

* { 
    box-sizing: border-box; 
    font-family: system-ui, sans-serif; 
}

body { 
    background: var(--bg); 
    margin: 0; 
    padding: 20px; 
    color: #333; 
}

.container { 
    max-width: 1000px; 
    margin: 0 auto; 
    background: white; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-top: 20px; 
}

@media (max-width: 768px) { 
    .grid { grid-template-columns: 1fr; } 
}

.panel { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.controls { 
    padding: 15px; 
    background: #fafafa; 
    border: 1px solid var(--border); 
    border-radius: 6px; 
}

.control-group { 
    margin-bottom: 10px; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
}

.control-group label { 
    font-size: 14px; 
    font-weight: bold; 
}

canvas { 
    max-width: 100%; 
    border: 1px dashed #aaa; 
    /* 使用透明网格背景，方便观察去背效果 */
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><rect width="10" height="10" fill="%23eee"/><rect x="10" y="10" width="10" height="10" fill="%23eee"/></svg>'); 
}

textarea { 
    width: 100%; 
    height: 200px; 
    padding: 10px; 
    font-family: monospace; 
    font-size: 12px; 
    border: 1px solid var(--border); 
    border-radius: 4px; 
    resize: vertical; 
    word-break: break-all; 
}

button { 
    padding: 8px 16px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold; 
}

button:hover { 
    opacity: 0.9; 
}

.drop-zone { 
    border: 2px dashed var(--primary); 
    padding: 30px; 
    text-align: center; 
    border-radius: 6px; 
    cursor: pointer; 
    background: #f0f7ff; 
    transition: background 0.2s; 
}

.drop-zone.dragover { 
    background: #ddebff; 
}

.header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.info { 
    font-size: 12px; 
    color: #666; 
}

.tips {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    background: #f0f9f0;
    border: 1px solid #4caf50;
    border-radius: 6px;
    margin: 15px 0;
}

.tips-icon {
    width: 20px;
    height: 20px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.tips-content {
    font-size: 13px;
    color: #2e7d32;
}

.tips-content p {
    margin: 0;
    line-height: 1.5;
}

.tips-content p + p {
    margin-top: 4px;
}