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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

.container {
    display: flex;
    height: 100vh;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 40px;
    position: relative;
}

.right-panel {
    width: 350px;
    background: #fafafa;
    padding: 30px;
    overflow-y: auto;
    border-left: 1px solid #e0e0e0;
}

.right-panel h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.3em;
}

.upload-section {
    margin-top: 30px;
}

input[type="file"] {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #333;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.2s;
}

.upload-btn:hover {
    background: #555;
}

.control-group {
    margin-bottom: 25px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.control-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
}

.control-group input[type="text"]:focus {
    outline: none;
    border-color: #333;
}

.control-group input[type="color"] {
    width: 50px;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.control-group input[type="range"] {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    border: none;
}

.download-btn {
    width: 100%;
    padding: 12px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.download-btn:hover {
    background: #555;
}

#canvas {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
