* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 8px;
}

header p {
    color: #94a3b8;
    font-size: 16px;
}

.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    align-items: start;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.upload-area {
    background: #1e293b;
    border: 2px dashed #475569;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #60a5fa;
    background: #334155;
}

.upload-area.dragover {
    border-color: #60a5fa;
    background: #1e3a5f;
}

.upload-area svg {
    color: #94a3b8;
    margin-bottom: 16px;
}

.upload-area h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.upload-area p {
    color: #94a3b8;
    font-size: 14px;
}

.control-panel {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-size: 14px;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #475569;
    border-radius: 8px;
    font-size: 14px;
    background: #0f172a;
    color: #e2e8f0;
    cursor: pointer;
}

.control-group select:focus {
    outline: none;
    border-color: #60a5fa;
}

.control-group input[type="range"] {
    padding: 0;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #475569;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #60a5fa;
    border-radius: 50%;
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #60a5fa;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.canvas-area {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-area.empty {
    color: #64748b;
    font-size: 14px;
}

#canvas {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    height: auto;
    border-radius: 8px;
    cursor: default;
}

#canvas.edit-mode {
    cursor: move;
}

.action-buttons {
    text-align: center;
}

.btn-primary,
.btn-secondary {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #475569;
    color: white;
    width: 100%;
}

.btn-secondary:hover {
    background: #334155;
}

.btn-secondary.active {
    background: #10b981;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .left-panel {
        order: 2;
    }
    
    .canvas-area {
        order: 1;
    }
}

@media (max-width: 640px) {
    header h1 {
        font-size: 24px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .control-panel {
        padding: 16px;
    }
}
