body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    padding: 20px;
}
.container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}
.controls {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: left;
}
.controls label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}
.controls select, .controls input[type="number"] {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}
.controls input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
}
.controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}
.controls input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
}
.editor-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    align-items: flex-start;
    justify-content: center;
}
.crop-area {
    position: relative;
    line-height: 0;
    border: 1px solid #ccc;
    overflow: hidden;
    user-select: none;
}
#sourceCanvas {
    max-width: 500px;
    height: auto;
    display: block;
}
#cropper {
    position: absolute;
    top: 0;
    left: 0;
    border: 2px dashed #fff;
    box-sizing: border-box;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
    cursor: move;
}
#resizer {
    width: 12px;
    height: 12px;
    background: #007bff;
    border: 2px solid #fff;
    position: absolute;
    right: -7px;
    bottom: -7px;
    cursor: nwse-resize;
}
.preview-pane {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#finalCanvas {
    height: 64px;
    image-rendering: pixelated;
    border: 1px solid #333;
    background-image: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%);
    background-size: 10px 10px;
    margin-bottom: 15px;
}
button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
button:hover { background: #218838; }
