body { font-family: 'Segoe UI', sans-serif; display: flex; height: 100vh; margin: 0; overflow: hidden; user-select: none; }

/* Modální okno */
#setup-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 100;
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background: white; padding: 30px; border-radius: 8px; width: 450px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; }
input, select { width: 100%; padding: 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }
.row { display: flex; gap: 15px; }
small { display: block; margin-top: 5px; color: #666; font-size: 0.85rem; }

/* Layout */
#toolbar { 
    width: 300px; background: #f8f9fa; border-right: 1px solid #ddd; 
    padding: 15px; display: flex; flex-direction: column; gap: 10px; z-index: 10; 
}
#workspace { 
    flex: 1; background: #c0c0c0; 
    position: relative; overflow: auto; 
    display: flex; justify-content: center; align-items: center;
}

/* SVG Grid */
#main-svg { 
    background-color: white; 
    box-shadow: 0 0 30px rgba(0,0,0,0.3); 
    cursor: default;
}

/* UI Prvky */
h3 { margin-top: 0; color: #444; }
.stitch-btn { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; background: white; cursor: pointer; transition: 0.2s; }
.stitch-btn:hover { background: #f0f0f0; border-color: #bbb; }
.stitch-btn.active { background: #e3f2fd; border-color: #2196f3; box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3); }
.stitch-icon { width: 24px; height: 24px; pointer-events: none; }

.btn { padding: 12px; width: 100%; cursor: pointer; font-weight: bold; border: none; border-radius: 4px; margin-top: 5px; font-size: 14px; }
.btn-primary { background: #2196f3; color: white; }
.btn-success { background: #4CAF50; color: white; }
.btn-warning { background: #ff9800; color: white; }
.btn-danger { background: #ffebee; color: #c62828; }
.btn:hover { opacity: 0.9; }

/* SVG Elementy */
.placed-stitch { cursor: grab; transition: opacity 0.1s; }
.bg-stitch { opacity: 0.4; pointer-events: none; fill: #aaa; } 

/* Dragging */
.dragging { opacity: 0.7; cursor: grabbing; pointer-events: none; }
.drag-valid { color: #2e7d32; fill: #2e7d32; stroke: #2e7d32; } 
.drag-invalid { color: #c62828; fill: #c62828; stroke: #c62828; }